i would suggest elimanating the z in eq1 and eq2
and factor out 2 in the eq3
this will make it very easy
you should get
x=6
y=5
z=4
What I am doing wrong here?
Also does it matter that there are only two variables in the third line? All the examples I have looked at for solving three equations with three variables had three variables in each line.
2x + y + z = 21
2y + x + z = 20
2x + 2y = 22
define x
x + y = 11
x = y -11
substitute into line 1 and 2:
2(11 - y) + y + z = 21
22 - 2y + y + z = 21
22 + z = 21 + y
z = y - 1
2y + (y-11) + z = 20
3y - 11 + z = 20
3y + z = 31
substitute again:
3y + (y-1) = 31
4y = 32
y = 8
thanks!
your method probably works but substituting in equations into equations gets very difficult and error prone, you want reduce the equations down to very simple terms
so the first 2 equations are
2x+y+z=21
2y+x+z=20 (multiply thru with -1 and re oder the terms)
so now we have
2x+y+z=21
-x-2y-z=-20
add these and we have
x - y = 1
now take eq3 factor out 2 you have
x + y = 11
now add these equations together and we have
x=6
y and z are very easy to get from here
did you see the magic??
Yes I see.
But is that method only possible because of the third line in this case?
What about something like:
2x + y + z = 72
2y + x + z = 64
2z + x + y = 68
adding lines 1 and 2
x - y = 8
then I would have to follow my original method of substitution, no?
Sorry, I'm just trying to figure out how the proper method for doing these.
not necessarily
with 3 variables in 3 equations
try to eliminate one of variables first
it doesn't mater which one just pick the easy one first
often you can eliminate 2 variables in one sweep
again try avoid plugging in an equation into an equation with simultaneous equations
there are times when there is no choice.. but don't see it here.
the next simultaneous equation can be very easy by just eliminating the z
not questioning your method.... but it takes more steps
my view anyway.
Okay, I see my mistake in the first one.
I had I should have used (11-y) in the second substitution. Had it right in the first one.
I also see your point about being eliminate variables more simply. It's just all the tutorials I've looked at, suggested the longer way.