Re: Maximize
- To: mathgroup at smc.vnet.net
- Subject: [mg91482] Re: Maximize
- From: Bill Rowe <readnews at sbcglobal.net>
- Date: Sat, 23 Aug 2008 01:42:36 -0400 (EDT)
On 8/22/08 at 3:12 AM, gregory.lypny at videotron.ca (Gregory Lypny)
wrote:
>Not sure why this won't work. I'm trying to maximize with respect
>to x subject to a constraint. I get an error message saying that
>the constraint is not a valid variable.
>Maximize[ g + (1-g)*x -(g/2)*x^2 - (g/2)*v,
>x = (a/c) + sqrt((d/c)*(v - 1/c)),
>x
>]
You simply have to pay attention to syntax and usage if you
expect meaningful results.
Look up Maximize in the Document Center and you will see to
maximize an expression with constraints, the expression and
constraints are given to Maximize as a list. Additionally, a
single "=" is an assignment operator. That is you have given
Maximize three arguments, an expression you presumably want to
maximize, x which you have set to what presumably was intended
as your constraint and x again.
I believe the problem you are attempting to solve should be
expressed as:
Maximize[{g+(1-g)*x-(g/2)*x^2- (g/2)*v,
x==(a/c) + sqrt((d/c)*(v - 1/c))}, x]