Cannot find ALL solutions to simultaneous equation
Afficher commentaires plus anciens
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])
Réponse acceptée
Plus de réponses (1)
Walter Roberson
le 8 Jan 2020
0 votes
Ookkay... The 55 kilobyte solution is attached.
Now what are you going to do with it?
5 commentaires
Xinzhe Chai
le 8 Jan 2020
Walter Roberson
le 8 Jan 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
le 8 Jan 2020
Walter Roberson
le 8 Jan 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
le 8 Jan 2020
Catégories
En savoir plus sur Equation Solving dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!