MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Maximize


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



  • Prev by Date: Re: Maximization of a Likelihood Function
  • Next by Date: Re: Maximize
  • Previous by thread: Maximize
  • Next by thread: Re: Maximize