Maximize function question
- To: mathgroup at smc.vnet.net
- Subject: [mg46221] Maximize function question
- From: "David" <nospam at nospam.com>
- Date: Thu, 12 Feb 2004 07:15:48 -0500 (EST)
- Organization: University of Minnesota
- Sender: owner-wri-mathgroup at wolfram.com
Hello, I am attempting to perform a constrained optimization in Mathematica 5.0 on the objective function: f(K,L)=aK+wL s.t. K^0.5 + L^0.5=Q where a,w,Q are constant. I define: objA[K_,L_]:=rK+wL and constraintsA = {K^0.5+L^0.5==Q,K>=0, L>=0} After which I try to evaluate Maximize[{objA[K,L],constraintsA},{K,L}] However, I receive an error message that the objective function contains a nonconstant expression independent of variables {K,L}. Though the calculation is trivial and is easy to do by hand, I would like to be able to figure out how to do these types of optimization problems not having to assign real numbers to the constants for future use. Is there an elegent way to do this? Your collective help is greatly appreciated.