Can Maximize return a function
- To: mathgroup at smc.vnet.net
- Subject: [mg74868] Can Maximize return a function
- From: "mfmad" <mfmadrid at yahoo.com>
- Date: Mon, 9 Apr 2007 06:12:49 -0400 (EDT)
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?