how to solve complicated simultaneous equations?
Show older comments
I have 3 equations with three variables (x,y,z) to find. and the equations contain (x,y,z,xy,xz,yz,xyz)
y -244208 -10.1z = 0
-29.305x + 0.695y + 0.001212xz + 0.001212yz + 0.000012xy = 0
-90xyz + 11000xy + 1133913xz + 1133913yz + 22913000x + 22913000y = 0
I used matlab but, each answers are not one thing.
For example, x's answers
1.0e+04 *
0.0000 + 0.0000i
1.6320 + 0.0000i
0.6268 + 0.0000i
0.5104 - 0.0000i
it's not one thing ,but four.
I don't know why (x) have four answers....
I need only one answer each variables.
How can matlab solve this type of equation?
the matlab code that i used:
syms x y z
F1= y-244208-10.1*z;
F2= -29.305*x + 0.695*y + 0.001212*x*z + 0.001212*y*z+ 0.000012*x*y;
F3= -90*x*y*z+ 11000*x*y+ 1133913*x*z+ 1133913*y*z+ 22913000*x+22913000*y;
S=solve(F1,F2,F3,x,y,z);
S.x
S.y
S.z
double(S.x)
double(S.y)
double(S.z)
It's too hard get answer.
Please answer for me...T.T
Thank you very much!!
Answers (1)
John D'Errico
on 31 May 2017
It is a nonlinear equation. Those products of the variables make it nonlinear. Even for as simple equation in one variable as this:
x^2 == 5
more than one solution exists.
So in general, if your equation is nonlinear, there MAY be multiple solutions. That is true in your problem. More than one solution exists. Solve gave you all 4 that it found. So what is the problem? Should solve somehow know which solution you wanted to find? The mind reading toolbox never seems to work for me.
Categories
Find more on 프로그래밍 in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!