Writting the equation of a sphere?(2 questions) How can I write the equation of a sphere that is centered at the triple point P$(2,4,-4)$ and passes through the origin.
I think I get the how to write the left hand side of the equation which is.
$(x-2)^2+(y-4)^2+(z+4)^2=$ 
but I am not sure what the radius would be I know origin is (0,0,0) so do I use the distance formula.
My second question is how do I write the equation of a sphere that fits the following. THe line segment that  joins P(0,4,2) TO Q (6,0,2) is a diamter.
So I know I can use midpoint formula to find x,y,and z but how would I find the radius to have the complete formula.
 A: Your problem seems to be finding radii.  The radii can always be found, at least in cases liked these, via the distance formula.  In the first case, since $(0, 0, 0)$ is on the sphere centered at $(2, 4, -4)$, the radius must be $\sqrt{(2 - 0)^2 + (4 - 0)^2 + (-4 - 0)^2} = \sqrt {36} = 6$.  Then the equation this sphere is
$(x - 2)^2 + (y -4)^2 + (z + 4)^2 = 36. \tag{1}$
For the second sphere, the center is $\frac{1}{2}((0, 4, 2) + (6, 0, 2)) = (3, 2, 2)$.  The radius is given by the distance from the center to either endpoint of the diameter, so it is
$\sqrt{3^2 + 2^2 + 0^2} = \sqrt {13}$.  Then the second sphere is given by
$(x - 3)^2 + (y -2)^2 + (z -2)^2 = 13. \tag{2}$
Hope this helps.  Cheers,
and as always,
Fiat Lux!!!
A: Since the sphere is centered at $(2, 4, -4)$ and passes through the origin, the distance from the origin to this point must be the radius $a$ of the sphere:
$$a = \sqrt{(2-0)^2 + (4-0)^2 + (-4 - 0)^2} = 6.$$
Then the equation of the sphere is simply:
$$(x-2)^2 + (y-4)^2 + (z+4)^2 = a^2 = 36.$$
For the second question, the midpoint is indeed the center of the sphere:  $(3,2,2)$.  The radius is the length from the center to one of the points:  $a = \sqrt{(6-3)^2 + (0-2)^2 + (2-2)^2} = \sqrt{13}$.
Then your equations is straightforward:
$$(x-3)^2 + (y-2)^2 + (z-2)^2 = 13.$$
A: You say that for the right value of $a$, the equation of the sphere is
$$(x-2)^2+(y-4)^2+(z+4)^2= a.$$
You also say that $(0,0,0)$ is a point on the sphere. This means that $x=0$, $y=0$, $z=0$ must satisfy the equation, that is
$$(0-2)^2+(0-4)^2+(0+4)^2= a.$$
There's your $a$!
