Non-typical system of nonlinear equations
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
KarolN
el 30 de Dic. de 2021
Comentada: KarolN
el 30 de Dic. de 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 comentarios
Respuesta aceptada
Walter Roberson
el 30 de Dic. de 2021
Editada: Walter Roberson
el 30 de Dic. de 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)
Más respuestas (1)
Yusuf Suer Erdem
el 30 de Dic. de 2021
Editada: Walter Roberson
el 30 de Dic. de 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)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!