Square Inscribed in a Right-angled Triangle by LIU Hui (劉徽)

LIU Hui's (劉徽 circa 3rd century) method of finding the side of a square inscribed in a right-angled triangle in his commentary on Problem 15 in Chapter 9 of the ancient Chinese mathematical treatise Jiu Zhang Suan Shu (九章算術 The Nine Chapters on the Mathematical Art).