Let's denote the length of the shorter leg as x.
Given:
Length of the longer leg = x + 1 cm
Length of the hypotenuse = 5 cm
According to the Pythagorean theorem, in a right triangle, the sum of the squares of the lengths of the two shorter sides is equal to the square of the length of the hypotenuse.
Using this information, we can set up the following equation:
x^2 + (x + 1)^2 = 5^2
Simplifying the equation:
x^2 + (x^2 + 2x + 1) = 25
x^2 + x^2 + 2x + 1 = 25
2x^2 + 2x + 1 - 25 = 0
2x^2 + 2x - 24 = 0
Dividing the equation by 2 to simplify:
x^2 + x - 12 = 0
Now we can solve this quadratic equation by factoring or using the quadratic formula. In this case, let's factor the equation:
(x + 4)(x - 3) = 0
Setting each factor equal to zero:
x + 4 = 0 or x - 3 = 0
If x + 4 = 0, then x = -4 (which is not a valid solution for a length)
If x - 3 = 0, then x = 3
Therefore, the length of the shorter leg (x) is 3 cm and the length of the linger leg (x+1) is 4 cm.