Example 17. In a right-angled triangle, from the vertex of the right angle, a height and a median are drawn. The ratio of their lengths is $40: 41$. Find the ratio of the lengths of the legs.

Given (Fig. 19): $\triangle A B C, \widehat{A C B}=90^{\circ},[C K]-$ height, $[C M]-$ median, $|C K|:|C M|=40: 41$.

To find: $|A C|:|B C|$.
Solution. Introduce an auxiliary parameter, setting $|C K|=h$. Then $|C M|=\frac{41 h}{40}$. We will find the desired ratio by direct calculation.

From the right triangle $C M K$ we have: $|M K|=\frac{9 h}{40}$, and since $[C M]$ is the median of the right triangle $A B C$, then $|A M|=|B M|=|C M|=\frac{41 h}{40}$.

![](https://cdn.mathpix.com/cropped/2024_05_21_318d1c34bf6979fc9790g-033.jpg?height=376&width=639&top_left_y=1945&top_left_x=343)

Fig. 19

![](https://cdn.mathpix.com/cropped/2024_05_21_318d1c34bf6979fc9790g-033.jpg?height=417&width=679&top_left_y=1893&top_left_x=1017)

Fig. 20

32

Next,

$$
|A K|=\frac{41 h}{40}-\frac{9 h}{40}=\frac{32 h}{40} \text { and }|B K|=\frac{41 h}{40}+\frac{9 h}{40}=\frac{50 h}{40} .
$$

Since

$$
|A C|^{2}=|A B| \cdot|A K| \text { and }|B C|^{2}=|A B| \cdot|B K| \text {, }
$$

then $\frac{|A C|^{2}}{|B C|^{2}}=\frac{|A B| \cdot|A K|}{|A B| \cdot|B K|}=\frac{|A K|}{|B K|}=\frac{16}{25}$.

Thus, $|A C|:|B C|=4: 5$.

Remark. The auxiliary parameter can also be introduced as follows: $|C K|=40 t$. Then, since $|C K|:|C M|=40: 41$, we have $|C M|=41 t$ and, further, $|M K|=9 t,|A B|=41 t,|A K|=32 t,|B K|=50 t$.