Write an equation for a sphere passing through a circle and tangent to a plane I'm trying to solve this task:
'''Write an equation for a sphere passing through a circle $x^2 + y^2 = 11$ and tangent to a plane $x + y + z - 5 = 0$.'''
Center of the sphere should moves only in axis Z, so it has coordinates $(0, 0, \alpha)$. I also found that
$\alpha^2 = R^2 - 11$, where R - radius of a sphere.
I came to this system:

*

*$x_0^2 + y_0^2 + (z_0 - \sqrt(R^2 - 11))^2 = R^2$

*$x_0 + y_0 + z_0 = 5$
where $x_0, y_0, z_0$ are coordinates of a touch point of a sphere with the plane.
The correct answer is two spheres:
$x^2 + y^2 + (z + 1)^2 = 12$
$x^2 + y^2 + (z + 4)^2 = 27$
I can't figure out how to find these two values of the parameter $\alpha$. Could somebody please explain how to do it?
Thanks in advance.
 A: A hint, not a solution: I would assume that you know that in a point where the plane touches the sphere, the normal vector to the plane (which is $\frac{(1,1,1)^T}{\sqrt{3}}$) is parallel to the vector from the center of the sphere to the point where the sphere touches the plane (the normal to the sphere is parallel to the normal of the plane, when the plane is tangent to the sphere).
So if $(0,0, \alpha)$ is the center of the sphere, either
$(0,0,\alpha) + R\frac{(1,1,1)}{\sqrt{3}}$ or $(0,0,\alpha) - R\frac{(1,1,1)}{\sqrt{3}}$ is a point in the plane. In other words, either
$$\alpha + \sqrt{3}\,R = 5 $$
or
$$\alpha - \sqrt{3}\,R = 5 $$
Solve this for $R$ and plug the result into $\alpha^2 = R^2 -11$.
This will allow you to find $\alpha$ (and then $R$).
A: If the center of the sphere is $(x_0, y_0, z_0)$, and its radius is $R$ then
its equation is
$ (x - x_0)^2 + (y - y_0)^2 + (z - z_0)^2 = R^2 $
Set $z = 0 $ , then you get
$ (x - x_0)^2 + (y - y_0)^2 + z_0^2 = R^2 $
Comparing this with $ x^2 + y^2 = 11 $ we deduce that $x_0 = y_0 = 0 $ and
$ 11 = R^2 - z_0^2 $
Since the sphere is tangent to $ x+ y+z = 5 $, then the distance of the center which is (0, 0, z_0) to the plane is equal to $R$ , thus
$ R = \dfrac{| 0 + 0 + z_0 - 5 |} {\sqrt{3}} $
Squaring
$ R^2 = \dfrac{(z_0 - 5)^2}{3} $
Thus
$ 11 + z_0^2 = \dfrac{(z_0 - 5)^2 }{3} $
So that,
$ 33 + 3 z_0^2 = z_0^2 - 10 z_0 + 25 $
From which,
$ 2 z_0^2 + 10 z_0 + 8 = 0 $
Dividing through by $2$,
$ z_0^2 + 5 z_0 + 4 = 0 $
Factoring,
$ (z_0 + 4)(z_0 + 1) = 0 $
Therefore, $z_0 = -4$ or $z_0 = -1$, and corresponding to that,
$R^2 =  27 $ or $ R^2 = 12 $
And the equations of the two spheres are
$ x^2 + y^2 + (z + 4)^2 = 27 $
and
$ x^2 + y^2 + (z + 1)^2 = 12 $
