Non-typical system of nonlinear equations
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
KarolN
am 30 Dez. 2021
Kommentiert: KarolN
am 30 Dez. 2021
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 Kommentare
Akzeptierte Antwort
Walter Roberson
am 30 Dez. 2021
Bearbeitet: Walter Roberson
am 30 Dez. 2021
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)
Weitere Antworten (1)
Yusuf Suer Erdem
am 30 Dez. 2021
Bearbeitet: Walter Roberson
am 30 Dez. 2021
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)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!