# I'm trying to understand how (X2 -6x + _) fills as (X2 -6x + 9), also, how (2 + 9 + 1/4 + 9/4) is somehow (X-3)2+ (Y +1/2)2+ (Z - 3/2) and = 54/4This is regarding the formula Center = C (Xc, Yc,...

I'm trying to understand how (X**2** -6x + _) fills as (X**2** -6x + 9), also, how (2 + 9 + 1/4 + 9/4) is somehow (X-3)**2**+ (Y +1/2)**2**+ (Z - 3/2) and = 54/4

This is regarding the formula Center = C (Xc, Yc, Zc), I have no idea how this works, I got X**2**+ Y**2**+ Z**2**-6X + Y - 3Z - 2 = 0, my teacher showed me that turns into (X**2**- 6x + 9) + (Y**2**+ Y + 1/4) + (Z**2**- 3z + 9/4) and then he showed me that it turns into 2 + 9 + 1/4 + 9/4, I got all of it aside from the filling up part where the teacher added "9", "1/4" and "9/4", I have no idea how that works out. Then, turned those "2 + 9 + 1/4 + 9/4" into (X - 3)**2**+ (Y + 1/2)**2**+ (Z - 3/2)**2**, I have no idea how made that twist, and I also have no idea how that equals 54/4.

*print*Print*list*Cite

### 1 Answer

This process is called solve by completing the square. All you need to to is rewrite the equation so you will create a complete square that you can write as one term.

For example:

We have the equation:

x^2 + 2x + 7 = 0

We need to rewrite as a completer square.

You will use (x^2 + 2x) and complete the square.

Then you will need to add the coefficient of x /2 which is2/2 = 1

You will also need to add 1 to the left side so the equality remains the same.

Then we will add 1 :

==> x^2 + 2x + 1 + 7 = 1

==> Now we can write the first three terms as a completer square.

==> (x+1)^2 + 7 = 1

Now we will subtract 1 from both sides.

==> (x+1)^2 + 6 = 0

Then we conclude that:

x^2 + 2x +7 = (x+1)^2 + 6

Now we will try and solve the examples yoy provided.

x^2 + y^2 + z^2 -6x + y -3z -2 = 0

First we will group terms with the same letter.

==> (x^2 -6x) + (y^2 +y) + (z^2 -3z) -2= 0

Now we will complete the square for each term

For (x^2 -6x) we will add (6/2)^2 = 3^2 = 9 to both sides.

For (y^2 +y) we will add (1/2)^2 = 1/4 to both sides

For (z^2 -3z) we will add (3/2)^2 = 9/4 to both sides.

==> (x^2 - 6x +9) + (y^2+y +1/4) + (z^2 - 3z + 9/4) -2 = 9 + 1/4 + 9/4

==> Now we will rewrite as a complete squares.

==> (x-3)^2 + (y+1/2)^2 + (z-3/2)^2 -2 = 9+ 10/4

==> (x-3)^2 + (y+1/2)62 + (x-3/2)^2 = 9 + 10/4 + 2

**==> (x-3)^2 + (y+1/2)^2 + (x -3/2)^2 = 54/4 = 27/2**