# Solve does not work this Lagrangian function

Posted 10 years ago
2476 Views
|
2 Replies
|
0 Total Likes
|
 I have the following code in Mathematica:L = Log[c1] + \[Beta] Log[c2] + \[Lambda] (r c1 + c2 - (1 - \[Tau]) A c3^\[Theta] +r ((1 - \[Alpha]) c3)^(1/(1 - \[Alpha])))x1 = D[L, c1]x2 = D[L, c2]x3 = D[L, c3]Solve[{x1 == 0, x2 == 0, x3 == 0}, {c1, c2, c3}]The derivatives are calculated correctly. The Solve function does not appear to do a thing. Aplogize in advance if this is elementary; I have just begun to self-learn Mathematica. Objective is to have it solve this Lagrangean.Thanks!
2 Replies
Sort By:
Posted 10 years ago
 Thank you for this! Very helpful.
Posted 10 years ago
 Hi,When I tried your code, I got the following error message:Solve::nsmet: This system cannot be solved with the methods available to Solve. >>The first and second equations can be solved for c1 and c2, respectively. The above error message is due to the third equation x3==0. Tryx3 = PowerExpand[x3]before calling Solve assuming thatÂ  \ is less than 1. Solve will then be able to solve the equations. The result is, unfortunately, not so illuminating. After some arithmetic, the third equation can be turned into the form\[Lambda] (c3^(1/(1-\[Alpha])-\[Theta]) r (1-\[Alpha])^(\[Alpha]/(1-\[Alpha]))-A \[Theta] (1-\[Tau])) == 0which gives a better looking solution.Youngjoo Chung