# How do you find the right triangle of maximum area if the sum of the lengths of the legs is 5?

Jun 7, 2015

Call x and y the 2 legs.

Area of the right triangle: $s = \frac{x . y}{2}$

Given: x + y = 5 --> y = 5 - x

Then, $s = \frac{x}{2} \left(5 - x\right) = - \left(\frac{1}{2}\right) \left({x}^{2} - 5 x\right)$

s maximum when the derivative s' = 0 -> 2x - 5 = 0 -->$x = \frac{5}{2}$.

The area is max when both legs are equals.$x = y = \frac{5}{2}$

$s \max = \left(\frac{1}{2}\right) \left(\frac{5}{2}\right) \left(\frac{5}{2}\right) = \frac{25}{8}$

Check:

When x = 2, y = 3, the area is $s = \frac{2 \left(3\right)}{2} =$ 3
When x = 1, and y = 4, the area is $s = \left(\frac{1}{2}\right) \left(4\right) = 2$