6. Three spheres of radius $r$ are placed inside a cone with height 4 and slant height 8. They touch each other (externally), the lateral surface of the cone, and the first two spheres touch the base of the cone. Find the maximum value of $r$.
Answer: $\frac{12}{5+2 \sqrt{3}}$.
![](https://cdn.mathpix.com/cropped/2024_05_06_66368caef28b3de8e403g-09.jpg?height=486&width=1284&top_left_y=258&top_left_x=448)

Solution. Let $O_{1}, O_{2}, O_{3}$ be the centers of the spheres, $A$ be the point of tangency of the first two, $PO$ be the height of the cone, and $B$ be the projection of $O_{1}$ onto $PO$. On the left diagram, part of the section of the cone by the plane $POO_{1}$ is shown, and on the right - the section by the plane $POA$. Note that $AO_{3}=r \sqrt{3}$ as the height of the equilateral triangle $O_{1}O_{2}O_{3}$ with side $2r$. Additionally, $\sin \angle PFO=\frac{PO}{PF}=\frac{1}{2}$, from which $\angle PFO=\frac{\pi}{6}, OF=4 \sqrt{3}$, and

$$
BO_{1}=EO=4 \sqrt{3}-EF=4 \sqrt{3}-r \operatorname{ctg} \frac{\pi}{12}=4 \sqrt{3}-r \cdot \frac{1+\cos \frac{\pi}{6}}{\sin \frac{\pi}{6}}=4 \sqrt{3}-r(\sqrt{3}+2)
$$

Let $\alpha$ be the angle between $AO_{3}$ and the perpendicular $AD$ to the segment $PN$, and $AC \| MN$ (see the right diagram). Then $AD=r+AO_{3} \cos \alpha=r\left(1+\sqrt{3} \cos \alpha\right)$. The height $BA$ of the isosceles triangle $BO_{1}O_{2}$ is $\sqrt{BO_{1}^{2}-r^{2}}=\sqrt{(4 \sqrt{3}-r(\sqrt{3}+2))^{2}-r^{2}}$, so it decreases as $r$ increases. Since $BO=r$, the length $BC$ also decreases as $r$ increases. Therefore, the expressions $AD=\frac{1}{2}(AB+BC)$ and $\cos \alpha=\frac{AD-r}{r \sqrt{3}}$ will also decrease with respect to $r$. Thus, the maximum value of $r$ will be achieved at the largest $\alpha$, which occurs when the sphere with center at $O_{3}$ is either inscribed in the cone or touches its base. Let's consider these cases.

1) If the sphere with center at $O_{3}$ is inscribed in the cone, then $O_{1}O_{3} \| PF$, from which $BO_{1}=2r \cos \frac{\pi}{6}=r \sqrt{3}$ (see the left diagram). Then $4 \sqrt{3}-r(\sqrt{3}+2)=r \sqrt{3}$, so $r=\frac{2 \sqrt{3}}{\sqrt{3}+1}=3-\sqrt{3}$.
2) If the sphere with center at $O_{3}$ touches the base of the cone, then point $B$ is the center of the equilateral triangle $O_{1}O_{2}O_{3}$, from which $BO_{1}=\frac{2r}{\sqrt{3}}$. Therefore, $4 \sqrt{3}-r(\sqrt{3}+2)=\frac{2r}{\sqrt{3}}$, so $r=\frac{12}{5+2 \sqrt{3}}>3-\sqrt{3}$.

Thus, the maximum $r$ is achieved in the second case and is equal to $\frac{12}{5+2 \sqrt{3}}$.

## Variant 3