# Al Khwarizmi’s Identity and the Quadratic Formula

*algorithm*. His `completing-the-square’ technique lies at the heart of a beautiful formula that we call

*al Khwarizmi’s identity*. The usual quadratic formula is a consequence. In this article you

- will see how the completing-the-square leads to al Khwarizmi’s identity
- how the quadratic formula follows from al Khwarizmi’s identity
- use the quadratic formula to factor quadratic polynomials.

## Solving a quadratic equation using completing the square

Suppose we want to solve the quadratic equation [Large{x^2-14x-1887=0}.] Half of the coefficient of (normalsize{x}) is (normalsize{-7}), so we take the (normalsize{1887}) to the other side, and add the square of (normalsize{-7}) to both sides. This gives [Large{x^2-14x+49=1887+49=1936}.] Now we rewrite the left-hand side as a perfect square: [Large{(x-7)^2=1936}.] At this stage we have to “take the square root” of (normalsize{1936}). What does this mean? It means finding a number (normalsize{r}) with the property that (normalsize{r^2=1936}). In this case such a number actually exists: it is (normalsize{r=44}). But otherwise we would just write (normalsize{pm sqrt{1936}}) to represent an*approximate square root*, and its negative. We can’t forget about the negative, since we want two solutions! So in our case (normalsize{x-7=44}) or (normalsize{x-7=-44}). Thus we do get two solutions, namely (normalsize{x=51}) or (normalsize{x=-37}).

## Deriving al Khwarizmi’s identity

Now let’s apply this to transform the general quadratic polynomial [Large{ax^2+bx+c}] where (aneq 0). First step, factor out the (normalsize{a}) to get [Large{ax^2+bx+c = a left( x^2+frac{b}{a}x+frac{c}{a}right) }.] Add and subtract (normalsize{left(frac{b}{2a}right)^2}) inside the right hand expression: [Large{ax^2+bx+c = a left( x^2+frac{b}{a}x + left(frac{b}{2a}right)^2 +frac{c}{a} -left(frac{b}{2a}right)^2right)}.] Now there is a perfect square inside these brackets: [Large{ax^2+bx+c = a left( left(x+frac{b}{2a}right)^2 +frac{c}{a} -left(frac{b}{2a}right)^2right)}.] Since [{Large frac{c}{a} -left(frac{b}{2a}right)^2 = frac{4ac-b^2}{(2a)^2}}] we get [Large{ax^2+bx+c = a left( left(x+frac{b}{2a}right)^2 +frac{4ac-b^2}{(2a)^2}right)}.] Now for the last step, we multiply through by (normalsize{a}) to get [Large{ax^2+bx+c=aleft(x+frac{b}{2a}right)^2+frac{4ac-b^2}{4a}. label{1} tag 1}] This is one of the really great derivations in mathematics, resulting in an essential formula, which we call*al Khwarizmi’s identity*. This step has lots of questions to give you practice with this formula!

Q1(E): Apply the steps above to rewrite (normalsize{x^2+12x-85}) using al Khwarizmi’s identity.Q2(M): Apply the steps above to rewrite (normalsize{3x^2+5x-22}) using al Khwarizmi’s identity.

## Solving quadratic equations using al Khwarizmi’s identity

Q3(M): i) Solve (normalsize{x^2+12x-85=-21}).Q4(M): i) Solve (normalsize{3x^2+5x-22=0}) using al Khwarizmi’s identity.

## The quadratic formula

Q5(E): Use the quadratic formula to solve (normalsize{x^2+4x+3=0}).

## Factoring quadratics–the simpler way

Q6(E) Use the quadratic formula and Descartes’ theorem to factor (normalsize{x^2+x-132}).

## Answers

[Large{begin{align}x^2+12x-85&=x^2+12x+6^2-85-6^2\&=(x+6)^2-121.end{align}}]A1.We transform the quadratic expression (normalsize{x^2+12x-85}) to[Large{begin{align}3x^2+5x-22&=3Bigg(x^2+frac{5}{3}x+Bigg(frac{5}{6}Bigg)^2-frac{22}{3}-Bigg(frac{5}{6}Bigg)^2Bigg)\&=3Bigg(Bigg(x+frac{5}{6}Bigg)^2-frac{22}{3}-frac{25}{36}Bigg)\&=3Bigg(x+frac{5}{6}Bigg)^2-22-frac{25}{12}\&=3Bigg(x+frac{5}{6}Bigg)^2-frac{289}{12}.end{align}}]A2.We transformA3.We use the working of A1. to rewrite (normalsize{x^2+12x-85=-21}) as[Large{x^2+12x-85=(x+6)^2-121=-21}.]This gives[Large{(x+6)^2=100}.]In this case we can take square roots, giving (normalsize{x+6=10}) or (normalsize{x+6=-10}), from which we deduce that (normalsize{x=4}) or (normalsize{x=-16}). These are the two solutions.A4.We use the working of A2. to write (normalsize{3x^2+5x-22=0}) as[Large{3x^2+5x-22=3Bigg(x+frac{5}{6}Bigg)^2-frac{289}{12}=0}.]This gives[Large{Bigg(x+frac{5}{6}Bigg)^2=frac{289}{36}}.]So taking square roots, (normalsize{x+5/6=17/6}) or (normalsize{x+5/6=-17/6}) from which we deduce that (normalsize{x=12/6=2}) or (normalsize{x=-22/6=-11/3}). These are the two solutions.[Large{x=frac{-4+sqrt{16-12}}{2}=-frac{2}{2}=-1}]A5.Using the quadratic formula we have:and[Large{x=frac{-4-sqrt{16-12}}{2}=-frac{6}{2}=-3}.][Large{x=frac{-1+sqrt{1+528}}{2}=11}]A6.Solving equation (normalsize{x^2+x-132=0}) we have zeroesand[Large{x=frac{-1-sqrt{1+528}}{2}=-12}]hence[Large{x^2+x-132=(x-11)(x+12)=0}.]You are now in a position to systematically solve all quadratic factorisation problems, without any guess work. Thank you al Khwarizmi!

#### Maths for Humans: Linear and Quadratic Relations

## Our purpose is to transform access to education.

We offer a diverse selection of courses from leading universities and cultural institutions from around the world. These are delivered one step at a time, and are accessible on mobile, tablet and desktop, so you can fit learning around your life.

We believe learning should be an enjoyable, social experience, so our courses offer the opportunity to discuss what you’re learning with others as you go, helping you make fresh discoveries and form new ideas.

You can unlock new opportunities with unlimited access to hundreds of online short courses for a year by subscribing to our Unlimited package. Build your knowledge with top universities and organisations.

Learn more about how FutureLearn is transforming access to education