I am trying to solve a constrained optimisation problem using Lagrangian Multipliers. The particular case is standard microeconomic problem of a firm maximizing profits, which I want to extend once I can solve the basic case. Specifically, \begin{equation} \underset{L,K}{max} \, \pi=pq -c(q) = pf(L,K)-(\rho K+\omega W) \quad \mbox{subject to} \quad L,K>0 \end{equation} The case I am interested in is where: $$f(L,K)=A(\alpha k^{\theta}+(1-\alpha)l^{\theta})^{\phi/\theta}$$
And where $\rho>0,\omega>0,\theta<1,A>0$. I am also, until I get it to work, assuming $\phi=1$.
In case it is more natural in mathematica it's worth noting that we can also write this as a minimization problem where first we solve for the firm's cost function: \begin{equation} c(y,\omega, rho)=\underset{l,k}{min}\ \rho k + \omega l \quad \mbox{subject to} \quad f(l,k)\geq y, l>0,k>0 \end{equation}
This gives the cost of a given level of output, which then allows us to maximize the profit function by solving: \begin{equation} \underset{y}{max}\ \pi=py - c(y,\rho, \omega) \quad \mbox{subject to} \quad f(l,k)\geq y, l>0,k>0 \end{equation}
I have had no success using Mathematica with either approach. I have tried a few different approaches. I initally tried solving for by explicitly writing out the first-order conditions and the necessary assumptions and using Solve
which works for problems with a simpler specification for $f(L,K)$ e.g. $f(L,K)=L^{1/3}K^{1/3}$ but leads to errors for the case I'm interested in.
The code below which runs without error, but also seemingly without end, is based on the answer to this question: How can I implement the method of Lagrange multipliers to find constrained extrema? and to a lesser extent this one Finding maximum or minimum of implicit functions
assumps =a > 0 && l > 0 && k > 0 && 1 > alpha > 0 && omega > 0 && rho > 0 && theta < 1
f[l_, k_] := a*(alpha*(k^theta]) + (1 - alpha) l^theta)^(1/theta)
g1[l_, k_] := omega*l + rho*k + beta*rho*k^2
h[x_, y_, lambda1_] := f[l, k]*p - lambda1 g1[l, k]
{l, k} /. Assuming[assumeCES, Reduce[Grad[h @@ #, #] == 0, #]] &@{l,
k, \[Lambda]1} // FullSimplify
I have also tried using Solve instead:
{l, k} /. Assuming[assumeCES, Reduce[Grad[h @@ #, #] == 0, #, Reals]] &@{l,
k, \[Lambda]1} // FullSimplify
My question is How can this problem (and extensions of it) be solved using Mathematica? Is there an alternative command or alternative statement of the problem such that Mathematica is better able to deal with it.