# Completing the square of an equation with multiple variables/coefficients

1. Mar 14, 2007

### pugfug90

:tongue: 1. The problem statement, all variables and given/known data
For example, 3x^2 + 7x + 3y^2 -6y +3z^2 + 2z - 12..

2. Relevant equations

3. The attempt at a solution
On the quiz..
I first did it by..
(3x^2 + 7x + __) + (3y^2 - 6y + __) + (3z^2 + 2z + __) = 12
..
3(x^2 + 7x/3 + __) + 3(y^2 - 2y + __) + 3(z^2 + 2z/3 + __) = 12
..
3(x^2 + 7x/3 + 49/12) + 3(y^2 - 2y + 3) + 3(z^2 + 2z/3 + 1/3) = 12 + 49/12 + 3 + 1/3 = 19.42
(x+7/6)^2 + (y-1)^2 + (z-1/3)^2=19.42=233/12
Yeah.. I don't really know what to do with the 3s so I kind of ignored them.. Obviously I just divide by 3?..
==========
I redid the problem like..
3[(x^2+7x/3+__) + (y^2-2y+__)..etc
You get the deal..
Then I divided 12/3=4 and then yeah got answer to be 233/36.[real answer]

K. NOW to the problem:tongue: What if it were say.. 3x^2 +5x +7y^2 blah blah.. Anyone know how to complete the square of a equation with multiple variables/coefficients?

Last edited: Mar 14, 2007
2. Mar 14, 2007

### drpizza

There's really no reason that I can think of to "get rid of" those 3's at the end, except perhaps if you're trying to put an equation into a standard form. Since each of your variables squared terms had a 3 on them, you could have quickly divided out 3 on the first step from both sides of the equation.

You made the most common mistake on these types of problems... allow me to illustrate with an example.
x^2 + 6x = 10
would become x^2 + 6x + 9 = 10 + 9

However, if we had a coefficient on the x^2 term...
3x^2 + 18x = 10
3 (x^2 + 6x) = 10
when you complete the square, it should be 3(x^2 + 6x +9) = 10 + 27

You may have written down a 9 on the left side, but in reality, you added 27 to the left side. Multiply it out to see.
Before: 3x^2 + 18x
Now, after you inserted that 9:
3x^2 + 18x + 27

That 3 that was factored out gets distributed to the 9. I wouldn't go so far as to suggest you always get rid of those factors first, before completing the square, but this isn't always possible (as in the case ofwriting the equation of an ellipse in standard form.)

Last edited: Mar 14, 2007
3. Mar 14, 2007

### pugfug90

3(x^2 + 6x +9) = 10 + 27
Yes I get that..
Then
(x^2 + 6x +9) =37/3
(x+3)^2=37/3

But.. what if I get

3x^2 + 18x + 5 y^2 + 7x = 10

yeah..

4. Mar 14, 2007

### HallsofIvy

3(x2+ 6x)+ 5(y^2+ (7/5)x)= 10

6/2= 3 and 32= 9 so add 9 inside the parentheses for the x part.

(7/5)/2= 7/10 and (7/10)2= 49/100 so add 49/100 inside the parentheses for the y part.

3(x2+ 6x+ 9)+ 5(y^2+ (7/5)x+ 49/100)= 10+ 3(9)+ 5(49/100)

3(x+ 3)2+ 5(y+ 7/10)2= 37+ 49/20= 789/20

(That's the equation of an ellipse.)

5. Mar 14, 2007

### Corkery

i don't mean to ask a stupid question nor interrupt but how would you type an exponent. Ive looked all over Microsoft word and other places but can't seem to find it.

6. Mar 14, 2007

### HallsofIvy

Either x [ sup ]2 [/ sup ] (without the spaces) or LaTex: [ tex] x^2 [ / tex], again, withoiut the spaces.

7. Mar 14, 2007

### Corkery

thanks. That really helps a lot because I'm new to the forums.

so 2x^ woulod 2x squared? and if that is correct then what is cubed and an exponent to the fourth power typed?

thanks,
corkery

Last edited: Mar 15, 2007
8. Mar 15, 2007

### pugfug90

3(x+ 3)2+ 5(y+ 7/10)2= 37+ 49/20= 789/20

Ohhh.. So keep the coefficient out.. Ahha.. I can also distribute the coefficient back into the "thing" after I figure out the sum on the right though, right?

9. Mar 15, 2007

### drpizza

I'm not sure what you mean by "the thing".
Assuming you understand everything up to the point you're at in the post above, then if you wanted to put this equation of an ellipse into its standard form
$$\frac{(x-h)^2}{a^2}+\frac{(y-k)^2}{b^2}=1$$

then you'll want to multiply both sides by 20/789.

This is going to leave you with
$$\frac{60(x+3)^2}{789}+\frac{100(y+7)^2}{789}=1$$

That 3 and 5 are still out in front, as coefficients (although, now multiplied by 20)
This just needs a little tweaking to get rid of that 60 and 100 in the numerators. So, simply multiply the numerator and denominator of the first term by 1/60 and do the same for the second term with 1/100.
This gives:
$$\frac{(x+3)^2}{789/60}+\frac{(y+7)^2}{789/100}=1$$

Thus, the center of your ellipse is (-3,-7), and (as I refer to them conceptually), the x-radius is $$\sqrt{789/60}$$ and the y-radius is $$\sqrt{789/100}$$

Some teachers prefer that you leave the 60 and 100 coefficients in the numerator. This last step is merely to show you how to find the values of a and b.

Last edited: Mar 15, 2007