Cannot find ALL solutions to simultaneous equation
Mostrar comentarios más antiguos
Hi everyone, I would like to find ALL the solutions to this series of equations. Here is my code.
My problem is that it prompts me to use vpasolve, which doesn't give ALL the solutions. I tried "ReturnCondition", but to no avail.
My code is here:
clear all
syms x y z
eq1 = exp(x^2 + y^2 + z^2) == 9;
eq2 = x + x*y - z == 1;
eq3 = x + y + z == 1;
[solx,soly,solz] = solve([eq1,eq2,eq3],[x y z])
Respuesta aceptada
Más respuestas (1)
Walter Roberson
el 8 de En. de 2020
0 votos
Ookkay... The 55 kilobyte solution is attached.
Now what are you going to do with it?
5 comentarios
Xinzhe Chai
el 8 de En. de 2020
Walter Roberson
el 8 de En. de 2020
I used Maple,
[allvalues](solve([exp(x^2 + y^2 + z^2) = 9, x*y + x - z = 1, x + y + z = 1]))
and then a fair bit of hand-editing to get the values into a form that could be loaded into MATLAB.
Xinzhe Chai
el 8 de En. de 2020
Walter Roberson
el 8 de En. de 2020
solve eq2 for x (in terms of y and z) . Substitute that x into eq3 and solve for z. substitute for x and then z into eq1, and solve for y asking solve for MaxDegree 4. The result will be four exact roots for y. simplify(). Now do back substitution.
Xinzhe Chai
el 8 de En. de 2020
Categorías
Más información sobre Equation Solving 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!