Re: Problem with parametric minimization
- To: mathgroup at smc.vnet.net
- Subject: [mg90254] Re: Problem with parametric minimization
- From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
- Date: Thu, 3 Jul 2008 06:13:32 -0400 (EDT)
- Organization: The Open University, Milton Keynes, UK
- References: <g4fhkl$9gs$1@smc.vnet.net>
Stephan Heckmueller wrote: > I have a problem with with the examples for using the > Minimize function given in the documentation on wolfram.com: > > When trying: > > Minimize[ax^2+bx+c,x] > > I receive the following error: > > Minimize::objv: > The objective function c+bx+ax^2 contains a nonconstant > expression c independent of variables (x). > > Is there something wrong with the command or the > documentation? Starting from a fresh kernel, I do not get any error message when evaluating the expression you posted: In[1]:= Minimize[ax^2 + bx + c, x] Out[1]= {ax^2 + bx + c, {x -> 0}} Though I strongly suspect that what you intended was the following (note that you must either put a space between coefficients and variables -- implicit multiplication -- or add a star between them, otherwise you just declare some variables called 'ax' and 'bx'): In[2]:= Minimize[a*x^2 + b*x + c, x] Out[2]= {Piecewise[{{c, (b == 0 && a == 0) || (b == 0 && a > 0)}, 2 -b + 4 a c {-----------, (b > 0 && a > 0) || (b < 0 && a > 0)}}, -Infinity], 4 a {x -> Piecewise[{{0, (b == 0 && a == 0) || (b == 0 && a > 0)}, b {-(---), (b > 0 && a > 0) || (b < 0 && a > 0)}}, Indeterminate]}} 2 a Regards, -- Jean-Marc