Haidao Suanjing/Examples/Example 1

Example of Problem from by

 * What is the size of a square inscribed in the corner of a right-angled triangle to touch the hypotenuse?

Solution
Let the lengths of the legs of the given right-angled triangle be $a$ and $b$.

Then the length of the side of the inscribed square is $\dfrac {a b} {a + b}$.

Proof
Let $x$ be the length of the side of the inscribed square be $x$.

, let $a < b$.

Let the right-angled triangle be half of a rectangle whose sides are of length $a$ and $b$.

Let the rectangle be dissected along the straight lines shown.


 * Square-in-right-triangle-haidau.png

Let the pieces of the dissection be assembled into a rectangle whose sides are of length $a + b$ and $x$.

Then we have:


 * $a b = x \paren {a + b}$

and the result follows.