How do I find a plane that is tangent to two given spheres and passes through a given point? My problem is the following:
Given two spheres: $$(x-6)^2+(y-1)^2+(z+1)^2=1$$ and $$x^2+(y-5)^2+(z-4)^2=9$$ find a plane that is tangent to both of those spheres and passes through the point $$(5;2;0)$$
I tried plugging all the information in formulas but then I get a scary-looking system of equation which I don't know how to solve.
My problem book says that the correct answer is $$x+2y+2z-9=0$$ or $$y-2=0$$
Whatever I did I couldn't get the answer.
I would really appreciate any help.
Thanks in advance!
 A: $C_1(6,1,-1);\;r_1=1$
$C_2(0,5,4);\;r_2=3$
A generic plane $\pi$ has equation
$$\pi:ax+by+cz+d=0$$
The distance from the plane to the center of the spheres must be equal to the respective radius. Furthermore the plane must pass through $P(5,2,0)$
$$\begin{cases}
\frac{|6a+b-c+d|}{\sqrt{a^2+b^2+c^2}}=1\\
\frac{|5b+4c+d|}{\sqrt{a^2+b^2+c^2}}=3\\
5a+2b+d=0&\\
\end{cases}$$
$$\begin{cases}
(6 a+b-c+d)^2=\frac{1}{9} (5 b+4 c+d)^2\\
(6 a+b-c+d)^2=a^2+b^2+c^2\\
d=-5a-2b\\
\end{cases}$$
Two solutions $a=0,b=-d/2,c=0;\;a=-d/9,b=-2 d/9,c=-2 d/9$
Two planes
$-d/2 y + d = 0\to y-2=0$
$-d/9 x -2d/9 y -2 d/9 z + d=0 \to x+2 y+2 z-9=0$
A: Here is a solution that, IMHO, is in the spirit of the question.
Working on the expanded version of the spheres' equations, the generic equations of planes tangent to these spheres are resp.:
$$\begin{cases}xx_1+yy_1+zz_1-6(x+x_1)-(y+y_1)+(z+z_1)+37&=&0\\xx_2+yy_2+zz_2 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \  
 -5(y+y_2)-4(z+z_2)+32&=&0\end{cases}\tag{1}$$
where $(x_1,y_1,z_1)$ and $(x_2,y_2,z_2)$ are the contact points on the resp. spheres. Therefore, we have already the two equations
$$\begin{cases}x_1^2+y_1^2+z_1^2-12x_1-2y_1+2z_1+37&=&0\\x_2^2+y_2^2+z_2^2-10y_2-8z_2+32&=&0\end{cases}\tag{2}$$
for unknowns
$x_1,y_1,z_1,x_2,y_2,z_2$.
Let us express that the two equations (1) describe the same plane by writing the proportionality of coefficients of $x,y,z$ and constant terms in (1):
$$\dfrac{x_1-6}{x_2}=\dfrac{y_1-1}{y_2-5}=\dfrac{z_1+1}{z_2-4}=\dfrac{-6x_1-y_1+z_1+37}{-5y_2-4z_2+32}\tag{3}$$
yielding 3 more equations.
We have at present 5 equations for 6 unknowns. It is enough to obtain the general equation of a plane tangent to both $S_1$ and $S_2$ (remember that the equation of a plane is defined up to a multiplicative constant).
But we have the supplementary fact that $(5,2,0)$ verifies the two equations, giving two more equations!
$$\begin{cases}5x_1+2y_1-6(5+x_1)-(2+y_1)+z_1+37&=&0\\5x_2+2y_2-5(2+y_2)-4z_2+32&=&0\end{cases}\tag{4}$$
We are in the unusual situation of 7 (compatible, we wish so) equations for 6 unknowns...
I leave you the computations... that can be easily handled using a CAS (Computer Algebra System, which, honestly, is the future of this kind of tedious final computations).
