I want to solve for parameters and not specific values.
(* Define the objective function *)
U[c_, tl_] := Sqrt[c] * Sqrt[tl]
(* Define the constraint function *)
constraint[tc_, T_, p_, c_, k_, pp_, j_, tl_] := Sqrt[tc]*T - p*c - pr*k*tc - pp*j*tc - Sqrt[tc]*tl - Sqrt[tc]*tc == 0
(* Maximize the objective function subject to the constraint *)
maximized = Maximize[{U[c, tl], constraint[tc, T, p, c, k, pp, j, tl] && T > 0 && p > 0 && c > 0 && k > 0 && tc > 0 && tl > 0 && pr > 0 && pp > 0}, {c, tl, tc}]
(* Display the result *)
maximized
*
in front of the)
on your second line, it looks like you might have had a space between the*
and)
and posting ate the*
. Then insert a literal*
everywhere between pairs of symbols that being multiplied so that readers can be certain which are multicharacter names and which are multiplied. Then consider rethinking your code by making all yourSqrt[c]
intoc
and thus barec
intoc^2
andSqrt[tc]
intotc
and thus baretc
intotc^2
. Since all your variables are positive that should make your problem easier for MMA to solve. $\endgroup$*
to tell it to flip from regular to italic. and back $\endgroup$