Matlab fails to solve simple symbolic equation
1 view (last 30 days)
Show older comments
Hey, I have a simple optimization problem which I want to solve using Lagrange. The FOCs are correctly determined, however, Matlab fails to solve them. Do I need more assumptions? Anything else I can do? I'm sure this has a solution, since it's simple Cobb Douglas utility optimization problem! Cheers,
Oliver
clear;
syms x s l m gx gs py;
assume(gx>0&gs>0&m>0&py>0&x>=0&s>=0);
u(x,s)=x^gx*s^gs;
L(x,s,l)=u(x,s)-l*(x+py*s-m); %lagrangian
dif=jacobian(L(x,s,l),[x s l]);
[xi, si, li]=solve(dif,x,s,l);
0 Comments
Answers (0)
See Also
Categories
Find more on Assumptions in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!