Green chalkboard by AnnaliseArt on Pixabay; equations added by author

Green chalkboard by AnnaliseArt on Pixabay; equations added by author

Recently, I was solving some math contest problems1 from past competitions, and a few times, quadratic equations came up, which reminded me of the process of solving them.

While we’ve been taught the quadratic formula in school, the opaqueness of the formula and how it was always presented got me thinking as to where the formula comes from and how one might derive it, and as I was researching it further, I noticed an interesting approach publicized in 2019 by Po-Shen Loh and previously discovered and published in 1989 by John Savage2 in 1989 that makes it much more intuitive! This work by both mathematicians was also reported by the New York Times in 2020.

Let’s see how it works.

Background

For reference, here’s a graph of a quadratic function y=x2x2y = x^2 - x - 2:

Tschirnhausen cubicy = x^2 - x - 2−4−3−2−1012344321−4−3−2−1y = x2− x− 2

Quadratic polynomial by various authors via Wikimedia Commons

The roots of this equation are the points on the curve passing through the xx axis, i.e., where y=0y = 0.

The traditional approach

When faced with finding the roots of a quadratic equation of the form:

ax2+bx+c=0 ax^2 + bx + c = 0

we’ve been taught to follow one of these approaches:

  1. go through the factorizations of cc and find the pair whose sum is bb, considering only real-valued integral factors
  2. failing the first option, use the quadratic formula

So, in the simple cases, we’re supposed to factor equations to find the roots, which is easy when they’re integral, e.g.,

x2+5x24=0 x^2 + 5x - 24 = 0

can be factored (with some guessing and testing) as follows:

(x+8)(x3)=0 (x + 8)(x - 3) = 0

which provides us the roots directly as:

x=8 or x=3 x = -8 \textrm{ or } x = 3

However, to get there, we had to go through the various factorizations of 24-24 to find the two that add up to 55.

If we can’t follow the first approach, i.e., we can’t easily factor cc such that the sum of the factors is bb, we need to remember this seemingly arbitrary formula, which is typically not derived when presented in an algebra class, so there’s no intuition behind it:

x=b±b24ac2a x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}

Where does this formula come from, anyway?

And moreover, is there an easier, more methodical way of solving the quadratic equation without guessing or applying a magical formula when all hope is lost?

An alternative approach

As I was researching the quadratic formula, I came upon a blog post (and paper) by Po-Shen Loh3, professor of mathematics at Carnegie Mellon University, who came up with a much simpler approach to solving quadratic equations from an intuitive basis without any guesswork, and as a side benefit, this approach lets you derive the quadratic formula we’ve all been taught to memorize.

Let’s take as an example another quadratic equation:

x2+4x21=0 x^2 + 4x - 21 = 0

The main idea behind Po-Shen Loh’s approach is to work from the sum, rather than the product, as we did above.

First, we recognize that if the sum of two numbers is ss, then their average is s2\frac{s}{2}, and we can represent the two numbers as (s2k)\left(\frac{s}{2} - k\right) and (s2+k)\left(\frac{s}{2} + k\right).

Thus, in our case above, we have the sum 44, which means that we can represent our two numbers as (2k)(2-k) and (2+k)(2+k), and their product must satisfy:

(2k)(2+k)=214k2=21k2=25k2=25k=±25=±5 \begin{align*} (2 - k)(2 + k) & = -21 \\ 4 - k^2 & = -21 \\ - k^2 & = -25 \\ k^2 & = 25 \\ k & = \pm \sqrt{25} = \pm 5 \\ \end{align*}

Thus, the two values for the factors are (25)=3(2 - 5) = -3 and (2+5)=7(2 + 5) = 7:

(x3)(x+7)=x23x+7x21=x2+4x21 \begin{align*} (x - 3)(x + 7) & = x^2 -3x + 7x - 21 \\ & = x^2 + 4x - 21 \\ \end{align*}

Checks out! Thus, the roots are x=3x = 3 or x=7x = 7.

Generalization of the approach

In the example above, we ignored the coefficient of x2x^2 because it was 11, so now, let’s consider the general case, for an equation of the form:

ax2+bx+c=0 ax^2 + bx + c = 0

When a0a \ne 0, we can just divide both sides by aa, which gives us:

x2+bxa+ca=0 x^2 + \frac{bx}{a} + \frac{c}{a} = 0

For notational convenience, let’s substute B=ba B = \dfrac{b}{a}\ and  C=ca\ C = \dfrac{c}{a}:

x2+Bx+C=0 x^2 + Bx + C = 0

Now, we want to find a factoring of this equation into the form:

(x+m)(x+n)=0 (x + m)(x + n) = 0

and our roots will be x=mx = -m and x=nx = -n.

As above, we note that m+n=Bm + n = B and mn=Cmn = C. As per the above, the average of mm and nn is:

m+n2=B2 \frac{m + n}{2} = \frac{B}{2}

and hence, we can represent mm and nn as differences from the average  B2 \ \dfrac{B}{2}\ as  B2±k\ \dfrac{B}{2} \pm k:

m=B2k and n=B2+k m = \frac{B}{2} - k \textrm{ and } n = \frac{B}{2} + k

Notes:

  1. It’s easy to validate that m+n=Bm + n = B using this new formulation.
  2. It doesn’t matter which of mm or nn gets the +k+k or k-k term, since they are not an ordered pair.

Then, for the product, we have:

C=mn=(B2k)(B2+k)=B24k2 C = mn = \left(\frac{B}{2} - k\right) \left(\frac{B}{2} + k\right) = \frac{B^2}{4} - k^2

Solving for kk, we have:

B24k2=Ck2=CB24k2=B24Ck=±B24C \begin{align*} \frac{B^2}{4} - k^2 & = C \\ -k^2 & = C - \frac{B^2}{4} \\ k^2 & = \frac{B^2}{4} - C \\ k & = \pm \sqrt{\frac{B^2}{4} - C} \\ \end{align*}

And thus, the values for mm and nn (which are interchangeable) are:

B2±k=B2±B24C \frac{B}{2} \pm k = \frac{B}{2} \pm \sqrt{\frac{B^2}{4} - C}

Note that since our factorization is actually

(x+m)(x+n)=0 (x + m)(x + n) = 0

the roots of the equation are actually the negated values of the final expression above:

x=B2B24C x = -\frac{B}{2} \mp \sqrt{\frac{B^2}{4} - C}

As John Savage notes in his paper and Po-Shen Loh mentions in his blog post, this process works even when the roots of the equation are imaginary (using i=1i = \sqrt{-1}), so there are no limitations to this approach.

Deriving the quadratic equation

If you thought that the roots of the equation we computed above:

x=B2±B24C x = -\frac{B}{2} \pm \sqrt{\frac{B^2}{4} - C}

were starting to vaguely look like the traditional quadratic formula, you’re right!

Aside: we’ve flipped the \mp to ±\pm for convenience, but we don’t actually care about the order, so this is not changing anything meaningful in the results, since our roots are interchangeable.

But why is it so different? Recall that we simplified our approach by dividing both sides of the equation by aa and replaced our lowercase coefficients with their uppercase equivalents. So let’s bring them back:

B=baC=ca B = \frac{b}{a} \hspace{2em} C = \frac{c}{a}

and solve for xx:

x=B2±B24C=b2a±b24a2ca=b2a±b24a24ac4a2=b2a±b24ac4a2=b2a±b24ac4a2=b2a±b24ac2a=b±b24ac2a \begin{align*} x & = -\frac{B}{2} \pm \sqrt{\frac{B^2}{4} - C} \\ & = -\frac{b}{2a} \pm \sqrt{\frac{b^2}{4a^2} - \frac{c}{a}} \\ & = -\frac{b}{2a} \pm \sqrt{\frac{b^2}{4a^2} - \frac{4ac}{4a^2}} \\ & = -\frac{b}{2a} \pm \sqrt{\frac{b^2 - 4ac}{4a^2}} \\ & = -\frac{b}{2a} \pm \frac{\sqrt{b^2 - 4ac}}{\sqrt{4a^2}} \\ & = -\frac{b}{2a} \pm \frac{\sqrt{b^2 - 4ac}}{2a} \\ & = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a} \\ \end{align*}

And there we have it — the quadratic equation!

Slightly more complex example

In the example above, it worked out rather nicely for us, because the sum of components 44 was even, so when we divided it in half, it remained an integer, and we ended up having a perfect square at the end, so we had a very easy way of computing the answer. What happens when that is not the case?

Let’s consider a slightly different equation:

2x2+10x42=0 2x^2 + 10x - 42 = 0

As noted above, we can first divide both sides by a=2a = 2 to simplify our equation’s coefficients:

x2+5x21=0 x^2 + 5x - 21 = 0

Here, the sum is 55, so our two components are (2.5k)(2.5 - k) and (2.5+k)(2.5 + k):

(2.5k)(2.5+k)=216.25k2=21k2=27.25k2=27.25k=±27.25=±1094=±1092 \begin{align*} (2.5 - k)(2.5 + k) & = -21 \\ 6.25 -k^2 & = -21 \\ -k^2 & = -27.25 \\ k^2 & = 27.25 \\ k & = \pm \sqrt{27.25} = \pm \sqrt{\frac{109}{4}} = \pm \frac{\sqrt{109}}{2} \\ \end{align*}

Thus, our two components are:

m=2.5+1092=5+1092n=2.51092=51092 \begin{align*} m & = 2.5 + \frac{\sqrt{109}}{2} & = \frac{5 + \sqrt{109}}{2} \\ n & = 2.5 - \frac{\sqrt{109}}{2} & = \frac{5 - \sqrt{109}}{2} \\ \end{align*}

Note that we are done here; since we’ve produced a factoring of the form

(x+m)(x+n)=0 (x + m)(x + n) = 0

the roots are m-m and n-n, but we’ll continue with the verification step below.

Let’s see how this works out with (x+m)(x+n)(x + m)(x + n) and see if we can reduce it to our original equation:

(x+m)(x+n)=(x+5+1092)(x+51092)=x2+(5+1092+51092)x+(5+1092)(51092)=x2+(52+52)x+251094=x2+5x21 \begin{align*} (x + m)(x + n) & = \left(x + \frac{5 + \sqrt{109}}{2}\right) \left(x + \frac{5 - \sqrt{109}}{2}\right) \\ & = x^2 + \left(\frac{5 + \sqrt{109}}{2} + \frac{5 - \sqrt{109}}{2}\right)x + \left(\frac{5 + \sqrt{109}}{2}\right) \left(\frac{5 - \sqrt{109}}{2}\right) \\ & = x^2 + \left(\frac{5}{2} + \frac{5}{2}\right)x + \frac{25 - 109}{4} \\ & = x^2 + 5x - 21 \end{align*}

That looks right! Thus, the roots of this equation are:

x=5±1092 x = -\frac{5 \pm \sqrt{109}}{2}

Let’s finally see how we would have applied the quadratic formula here as well with the original coefficients:

0=2x2+10x42x=b±b24ac2a=10±10242(42)22=10±100+3364=10±4364=10±21094=5±1092 \begin{align*} 0 & = 2x^2 + 10x - 42 \\ x & = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a} \\ & = \frac{-10 \pm \sqrt{10^2 - 4 \cdot 2 \cdot (-42)}}{2 \cdot 2} \\ & = \frac{-10 \pm \sqrt{100 + 336}}{4} \\ & = \frac{-10 \pm \sqrt{436}}{4} \\ & = \frac{-10 \pm 2\sqrt{109}}{4} \\ & = \frac{-5 \pm \sqrt{109}}{2} \\ \end{align*}

Note that if we scale the coefficients up-front to ensure a=1a=1, it’s even easier:

0=x2+5x21x=b±b24ac2a=5±5241(21)21=5±1092 \begin{align*} 0 & = x^2 + 5x - 21 \\ x & = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a} \\ & = \frac{-5 \pm \sqrt{5^2 - 4 \cdot 1 \cdot (-21)}}{2 \cdot 1} \\ & = \frac{-5 \pm \sqrt{109}}{2} \\ \end{align*}

Summary

Now you can solve the quadratic equation whether or not you remember the quadratic formula, and you have an alternative way to approach solving it without having to guess the roots.

And hopefully, now you have a better intuition of where the quadratic formula comes from, so it’s less opaque for you now.

References

See also


  1. For example, the Art of Problem Solving wiki has a wide variety of problems from many math contests; it also has links to many other sources of math competition problems. ↩︎

  2. Po-Shen Loh noted this earlier work in his follow-up post on related work of solving the quadratic equation. ↩︎

  3. Po-Shen Loh has also been coaching the USA team competing in the International Mathematics Olympiad, which may be how I happened to find his blog post while reading about math contests and quadratic equations. ↩︎