A square is inscribed in a right triangle, as shown below. The legs of the triangle are 1 and 3. Find the area of the square.
Triangles CDE and EFB are similar
So
CD / DE = EF / FB
(1 - x) / x = x / (3 - x) cross-multiply
(3 - x) ( 1 -x) = x^2
x^2 - 4x + 3 = x^2
-4x + 3 = 0
3 = 4x
x = 3/4
Area of square = x^2 = (3/4)^2 = 9 / 16
Notice something kinda' neat
Side of square = x = (product of legs) / (sum of legs) = (3 * 1) / ( 3 + 1) = 3 / 4