Re: problems with NMinimize

*To*: mathgroup at smc.vnet.net*Subject*: [mg109420] Re: problems with NMinimize*From*: Ingolf Dahl <ingolf.dahl at telia.com>*Date*: Mon, 26 Apr 2010 07:32:12 -0400 (EDT)*Organization*: University of Gothenburg*References*: <201004260850.EAA12376@smc.vnet.net>*Reply-to*: <ingolf.dahl at physics.gu.se>

Best LAI, Yes, if you followed the thread back, you see that we also have understood that we might introduce an extra function f(a_?NumericQ,b_?NumericQ, ...), but we (I guess I can include Alexey Popkov and Joe Hays in "we") sometimes find that way clumsy. If we ask Mathematica to evaluate NMinimize, this function is described to "minimizes f numerically with respect to x." But it does not only this: it also first tries to evaluate f symbolically. I find it reasonable that there should be a way to opt-out from this symbolic evaluation. It would be convenient to have an option to NMinimize for this purpose. Ingolf Dahl Sweden -----Original Message----- From: Anh Ngoc LAI [mailto:laianhngoc at yahoo.com] Sent: den 26 april 2010 10:50 To: mathgroup at smc.vnet.net Subject: [mg109420] [mg109413] Re: problems with NMinimize Hi, One way to solve this problem (if i understand your problem) is to define your function so that only evaluates when its argument is numeric, as follow: f(a_?NumericQ,b_?NumericQ, ...) == ... LAI. --- On Sun, 4/25/10, Alexey Popkov <lehin.p at gmail.com> wrote: From: Alexey Popkov <lehin.p at gmail.com> Subject: [mg109420] [mg109413] [mg109405] Re: problems with NMinimize To: mathgroup at smc.vnet.net Date: Sunday, April 25, 2010, 6:25 AM "Ingolf Dahl" <ingolf.dahl at physics.gu.se> =D1=81=D0=BE=D0=BE=D0=B1=D1=89=D0= =B8=D0=BB/=D1=81=D0=BE=D0=BE=D0=B1=D1=89=D0=B8=D0=BB=D0=B0 =D0=B2 =D0=BD=D0= =BE=D0=B2=D0=BE=D1=81=D1=82=D1=8F=D1=85 =D1=81=D0=BB=D0=B5=D0=B4=D1=83=D1=8E=D1=89=D0=B5=D0=B5: news:hqu8ai$rol$1@s= mc.vnet.net... > Is there any serious Mathematica user in this forum, which has not > stumbled > on this problem one or several times, when NMinimize, or some other > function, tries to evaluate a numeric function symbolically first, before > inserting the numbers? Sometimes it would be nice to have an option, > SymbolicEvaluation->False, which could be set for NMinimize in these > cases. > It is not always so convenient to have to define an extra function just to > take care of this. I think there is a whole group of commands acting > similarly to NMinimize. > > Ingolf Dahl > Sweden I totally agree with you. I do not see anything reasonable in that obviously numerical function (for example, NMinimize, FindMinimum, etc.) is trying for some reason to perform symbolic computation.

**References**:**Re: problems with NMinimize***From:*Anh Ngoc LAI <laianhngoc@yahoo.com>