4. (13 points) The lateral edges of a triangular pyramid are pairwise perpendicular, and the sides of the base are equal to $\sqrt{85}$, $\sqrt{58}$, and $\sqrt{45}$. The center of the sphere that touches all the lateral faces lies on the base of the pyramid. Find the radius of this sphere.
Answer: $\frac{14}{9}$.

Solution. Let the base of the pyramid be $A B C$, the apex of the pyramid be $D$, the center of the sphere be $O$, and the radius of the sphere be $r$. Let $A B=\sqrt{45}, B C=\sqrt{85}, A C=\sqrt{58}$. Denote $A D=x, B D=y, C D=z$.

Since the radius drawn to the point of tangency of the sphere and the plane is orthogonal to the plane, we have:

$$
\begin{gathered}
V_{A B C D}=V_{A B D O}+V_{B C D O}+V_{A C D O}= \\
=\frac{1}{3} S_{A B D} \cdot r+\frac{1}{3} S_{B C D} \cdot r+\frac{1}{3} S_{A C D} \cdot r= \\
=\frac{1}{3} r\left(\frac{1}{2} x y+\frac{1}{2} y z+\frac{1}{2} x z\right)
\end{gathered}
$$

On the other hand, since the lateral edges are pairwise perpendicular, we have

$$
V_{A B C D}=\frac{1}{6} x y z
$$

Therefore,

$$
r=\frac{x y z}{x y+y z+x z}
$$

The numbers $x, y, z$ are found from the system of equations: $\left\{\begin{array}{l}x^{2}+y^{2}=45, \\ x^{2}+z^{2}=58, \\ y^{2}+z^{2}=85 .\end{array}\right.$

Adding the equations of the system and dividing by two, we get: $x^{2}+y^{2}+z^{2}=94$, from which $x^{2}=9, y^{2}=36, z^{2}=49$. Using formula (4), we find $r=\frac{3 \cdot 6 \cdot 7}{3 \cdot 6+3 \cdot 7+6 \cdot 7}=\frac{14}{9}$.

Grading criteria. Full solution 13 points. Arithmetic errors that do not affect the meaning of the solution: minus 1 point for each. Equation (1) written 2 points. Expression (2) for the volume of the pyramid obtained - another 4 points (a total of 6 points). Equation (3) written 2 points. System of equations written and solved: 4 points (only written - 2 points).