Re: Maximize
- To: mathgroup at smc.vnet.net
- Subject: [mg91490] Re: Maximize
- From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
- Date: Sat, 23 Aug 2008 01:44:03 -0400 (EDT)
- Organization: The Open University, Milton Keynes, UK
- References: <g8lpbu$ikc$1@smc.vnet.net>
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
> ]
The expression is missing the pair of curly braces that must enclose the
function and its constraint(s) *AND* you surely do not want to put an
assignment (single equal sign "=") to x as a constraint :) So,
syntacticly, the following expression makes sense:
Maximize[{g + (1 - g)*x - (g/2)*x^2 - (g/2)*v,
x == (a/c) + sqrt ((d/c)*(v - 1/c))}, x]
Best regards,
-- Jean-Marc