Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Profit maximisation with a cobb-Douglas function

I dont know how to solve this optimization problem in SageMath

$\max_{L,K}\pi(K,L) = p A L^\alpha K^\beta - w L - rk$

Here is my code

var('L K p A α K β w r')
assume(L>0)
assume(K>0)
assume(p>0)
assume(w>0)
assume(r>0)
assume(α>0)
assume(β>0)
assume(α<=1)
assume(β<=1)
π(L,K)= p*A*L^α*K^β - w*L - r*K
π_L = diff(π(L,K),L)
π_K = diff(π(L,K),K)
sol= solve([π_L==0,π_K==0],[L,K])

You can see that SageMath is unable to solve the system of two equations defined by solve. I have tried to decompose each stage one by one but I haven't found a way to obtain any result. It's a standard textbook problem in economics. Is there somebody who knows a way to d it ?