# Homework Help: Equation of a sphere in XYZ coordinates

1. Sep 9, 2016

### ReidMerrill

1. The problem statement, all variables and given/known data
Show that the equation represents a sphere, and find its center and radius.

3x2+3y2+3z2 = 10+ 6y+12z

2. Relevant equations

3. The attempt at a solution
3x2+3y2-6y +3z2 -12z =10

My equation is how the constants in-front of the squared terms affect the sphere formula? Besides that I should be completing the square for the Y and Z terms right?

2. Sep 9, 2016

### Staff: Mentor

What is the formula for the equation of a sphere? That would have been good to put in the Relevant equations section.
Yes.

3. Sep 9, 2016

### ReidMerrill

The formula of a sphere is
R2=(X-X0)2 +(Y-Y0)2 +(Z-Z0)2

So I tried working further and eventually got to
3Y2-6y=10
(Y-1)2 =13/3

3Z2-12Z =13/3
(Z-6)2=37.44
3X2 +(Y-1)2+(Z-6)2= 37.44
so R2=37.44 and R=6.12

4. Sep 9, 2016

### Ray Vickson

Your "equations" $3Y^2-6y=10$, $(Y-1)^2 = 13/3$, etc., are meaningless in this problem. You are trying to find constants $a, b, r$ so that the equation
$$3 x^2+3 y^2 + 3 z^2 -6y - 12z - 10 = 0$$
becomes
$$3 x^2 + 3 (y-a)^2 + 3 (z-b)^2 - r^2 = 0$$
The second equation must hold for ALL values of $x,y,z$ that satisfy the first equation, and vice-versa.

5. Sep 11, 2016

### vela

Staff Emeritus
You shouldn't drag the constant term from the original equation along. Instead, you can say
\begin{align*}
3y^2 - 6y &= 3(y^2-2y)\\
&= 3[(y^2-2y+1)-1]\\
&= 3(y-1)^2 - 3.
\end{align*} Note that $3y^2-6y=3(y-1)^2-3$ holds for all y whereas the equation you started with, $3y^2-6y=10$, doesn't. (Also, don't use y and Y interchangeably. It's sloppy and incorrect.)

The original equation can then be rewritten as
\begin{align*}
3x^2 + (3y^2 - 6y) + (3z^2-12z) &= 10 \\
3x^2 + [3(y-1)^2 - 3] + (3z^2-12z) &= 10 \\
3x^2 + 3(y-1)^2 + (3z^2-12z) &= 13
\end{align*}

You should check your work in completing the square. I don't get (z-6)^2.