# Tangent plane to 3 spheres

Given 3 spheres of radius 9 with center at the points $$P = (2,1,0)$$, $$Q = (5,4,0)$$ and $$R = (3, 1, 2)$$. Find the equation, $$ax + by + cz = d$$, of a plane tangent to the 3 spheres.

I calculated the gradients of the three spheres, I think that if we find a vector (gradient) in common to the three spheres then there is a tangent plane in that point, but I came to the conclusion that there is no normal vector at the same point of the three spheres, there is no tangent plane to the three spheres?

• Since the radii of all spheres are equal you need only to correctly choose $d$. Actually it should be two such planes. I assume you are able to find the equation of the common plane for three non-collinear points.
– user
Oct 22, 2023 at 19:52
• In general case, there might be more than two such planes, if the distances between the three points are larger than the radius. Oct 22, 2023 at 19:54
• Find the plane through the three centers, then translate it by 9 perpendicular to itself. Oct 22, 2023 at 20:49
• For a yet another approach check this post. Oct 22, 2023 at 21:04

Given a sphere $$S_k$$ and a plane $$P$$

$$\cases{ S_k\to (x-x_k)^2+(y-y_k)^2+(z-z_k)^2=r_k^2\\ P\to a x + b y + c z = d }$$

if $$P$$ and $$S_k$$ are tangent then eliminating $$z$$ we arrive at

$$2 c z_k (a x+b y)+(a x+b y)^2+c^2 \left((x-x_k)^2+(y-y_k)^2+z_k^2-r_k^2\right)+d^2=2 d (a x+b y+c z_k)$$

Solving for $$y$$ we have

$$y = \frac{p_{1k}(x)\pm\sqrt{p_{2k}(x)}}{b^2+c^2}$$

but as $$S_k$$ and $$P$$ are tangent we have necessarily

$$p_{2k}(x) = 2 d (a x+b y_k+c z_k)-a^2 x^2-2 b y_k (a x+c z_k)+c \left(-2 a x z_k+c (r+x-x_k) (r-x+x_k)-c z_k^2\right)+b^2 \left(r^2-(x-x_k)^2-y_k^2\right)-d^2=0$$

now solving for $$x$$ we have

$$x = \frac{q_{1k}(x)\pm\sqrt{q_{2k}(x)}}{a^2+b^2+c^2}$$

again due to tangency necessarily we have

$$q_{2k}(x) = (a x_k + b y_k + c z_k - d)^2-(a^2 + b^2 + c^2) r_k^2 = 0$$

Choosing now $$a^2 + b^2 + c^2=1$$ we have

$$\cases{ (a x_k + b y_k + c z_k - d)^2-r_k^2 = 0, \ \ k = (1,2,3)\\ a^2 + b^2 + c^2=1 }$$

four equations and four unknowns $$(a,b,c,d)$$ and solving this equation system, we will obtain the sought planes. Attached a plot showing the case

$$\cases{ S_1\to\ p_1 = (5,0,-1), \ r_1 = 3\\ S_2\to\ p_2 = (-4,-2,2), \ r_2 = 6\\ S_3\to\ p_3 = (8,-5,-7), \ r_3 = 5\\ }$$

We have vector $$PQ=(2-5,1-4, 0-0)=(-3.-3, 0)$$

$$PR=92-3,1-1,0-2)=(-1, 0, -2)$$

The normal of the required plane is a cross product of these two vectors. We take a point for example $$P=(2, 1, 0)$$ and use the following equation:

$$\begin{vmatrix}x-2&y-1&x-0\\-3&-3&0\\-1&0&-2\end{vmatrix}=0$$

which finally gives the equation of the plane passing three points as:

$$2x-2y-z=2$$

Now suppose the coordinates of a point like A at distance 9(the radius of sphere ) is $$A=(x_1, y_1, z_1)$$, so we must have:

$$d=9=\frac{2\cdot x_1+(-2)y_1+(-1)z_1-2}{\sqrt{2^2+(-2)^2+(-1)^2}}$$

Which finally gives:

$$2x_1-2y_1-z_1-29=0$$

This is the required equation.