http://www.mathworks.com/matlabcentral/newsreader/view_thread/324863
MATLAB Central Newsreader  Solving 3 equations 3 unknowns second order
Feed for thread: Solving 3 equations 3 unknowns second order
enus
©19942015 by MathWorks, Inc.
webmaster@mathworks.com
MATLAB Central Newsreader
http://blogs.law.harvard.edu/tech/rss
60
MathWorks
http://www.mathworks.com/images/membrane_icon.gif

Fri, 30 Nov 2012 23:59:08 +0000
Solving 3 equations 3 unknowns second order
http://www.mathworks.com/matlabcentral/newsreader/view_thread/324863#892801
Sia
Hello every one.<br>
I have the following equations. how can solve them with Matlab?<br>
<br>
Xa*(Y+Z)=0<br>
<br>
b*Y^2+c*X^2=d<br>
<br>
e*Z^2+f*X^2=g<br>
<br>
Is there any one who can give me a hand in the case?<br>
<br>
Thanks.

Sat, 01 Dec 2012 01:29:06 +0000
Re: Solving 3 equations 3 unknowns second order
http://www.mathworks.com/matlabcentral/newsreader/view_thread/324863#892807
Nasser M. Abbasi
On 11/30/2012 5:59 PM, Sia wrote:<br>
> Hello every one.<br>
> I have the following equations. how can solve them with Matlab?<br>
><br>
> Xa*(Y+Z)=0<br>
><br>
> b*Y^2+c*X^2=d<br>
><br>
> e*Z^2+f*X^2=g<br>
><br>
> Is there any one who can give me a hand in the case?<br>
><br>
> Thanks.<br>
><br>
<br>
<br>
syms X Y Z a b c d e f g<br>
eq1 = Xa*(Y+Z)<br>
eq2 = b*Y^2+c*X^2d<br>
eq3 = e*Z^2+f*X^2g<br>
sol = solve(eq1,eq2,eq3,X,Y,Z)<br>
<br>
<br>
EDU>> sol.X<br>
<br>
(b^2*e^2*((b^2*e*g + 2*a^2*b*f*(b*d*e*g  a^2*d^2*e*f <br>
<SNIP><br>
<br>
etc...<br>
<br>
Nasser

Sat, 01 Dec 2012 01:50:14 +0000
Re: Solving 3 equations 3 unknowns second order
http://www.mathworks.com/matlabcentral/newsreader/view_thread/324863#892808
Roger Stafford
"Sia" wrote in message <k9bh8c$13k$1@newscl01ah.mathworks.com>...<br>
> Xa*(Y+Z)=0<br>
> b*Y^2+c*X^2=d<br>
> e*Z^2+f*X^2=g<br>
        <br>
Have you tried 'solve' in the Symbolic Toolbox?<br>
<br>
If that doesn't give you a satisfactory answer, substitute X = a*(Y+Z) into the other two equations to get:<br>
<br>
(b+c*a^2)*Y^2 + 2*c*a^2*Y*Z + c*a^2*Z^2 = d<br>
f*a^2*Y^2 + 2*f*a^2*Y*Z + (e+f*a^2)*Z^2 = g<br>
<br>
Then combine these so as to eliminate the Y^2 term and get an equation involving only Y*Z and Z^2, which can then be solved for Y in terms of Z. If this is substituted for Y in one of the above two equations, you will get a single equation in Z alone, which can be manipulated to a fourth order polynomial equation in Z.<br>
<br>
Fourth order polynomial equations do have explicit solutions but the Symbolic Toolbox is not likely to give them to you. However you can use 'roots' to obtain four numerical Z roots for each set of specified parameters a, b, ..., f. Each of these can then be used to directly find Y and X from the above equations of Y in terms of Z and X in terms of Y and Z.<br>
<br>
Roger Stafford