       Strange quirk to FindMinimum

• To: mathgroup at smc.vnet.net
• Subject: [mg8454] Strange quirk to FindMinimum
• From: "K. Nikolaj Berntsen" <knb at _nospam_bkm.dtu.dk>
• Date: Sat, 30 Aug 1997 00:43:08 -0400
• Organization: News Server at UNI-C, Danish Computing Centre for Research and Education.
• Sender: owner-wri-mathgroup at wolfram.com

```In Mathematica 3.0 I try to minimize a function. I run into some
problems which probably can be avoided by renaming the variables, but I
think that it is puzzling enough to post it to this group. By the way,
thanks to all the people who helped me get rid of outer braces by.

In[]:=	f = Log[\[Lambda]]^2 + x^2;
In[]:=	FindMinimum[Evaluate[f],{x,1},{\[Lambda],2}]
Out[]:=	{6.47493078439917812`*^-19, {x \[Rule]
7.42323767889736974`*^-11,
\[Lambda] \[Rule] 0.999999999198761813`}}

Really nice and neat. Then I remove the square of the x:

In[]:=	f = Log[\[Lambda]]^2 + x;
In[]:=	FindMinimum[Evaluate[f],{x,1.},{\[Lambda],2.}]
error:	Function::"flpar": Parameter specification {x, \[Lambda]}
in Function[{x, \[Lambda]}, Log[\[Lambda]]^2 + x] should be a
symbol or a list of symbols.

Hm. that really doesn't make any sense to me.

Now I change x to x and \[Lambda] to y:

In]}:=	f = Log[y]\^2 + \ x;
In[]:=	FindMinimum[Evaluate[f],{x,1.},{y,2.}]
error:	FindMinimum::"fmnum": Objective function -13.43 + 1.07 I
is not real at {x, y} = {-3.59,-1.18}
Out[]:=	FindMinimum[Evaluate[f],{x,1.},{y,2.}]

This is a reasonable answer from mathematica I think, so I will try and
change my fancy greek variable names to latin ones. But if any of you
can understand it I will appreciate the insight. Otherwise I might send
it to Wolfram.

Happy Computing,
Nikolaj
--------------------------------------------------------------
| Ph.D. stud., cand.scient.				     |
| K. Nikolaj Berntsen					     |
| Office: Department of Structural Engineering and Materials |
|	  Technical University of Denmark		     |
|	  Building 118, room 152			     |
|	  DK-2800 Lyngby				     |
|	  Tel +45 4525 1769				     |
|	  Fax +45 4588 3282				     |
--------------------------------------------------------------

```

• Prev by Date: Flat: Problems & Workarounds
• Previous by thread: Importing .ps and .eps graphics into Notebooks