# The perimeter of a right triangle is 5 cm. One of the legs is 1 cm larger than the other leg

**The perimeter of a right triangle is 5 cm. One of the legs is 1 cm larger than the other leg. Find the legs of the triangle.**

Let’s denote by x the length of the smaller leg of this right-angled triangle.

From the condition of the problem it is known that one of the legs of this right-angled triangle is 1 cm larger than its other leg, therefore, the length of the larger leg is x + 1 cm.

It is also known that the perimeter of this right-angled triangle is 5 cm, therefore, the hypotenuse of this triangle is 5 – x – (x + 1) = 5 – x – x – 1 = 4 – 2x.

Using the Pythagorean theorem, we can compose the following equation:

x ^ 2 + (x + 1) ^ 2 = (4 – 2x) ^ 2.

We solve the resulting equation:

x ^ 2 + x ^ 2 + 2x + 1 = 16 – 16x + 4x ^ 2;

16 – 16x + 4x ^ 2 – 2x ^ 2 – 2x – 1 = 0;

2x ^ 2 – 18x + 15 = 0;

x = (9 ± √ (81 – 2 * 15)) / 2 = (9 ± √51) / 2;

x1 = (9 + √51) / 2;

x2 = (9 – √51) / 2.

Since at x = (9 + √51) / 2 the length of the hypotenuse 4 – 2x = 4 – 9 – √51 = -5 – √51 turns out to be negative, then this value of x is not suitable.

We find the length of the second leg:

x + 1 = (9 – √51) / 2 + 1 = (11 – √51) / 2.

Answer: the lengths of the legs are (9 – √51) / 2 cm and (11 – √51) / 2 cm.