Quadratic equations in early Baghdad

In the 8th century (CE) Baghdad was a new city with a lively culture. The 'father of algebra', al-Khwarizmi, lived there. He wrote a book called "al-jabr wa'l muqabala" from which we get the word 'algebra'. In his book he solved equations such as . However he didn't have the notation we now use. Instead, he stated this problem as: "A square and ten roots are equal to thirty-nine dirhems", in Arabic of course, not in English! He outlined a method (now called an algorithm, after him) in Arabic text accompanied by a diagram like the one below.
Can you figure out the link between the equation and the numbers in the diagram? How does al-Khwarizmi's problem relate to the geometry in the diagram? Use the sliders to consider similar problems. Do you think this is a helpful way to think of quadratic equations? Find out more about al-Khwarizmi and his work on the web ...