Cannot find ALL solutions to simultaneous equation
古いコメントを表示
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])
採用された回答
その他の回答 (1 件)
Walter Roberson
2020 年 1 月 8 日
0 投票
Ookkay... The 55 kilobyte solution is attached.
Now what are you going to do with it?
5 件のコメント
Xinzhe Chai
2020 年 1 月 8 日
Walter Roberson
2020 年 1 月 8 日
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
2020 年 1 月 8 日
Walter Roberson
2020 年 1 月 8 日
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
2020 年 1 月 8 日
カテゴリ
ヘルプ センター および File Exchange で Equation Solving についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!