MathGroup Archive 2007

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

Search the Archive

Can Maximize return a function


e.g.

When I run:

Clear["*"]
SetAttributes[a, Constant]
(*this works if use a num instead of a*)
(*e.g. f[x_] := 4*x - x^2 *)
f[x_] := a*x - x^2
Maximize[f[x], a > 0, x]

I get:

Maximize[{-x^2+xy, y>0},x]

when I really want something like:

{a, {x->a/2}}

Can this be done?



  • Prev by Date: Length of random index into list
  • Next by Date: Re: Default value
  • Previous by thread: Re: Length of random index into list
  • Next by thread: Re: Can Maximize return a function