 Remember that in alchorismy, there are three types of important quadratics. x squared plus px equals q, square and sides equal number. x squared equals px plus q, square equal to sides and number. x squared plus q equals px, square and number equal to sides. We've already seen how alchorismy solved square and sides equal number. Now let's take a look at the other two quadratics. So alchorismy also looked at the problem a square and 21 is equal to 10 sides. And this is a square and number equal to sides. So again alchorismy gave a procedure. Take half the number of sides, 5, square this, 25, subtract the number, 4, take the square root, 2, then subtract from half the number of sides, 3, which is the solution. So let's look at this geometrically. So we have a square with an unknown side length. And we want to add 21 to it. So let's append a rectangle with an area of 21. And we'll make one side of the rectangle equal to the side of the square. So this is our square and 21 and it's supposed to equal 10 sides. In other words, the area of this figure is supposed to be equal to the area of a rectangle with 10 and height equal to the side of the unknown square. But since this figure is the height of the unknown square, that means its top length here must be 10. So alchorismy's first step is to take half the number of sides. And notice if we cut this top side in half, the two figures are equal. And since the figure on the left consists of a square and a rectangle, the figure on the right also consists of a square and a rectangle. And the top length of the remaining figure is 5. So if we rearrange our figure and keep in mind these squares are the same size. So remember, this is the figure that had area 21 rearranged. And it forms an incomplete square with the side of 5. The complete square has area 25 and the difference between what we have and the complete square is this little square here, which has an area of 4. And so its side length is 2, which means the unknown side has to have a length of 3. How about our third case? A square is equal to 3 of its sides and 4. So here we have a square equal to sides and number. Alchorismy gives the procedure, take half the number of sides, 1 and a half, square, 2 and a quarter, add to the number, 6 and a quarter, take the root, 2 and a half, and finally add to half the sides for the solution. So this one's a little bit different, because we have a square equal to 3 of its roots and 4. So we might begin with our square of unknown side, but this square is equal to a rectangle that's 3 wide and has the same side length as well as another rectangle equal to 4. So we might imagine this square to be composed of 2 pieces. So our bottom piece here corresponds to 3 of its roots. So it's the same width as the square, but a tight is 3. And this other figure has an area of 4. Now take half the number of sides, that's 1 and a half, so we'll cut our side and square it. And so this square has area 2 and a quarter. Now if we cut off from the remaining part a segment equal to the square, we can do a little rearranging of the pieces. And remember the area doesn't change, so this portion still has area 4. So if we add it to the square, we get the area of the complete square. And the square root will give us the entire side, 2 and a half. And finally if we restore our original square, we see that we can add 2 and a half and 1 and a half to get the side of the original square, 4. Now let's take a breather and consider our two cases, square and sides equal number, and square and number equal sides. In both cases, if we go through the geometric constructions, it should be clear that we can always reform the geometric operations, and that means we will always get a non-negative side length. But what about our third case? Since the solution requires us to cut off a part equal to the square, it should be clear that in some cases we can't perform the required geometric constructions. So it's possible this case has no solutions.