Quote:
Originally Posted by k9handler
Fellas,
Here is an example problem, whats the best way to solve for X, Y and Z ?
First one I did come up undefined after two pages.
1.
X + 10Y + Z = 52
5X + Y + 4Z = 15
X + 2Y - 3Z = 12
Thanks in advance for any help you can provide. 
|
(1) X + 10Y + Z = 52
(2) 5X + Y + 4Z = 15
(3) X + 2Y - 3Z = 12
From (1)
(4) X = 52 - 10Y - Z
Substitute (4) into (2)
5 * (52 - 10Y - Z) + Y + 4Z = 15
260 - 50Y - 5Z +Y + 4Z = 15
49Y + Z = 245
(5) Z = 245 - 49Y
Substitute (4) and (5) into (3)
52 - 10Y - Z + 2Y - 3Z = 12
8Y + 4Z = 40
8Y + 4 * (245 - 49Y) = 40
8Y + 980 - 196Y = 40
188Y = 940
Y = 940 / 188
(6) Y = 5
Use (6) into (5) to solve Z
Z = 245 - 49 * 5
(7) Z = 0
Use (6) and (7) into (4) to solve X
X = 52 - 10 * 5 - 0
(8) X =2
Check the math please, as I didn't
Edit: OK, I'll finish the example.
To check, no need to go through all the steps to reverify, simply take X =2, Y = 5, and Z = 0 and plug into (1), (2), and (3) to see if all three equations come out right.
(1) X + 10Y + Z = 52
becomes
2 + 10 * 5 + 0 = 52, yup
(2) 5X + Y + 4Z = 15
becomes
5 * 2 + 5 + 4 * 0 = 15, yup
(3) X + 2Y - 3Z = 12
becomes
2 + 2 * 5 - 3 * 0 = 12, yup
The method on the website you found seems kind of complicated, not that it is wrong but makes too big a deal of things. Basically you grab one three-variable equation, re-arrange until one variable is expressed as a function of the other two. Plug the re-arranged equation into the next three-variable equation and get a two-variable equation, re-arrange until one variable is expressed as a function of the last variable. Plug both re-arranged equations into the last three-variable equation and you will have a one-variable equation, so that last variable is now solved to a constant. Then work backwards to solve the other variables.