2024-11-07
Or visit https://bit.ly/pes-py.
From Essential Mathematics for Economic Analysis:
obtain the stationary points of \(f\).
determine whether each stationary point is a local maximum, local minimum, saddle point, or “cannot tell”.
produce an expression of the maximized value of \(f\).
produce an expression of how the maximized value of \(f\) going to be affected by changes in \(a\).
{x: 0, y: 0}
You have seen a preview of some “weird” stuff.
From Essential Mathematics for Economic Analysis:
Declare variables, define functions, take derivatives, make substitutions, solve systems of equations
Key step is to distinguish regular inputs \(K\), \(L\) against optimal inputs \(K^*\), \(L^*\)
x, y = symbols('x y', real = True)
eq1 = Derivative(Derivative(pi, K).doit().subs({K:Kstar, L:Lstar}), w).doit().subs({Derivative(K, w).subs({K:Kstar, L:Lstar}):x, Derivative(L, w).subs({K:Kstar, L:Lstar}):y})
eq2 = Derivative(Derivative(pi, L).doit().subs({K:Kstar, L:Lstar}), w).doit().subs({Derivative(K, w).subs({K:Kstar, L:Lstar}):x, Derivative(L, w).subs({K:Kstar, L:Lstar}):y})
solve([eq1, eq2], [x, y], dict = True)
[{x: -Derivative(F(K(w, r, p), L(w, r, p)), K(w, r, p), L(w, r, p))/(p*Derivative(F(K(w, r, p), L(w, r, p)), (K(w, r, p), 2))*Derivative(F(K(w, r, p), L(w, r, p)), (L(w, r, p), 2)) - p*Derivative(F(K(w, r, p), L(w, r, p)), K(w, r, p), L(w, r, p))**2),
y: Derivative(F(K(w, r, p), L(w, r, p)), (K(w, r, p), 2))/(p*Derivative(F(K(w, r, p), L(w, r, p)), (K(w, r, p), 2))*Derivative(F(K(w, r, p), L(w, r, p)), (L(w, r, p), 2)) - p*Derivative(F(K(w, r, p), L(w, r, p)), K(w, r, p), L(w, r, p))**2)}]
expr = solve([eq1, eq2], [x, y], dict = True)
from IPython.display import display, Math
display(Math('%s' %latex(expr)))
\(\displaystyle \left[ \left\{ x : - \frac{\frac{\partial^{2}}{\partial L{\left(w,r,p \right)}\partial K{\left(w,r,p \right)}} F{\left(K{\left(w,r,p \right)},L{\left(w,r,p \right)} \right)}}{p \frac{\partial^{2}}{\partial K{\left(w,r,p \right)}^{2}} F{\left(K{\left(w,r,p \right)},L{\left(w,r,p \right)} \right)} \frac{\partial^{2}}{\partial L{\left(w,r,p \right)}^{2}} F{\left(K{\left(w,r,p \right)},L{\left(w,r,p \right)} \right)} - p \left(\frac{\partial^{2}}{\partial L{\left(w,r,p \right)}\partial K{\left(w,r,p \right)}} F{\left(K{\left(w,r,p \right)},L{\left(w,r,p \right)} \right)}\right)^{2}}, \ y : \frac{\frac{\partial^{2}}{\partial K{\left(w,r,p \right)}^{2}} F{\left(K{\left(w,r,p \right)},L{\left(w,r,p \right)} \right)}}{p \frac{\partial^{2}}{\partial K{\left(w,r,p \right)}^{2}} F{\left(K{\left(w,r,p \right)},L{\left(w,r,p \right)} \right)} \frac{\partial^{2}}{\partial L{\left(w,r,p \right)}^{2}} F{\left(K{\left(w,r,p \right)},L{\left(w,r,p \right)} \right)} - p \left(\frac{\partial^{2}}{\partial L{\left(w,r,p \right)}\partial K{\left(w,r,p \right)}} F{\left(K{\left(w,r,p \right)},L{\left(w,r,p \right)} \right)}\right)^{2}}\right\}\right]\)
Based on 3 evaluations during the first 4 to 5 meetings:
Slides | Lecture/lab course webpage | My webpage | Even earlier exposure |
Questions, proposals, collaboration?
Email me at andrew.pua@dlsu.edu.ph or approach me, I’ll give you my card.