# Thread: Need help solving for 3 variables

1. ## Need help solving for 3 variables

Hi,

Im trying to work out a math problem I have tonight. I have the general idea of what I should be doing but it just isnt panning out for me. I need to solve for x,y and z. I keep redoing this problem and keep getting different answers. Could someone help me out?

The equations

x-y+2z=7
2x+3y-z=-6
-x+2y+z=-3

This is what I did so far:

-2(x-y+2z=7) ==> -2x+2y-4z=-14
==2nd equation====> 2x+3y-z=-6
_____________
5y-5z=-20

2(-x+2y+z=-3) ==> -2x+4y+2z=-6
===2nd equat.====> 2x+3y-z=-6
____________
7y+z=-12

Then I took the simplified equations and solved for the y variable using the addition method

5(7y+z=-12) ====> 35y+5z=60
===2nd equation==> 5y-5z=-20
_________
40y=40
y=1

(2x+3y-z=-6)2====> 4x+6y-2z=-12
===2nd equation===> x-y+2z=7
-------------------
5x+5y=-5

2x+3y-z=-6
-x+2y+z=-3
------------
x+5y=-9

Solve for x
-1(x+5y=-9)==>-x-5y=9
============>5x+5y=-5
----------------
4x=4
x=1

plug both x and y into one of the original 3 equations to solve for z

x-y+2z=7 ===> 1-1+2z=7
===========> 2z=7
===========z=7/2

check with another equation

2x+3y-z=-6 ===> 2(1)+3(1)-(7/2)=-6
=============> 5-(7/2)=-6
===============3/2=6 which is Wrong!!

Can someone help me see where I am going wrong?

2. Originally Posted by LisaH
Hi,

Im trying to work out a math problem I have tonight. I have the general idea of what I should be doing but it just isnt panning out for me. I need to solve for x,y and z. I keep redoing this problem and keep getting different answers. Could someone help me out?

The equations

x-y+2z=7
2x+3y-z=-6
-x+2y+z=-3

This is what I did so far:

-2(x-y+2z=7) ==> -2x+2y-4z=-14
==2nd equation====> 2x+3y-z=-6
_____________
5y-5z=-20
Right so far

2(-x+2y+z=-3) ==> -2x+4y+2z=-6
===2nd equat.====> 2x+3y-z=-6
____________
7y+z=-12
Right
Then I took the simplified equations and solved for the y variable using the addition method

5(7y+z=-12) ====> 35y+5z=60 <---Here is a mistake. Should be -60
===2nd equation==> 5y-5z=-20
_________
40y=40
y=1
This is probably where you've gone wrong. Fix this, and see if you are able to obtain the correct solutions.

3. Thanks so much for your fast response! Seeing the error I made fixed the rest of the problem! It took me a bit but I managed to find the variables with confidence.

answer: (1,-2,2) ===> I hope anyhow!

4. Originally Posted by LisaH
Thanks so much for your fast response! Seeing the error I made fixed the rest of the problem! It took me a bit but I managed to find the variables with confidence.

answer: (1,-2,2) ===> I hope anyhow!
Haha no worries, it's correct; that's the impact of a simple sign error though!

5. Originally Posted by LisaH
x - y + 2z = 7 [1]
2x + 3y - z = -6 [2]
-x + 2y + z = -3 [3]
An initial "look" for shortcuts can sometimes save lots of work.

Multiply [3] by -1:

x - y + 2z = 7 [1]
2x + 3y - z = -6 [2]
x - 2y - z = 3 [3]

Add the 3 equations:
4x = 4 ; x = 1

6. Wilmer - Wow! that really pans out nicely, doesnt it? Thanks I will have to keep that in mind with future assignments.

7. Originally Posted by LisaH
Hi,

Im trying to work out a math problem I have tonight. I have the general idea of what I should be doing but it just isnt panning out for me. I need to solve for x,y and z. I keep redoing this problem and keep getting different answers. Could someone help me out?

The equations

x-y+2z=7
2x+3y-z=-6
-x+2y+z=-3

This is what I did so far:

-2(x-y+2z=7) ==> -2x+2y-4z=-14
==2nd equation====> 2x+3y-z=-6
_____________
5y-5z=-20

2(-x+2y+z=-3) ==> -2x+4y+2z=-6
===2nd equat.====> 2x+3y-z=-6
____________
7y+z=-12

Then I took the simplified equations and solved for the y variable using the addition method

5(7y+z=-12) ====> 35y+5z=60 should be -60
===2nd equation==> 5y-5z=-20
_________
40y=40 should be -80
y=1 should be -2

You have found "y"
Therefore, substituting into 5y-5z=-20 or y-z=-4 gives -2-z=-4 so z=2
Then x-y+2z=7 gives x+2+4=7 so x=1

THERE WAS NO NEED TO MAKE THE REMAINING CALCULATIONS BELOW
UNLESS YOU JUST WANT TO PRACTICE.
ONCE YOU HAVE FOUND ONE VALUE, YOU ONLY NEED SUBSTITUTE IT BACK TO GET THE OTHERS.

(2x+3y-z=-6)2====> 4x+6y-2z=-12
===2nd equation===> x-y+2z=7
-------------------
5x+5y=-5

2x+3y-z=-6
-x+2y+z=-3
------------
x+5y=-9

Solve for x
-1(x+5y=-9)==>-x-5y=9
============>5x+5y=-5
----------------
4x=4
x=1

plug both x and y into one of the original 3 equations to solve for z

x-y+2z=7 ===> 1-1+2z=7
===========> 2z=7
===========z=7/2

check with another equation

2x+3y-z=-6 ===> 2(1)+3(1)-(7/2)=-6
=============> 5-(7/2)=-6
===============3/2=6 which is Wrong!!

Can someone help me see where I am going wrong?
Wilmer's method is very good.
You could do the same for y or z
and easily find the 3rd by substituting.