Non-typical system of nonlinear equations
1 回表示 (過去 30 日間)
古いコメントを表示
I tried to solve this system of equations, using fsolve and various newton-raphson functions, but to no avail:
x*y-z^2-1 = 0
x*y*z+y^2-x^2-2 = 0
e^x+z-e^y-3 = 0
How to bite this?
0 件のコメント
採用された回答
Walter Roberson
2021 年 12 月 30 日
編集済み: Walter Roberson
2021 年 12 月 30 日
There two real-valued solutions and two complex-valued solutions.
syms x y z
eq1=x.*y-z.^2-1 == 0;
eq2=x.*y.*z+y.^2-x.^2-2 == 0;
eq3=exp(x)+z-exp(y)-3 == 0;
eqns = [eq1, eq2, eq3];
string(eqns)
solx = solve(eqns(1),x)
eqns2 = subs(eqns(2:end), x, solx)
soly = solve(eqns2(1), y, 'maxdegree', 4)
eqns3 = subs(eqns2(2:end), y, soly)
solz = arrayfun(@vpasolve, eqns3)
backz = solz
backy = simplify(arrayfun(@(Y,Z) subs(Y, z, Z), soly, backz))
backx = simplify(arrayfun(@(Y,Z) subs(solx, {y, z}, {Y, Z}), backy, backz))
X = double(backx(:));
Y = double(backy(:));
Z = double(backz(:));
sols = table(X, Y, Z)
その他の回答 (1 件)
Yusuf Suer Erdem
2021 年 12 月 30 日
編集済み: Walter Roberson
2021 年 12 月 30 日
Try these codes below please;
syms x y z
eq1=x.*y-z.^2-1 == 0;
eq2=x.*y.*z+y.^2-x.^2-2 == 0;
eq3=exp(x)+z-exp(y)-3 == 0;
solve(eq1,eq2,eq3,x,y,z)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!