The median of a right triangle, drawn to the hypotenuse, divides it into two triangles with perimeters $m$ and $n$. Find the sides of the triangle.

#
Compose a system of equations with respect to the legs of a triangle, considering that the specified median is half the hypotenuse.

## Solution

Let $x$ be the median drawn to the hypotenuse. Then the hypotenuse is $2x$, and the legs are $m-2x$ and $n-2x$.

By the Pythagorean theorem, $4x^{2}=(m-2x)^{2}+(n-2x)^{2}=m^{2}+n^{2}-4x(m+n)+8x^{2}$.

From this quadratic equation (considering that $2x < m+n$), we find that $2x = n + m - \sqrt{2mn}$.

![](https://cdn.mathpix.com/cropped/2024_05_06_96d74c2697cd905bd948g-03.jpg?height=343&width=780&top_left_y=1329&top_left_x=639)

## Answer

$\sqrt{2mn} - m, \sqrt{2mn} - n, n + m - \sqrt{2mn}$.