Solve not working: Cannot find explicit solution
Mostrar comentarios más antiguos
I cannot proceed anymore after I got the result below.
x1 =
(w1/(A*a*p*x2^b))^(1/(a - 1))
x2 =
(w2/(A*b*p*x1^a))^(1/(b - 1))
========================================================================
These two equations above both includes x1 and x2, and I need to get an explicit function of x1 and x2 as the following:


========================================================================
The following is my original code that I used:
clc
clear
syms A x1 x2 w1 w2 a b p ;
assume(A>0 & a+b<1 & a>0 & b>0);
f=A*x1^a*x2^b ;
l=p*f-w1*x1-w2*x2;
eqn1=diff(l,x1)==0;
eqn2=diff(l,x2)==0;
x1 = solve(eqn1, x1,'IgnoreAnalyticConstraints',1)
x2 = solve(eqn2, x2,'IgnoreAnalyticConstraints',1)
========================================================================
I have tried many ways as below, but none of these worked.
Do you know why these do not work, and could you solve this problem?
%%%%TRY1
x1=subs(x1)
x1 = solve(eqn1, x1,'IgnoreAnalyticConstraints',1)
%%%%TRY2
eqn21= x1 == solve(eqn1, x1,'IgnoreAnalyticConstraints',1)
eqn22= x2 == solve(eqn2, x2,'IgnoreAnalyticConstraints',1)
sol = solve([eqn21, eqn22], [x1, x2],'IgnoreAnalyticConstraints',1)
%%%%TRY3
eqn1 = rewrite(eqn1,'log');
eqn2 = rewrite(eqn2,'log');
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Linear Algebra en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!