 
 
 
 
 
 
Gradient Option in FindMinimum
- To: mathgroup at smc.vnet.net
- Subject: [mg13223] Gradient Option in FindMinimum
- From: "Chris Farr" <farr at brown.edu>
- Date: Mon, 13 Jul 1998 07:43:12 -0400
- Sender: owner-wri-mathgroup at wolfram.com
Math Group:
Is the following a bug?
First, I set nameofgrad equal to 2*x.
In[32]:= nameofgrad = {2*x}
Out[32]= {2 x}
Second, I show that if {2*x} is put directly into the FindMin. 
expression everything works okay.
In[33]:= FindMinimum[x^2,{x,1.},Gradient->{2* x}] Out[33]= { 0.,{x-> 0.} }
Third, here is the bug (I think), when I put nameofgrad into the 
FindMin. expression (which is just equal to {2*x}), I get an error 
message!
In[34]:= FindMinimum[x^2,{x,1.},Gradient->nameofgrad]
FindMimimum::fmgl : Gradient {{2.}} is not a length 1 list of real 
numbers at {x} = {1.}
Can anyone duplicate this on their machine?  Any ideas?
Thanks in advance,
Chris Farr
P.S. This causes problems in the MultiplierMethod.m package listed on 
MathSource.

