6. Four spheres are placed inside a cone, each touching each other (externally) and the lateral surface of the cone. Three of the spheres have a radius of 3 and also touch the base of the cone. Find the radius of the fourth sphere if the angle between the slant height and the base of the cone is $\frac{\pi}{3}$.
Answer: $9-4 \sqrt{2}$.

![](https://cdn.mathpix.com/cropped/2024_05_06_66368caef28b3de8e403g-21.jpg?height=471&width=417&top_left_y=798&top_left_x=891)

Solution. Let $O_{1}, O_{2}, O_{3}, O_{4}$ be the centers of the spheres, $r$ be the radius of the fourth sphere, $BO$ be the height of the cone, and $D$ be the projection of $O_{1}$ onto $BO$. The diagram shows a part of the cross-section of the cone by the plane $BOO_{1}$. Note that $DO_{1}=2 \sqrt{3}$, which is the radius of the circumcircle of the equilateral triangle $O_{1} O_{2} O_{3}$ with side length 6. Additionally,

$$
CO_{1}=\sqrt{O_{1} O_{4}^{2}-CO_{4}^{2}}=\sqrt{(r+3)^{2}-(r-3)^{2}}=2 \sqrt{3 r}
$$

Since $\angle BO_{4} N=\pi-\angle NO_{4} D=\angle CO_{1} D=\frac{\pi}{3}$, we get

$$
2 \sqrt{3 r} \cos \frac{\pi}{3}+(r-3) \sin \frac{\pi}{3}=2 \sqrt{3}
$$

(in the left part, we have the sum of the projections of segments $O_{1} C$ and $O_{4} C$ onto $O_{1} D$, so this formula is valid even in the case $r<3$). Then

$$
\sqrt{3 r}+(r-3) \frac{\sqrt{3}}{2}-2 \sqrt{3}=0 \Longleftrightarrow r+2 \sqrt{r}-7=0 \Longleftrightarrow r=(-1+\sqrt{8})^{2}=9-4 \sqrt{2}
$$

## Variant 6