In a right triangle $A B C$, the leg $A B$ is 21, and the leg $B C$ is 28. A circle with center $O$ lying on the hypotenuse $A C$ touches both legs.

Find the radius of the circle.
Let $P$ be the point of tangency of the circle with the leg $B C$. Consider similar triangles $C P O$ and $C B A$.

## Solution

Let $R$ be the radius of the circle.

First method. Let $P$ be the point of tangency of the circle with the leg $B C$. From the similarity of triangles $C P O$ and $C B A$, it follows that ${ }^{28-R} /{ }^{R}=28 / 21$.

From this, $R=12$.

Second method. $S_{A O B}=1 / 2 A B \cdot R=21 R / 2, S_{C O B}=1 / 2 B C \cdot R=14 R$.

Since $S_{A O B}+S_{C O B}=S_{A B C}=1 / 2 A B \cdot B C=1 / 2 \cdot 21 \cdot 28$, we have the equation $21 R+28 R=21 \cdot 28$, from which $R=12$.

## Answer

12.