Robert Neubecker for Quanta Magazine


Think of the tune to “Pop Goes the Weasel.” Now sing these lyrics:

Neg-a-tive b, plus or minus
The square root of b squared
mi-nus four a c
All! over two a

This jingle has helped generations of algebra students recall the quadratic formula that solves every equation of the form $latex ax^2+bx+c=0$. The formula is as useful as it is likely to appear in the dictionary under “math anxiety,” and a quick look shows you why:

$$\frac{-b\pm \sqrt{b^2-4ac}}{2a}$$

As intimidating as this looks, hiding inside is a simple secret that makes solving every quadratic equation easy: symmetry. Let’s look at how symmetry makes the quadratic formula work and how a lack of symmetry makes solving cubic equations (of the form $latex ax^3+bx^2+cx+d =0$) much, much harder. So much harder, in fact, that a few mathematicians in the 1500s spent their lives embroiled in bitter public feuds competing to do for cubics what was so easily done for quadratics.

Solving equations is a core skill in math class — it helps us find maximum profits, minimum distances, points of intersection, and much more. One of the most basic equations we learn to solve is $latex f(x)=0$. Given a function $latex f(x)$, this equation asks: What inputs x return an output of 0? For this reason, solutions to this equation are sometimes called the “zeros” or “roots” of the function.

Before we find the roots of every quadratic function, let’s start with an easy one: What are the roots of $latex f(x)=x^2-9$? To find them, just solve the equation $latex f(x)=0$.

$latex f(x)=0$
$latex x^2-9=0$
$latex x^2=9$
$latex x=\pm3$

These roots are easy to find because this equation is easy to solve. All you have to do is isolate x. Notice that we need that $latex \pm$ in the last line, because both 3 and -3 have the property that when you square them you get 9. A quick check that $latex f(3)=f(-3)=0$ verifies that these are indeed the inputs that make $latex f(x)$ output 0.

That $latex \pm$ also points to the symmetry inherent in the situation. The quadratic function has two roots, and if you imagine the two roots on a number line, you’ll see that they are symmetric about $latex x=0$.

And when you remember that the graph of a quadratic function is a parabola, this makes a lot of sense. Every parabola has an axis of symmetry that splits the parabola into two mirror-image pieces. In the case of $latex f(x)=x^2-9$, the axis of symmetry is the y-axis (the line $latex x=0$). When you graph $latex f(x)=x^2-9$ in the usual way, by treating x as the independent variable and setting $latex y=f(x)$, you can see its roots on the x-axis, equidistant from and on either side of the y-axis.

For a more complicated quadratic like $latex f(x)=x^2-8x-9$, finding the roots takes a bit more digging.

$latex f(x)=0$
$latex x^2-8x-9=0$
$latex x^2-8x=9$

We can set $latex f(x)$ equal to 0 and move the 9 to the right side as we did before, but we can’t take the square root of both sides to isolate x. That other term with the x in it is standing in the way. But this function, like every quadratic, is symmetric, and we can use that symmetry to navigate around the problem. We just need a little algebra to make the symmetry more transparent.

Let’s rewrite the function $latex f(x)=x^2-8x-9$ as $latex f(x)=x(x-8)-9$. Now focus on the $latex x(x-8)$ part. This will be equal to 0 in two situations — if x = 0 or if x = 8 — and this guarantees that $latex f(0)$ and $latex f(8)$ will take the same value of -9. This gives us two symmetric points on the parabola, and since the axis of symmetry has to split $latex x=0$ and $latex x=8$ down the middle, it must be the line $latex x=4$.

Now that we’ve found the symmetry, it’s time to leverage it. We’re going to shift our parabola four units to the left so that its axis of symmetry moves from the line $latex x=4$ to the line $latex x=0$. There’s a simple way to perform this translation algebraically: We replace every x with x + 4.

Let’s call $latex g(x)$ the new quadratic function we get when we replace x with x+ 4. In other words, let $latex g(x)=f(x+4)$. Watch what happens when we simplify $latex g(x)$:

$latex g(x)=f(x+4)$
$latex g(x)=(x+4)^2-8(x+4)-9$
$latex g(x)=x^2+8x+16-8x-32-9$
$latex g(x)=x^2-25$

After we apply the distributive property a few times and collect like terms, the x term of our new translated quadratic vanishes, and this makes finding the roots of $latex g(x)$ easy:

$latex g(x)=0$
$latex x^2-25=0$
$latex x^2=25$
$latex x=\pm5$

The roots of $latex g(x)$ are $latex x=\pm5$, so to find the roots of $latex f(x)=x^2-8x-9$, we just move the roots of $latex g(x)$ back four units to the right. This us gives us the roots of $latex f(x)$: $latex 4\pm5$, or 9 and -1, which you can verify by computing $latex f(9)=f(-1)=0$.

The secret to solving this slightly harder quadratic equation was to slide it over and turn it into an easier quadratic equation by eliminating the interfering x term. This approach will work on any quadratic function. Given an arbitrary quadratic $latex f(x)=ax^2+bx+c$, you can always find its axis of symmetry with the same bit of factoring:

$latex f(x)=ax^2+bx+c$
$latex f(x)=x(ax+b)+c$

In this form you can see that $latex f(0)=f\left(-\frac{b}{a}\right)=c$, which means the axis of symmetry is halfway between $latex x=0$ and $latex x=-\frac{b}{a}$. In other words, the axis of symmetry of any quadratic function $latex f(x)=ax^2+bx+c$ is the line $latex x=-\frac{b}{2a}$. And this should look familiar. It’s hiding in the quadratic formula!

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

It’s easier to see if you rewrite it like this:

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

The quadratic formula relies on the fact that the roots of the quadratic $latex f(x)=ax^2+bx+c$ are symmetric about $latex x=-\frac{b}{2a}$. And just as we did above, you can use that symmetry to find them: Just translate $latex f(x)$ by $latex -\frac{b}{2a}$. This has the effect of eliminating the x term, which allows you to then easily isolate x and solve. Do this, and you’ll get the quadratic formula. (See the exercises below for more details.) This isn’t as easy as humming a children’s tune, but it demonstrates the important algebraic and geometric connections that make this formula work.

Solving quadratics with the power of symmetry might embolden us to try a similar tactic on cubic equations. But while cubics do have symmetry, it’s not the kind that helps with solving equations like $latex f(x)=0$. Cubic graphs have “point symmetry,” which means there’s a special point on the graph of every cubic function where, if a line passes through that point and intersects the cubic anywhere else, it intersects the graph again symmetrically about that point.

This is a strong type of symmetry, but it doesn’t help with finding roots. That’s because the roots of a function occur where its graph crosses the horizontal line $latex y=0$ (the x-axis), and in general, those intersections aren’t symmetric about the cubic’s special point of symmetry.

In fact, a cubic might have only root. No symmetry there.

Yet, there’s something from our earlier work with quadratics that can help.

If we have a quadratic function $latex f(x)=ax^2+bx+c$ and we know its roots are $latex r_1 $ and $latex r_2$, then we can always write $latex f(x)$ in “factored” form: $latex f(x)=a(x-r_1)(x-r_2)$. Now, when we multiply this out and simplify, we get something very useful to work with.

$latex f(x)=a(x-r_1)(x-r_2)$
$latex f(x)=a(x^2-xr_2-r_1x+r_1r_2)$
$latex f(x)=a(x^2-(r_1+r_2)x+r_1r_2)$
$latex f(x)=ax^2-a(r_1+r_2)x+ar_1r_2$

Notice how the coefficient of the x term involves the sum of the two roots $latex r_1$ and $latex r_2$. This is related to one of Vieta’s formulas (which you may have seen once or twice before in these columns): Given a quadratic function $latex f(x)=ax^2+bx+c$, the sum of the two roots will always be $latex -\frac{b}{a}$. You can show this by setting the general form of the quadratic equal to its factored form $latex ax^2+bx+c=ax^2-a(r_1+r_2)x+ar_1r_2$ and observing that the only way two polynomials can actually be the same is if their corresponding coefficients are the same. In this case, that means the coefficients of the x terms on both sides of the equation must be equal, so we can write

$latex b=-a(r_1+r_2)$

and then divide:

$latex r_1+r_2 = -\frac{b}{a}$

Notice that dividing both sides of this equation by 2 demonstrates an interesting fact: The average of the two roots of the quadratic function is equal to the x-value of the axis of symmetry:

$$ \frac{r_1+r_2}{2} = -\frac{b}{2a}$$

This makes sense, because the axis of symmetry has to be in the middle of the two roots, and the average of any two numbers is the number exactly in the middle of them.

But consider this new relationship in the context of our earlier translation. Translating the parabola over by moving the axis of symmetry from $latex x = -\frac{b}{2a}$ to $latex x=0$ also changes the average of the two roots from $latex -\frac{b}{2a}$ to 0.

But if the average of the roots is 0, then the sum of the roots must be 0 as well, and the sum of the two roots appears in the factored form of the quadratic:

$latex f(x)=ax^2-a(r_1+r_2)x+ar_1r_2$

This means that translating the quadratic so the sum of the roots becomes 0 also makes the x term vanish. This is what helped us solve our earlier quadratic equation, and a similar result about the roots holds for cubic functions.

Given a general cubic $latex f(x)=ax^3+bx^2+cx+d$, we can do what we did with the quadratic. If the cubic has roots $latex r_1$, $latex r_2$, and $latex r_3$, we can write the cubic function in its factored form $latex f(x)=a(x-r_1)(x-r_2)(x-r_3)$ and multiply it out. This gives us $latex f(x)=ax^3-a(r_1+r_2+r_3)x^2$
$latex +a(r_1r_2+r_1r_3+r_2r_3)x-ar_1r_2r_3$ which we then set equal to the general form $latex f(x)=ax^3+bx^2+cx+d$, and since corresponding coefficients must be the same, we end up with Vieta’s formula for the sum of the roots of a cubic:

$$ r_1+r_2+r_3 = -\frac{b}{a}$$

Notice that we can divide both sides of the equation by 3 to get

$$ \frac{r_1+r_2+r_3}{3} = -\frac{b}{3a}$$

This tells us the average root of the cubic is $latex -\frac{b}{3a}$. Now, if we translate the cubic by this amount, the average root will be 0, which will make the sum of the roots equal to 0, which in turn will make the coefficient of $latex x^2$ in our translated cubic vanish.

In short, the transformation $latex g(x)=f\left(x-\frac{b}{3a}\right)$ yields what is known as a “depressed” cubic, which simply means it has no $latex x^2$ term. Our transformed and depressed cubic will look like this:

$latex g(x)=ax^3+mx+n$

The coefficients m and n can be expressed in terms of a, b, c, and d from the original cubic. What they are equal to is less important than the fact that there are guaranteed techniques for finding the roots of depressed cubics. In fact, such a technique was at the heart of a legendary dispute between Gerolamo Cardano and Niccolò Tartaglia in the 1500s that involved friendship, betrayal and public math duels. It’s a long and fascinating story, with a remarkable mathematical conclusion: The ability to turn any cubic into a depressed cubic, together with the ability to solve any depressed cubic, allows us to solve every cubic equation. You’ll forgive me for leaving out the rest of the details because, well, it’s just easier to show you.

This is the cubic formula, which, like the quadratic formula, solves every cubic equation. But unlike the quadratic formula, it has no catchy tune to sing along to. You’re welcome to try to write one, but it will probably need a few verses and a chorus or two.



1. If you know one root of a cubic, you can certainly find the others. Why?

Click for Answer 1:

If you know one root of $latex f(x)=ax^3+bx^2+cx+d$, then you can factor it out, resulting in the form $latex f(x)=(x-r_1)(ax^2+px+q)$. The other two roots of the cubic are the roots of $latex (ax^2+px+q)$, which you can find using the quadratic formula.


2. The roots of a quadratic might be complex numbers. Doesn’t that affect the symmetry argument?

Click for Answer 2:

No! The quadratic formula shows that complex roots must always occur in conjugate pairs.

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

Even if $latex \sqrt{b^2-4ac}$ turns out to be a complex number, the $latex \pm$ still ensures the symmetry about $latex x = -\frac{b}{2a}$.


3. Given the general quadratic $latex f(x)=ax^2+bx+c$, solve the transformed quadratic $latex g(x)=f\left(x-\frac{b}{2a}\right)$ to derive the quadratic formula.

Click for Answer 3:

First, simplify the transformed quadratic:





Now solve $latex g(x)=0$:



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

This shows the roots of the transformed quadratic $latex g(x)$ are $latex \pm \frac{\sqrt{b^2-4ac}}{2a}$, which makes the roots of the original quadratic $latex x=-\frac{b}{2a} \pm \frac{\sqrt{b^2-4ac}}{2a}$, just as the quadratic formula tells us.


4. What is the average of the roots of the quartic function $latex f(x)=ax^4+bx^3+cx^2+dx+e$?

Click for Answer 4:

$latex -\frac{b}{4a}$

Writing the quartic in factored form $latex f(x)=a(x-r_1)(x-r_2)(x-r_3)(x-r_4)$ and multiplying out gives you $latex r_1+r_2+r_3 +r_4 = -\frac{b}{a}$, so $latex \frac{r_1+r_2+r_3+r_4}{4} = -\frac{b}{4a}$.


5. Use calculus to show that the point of inflection of a cubic is also its point of symmetry.

Click for Answer 5:

Given $latex f(x)=ax^3+bx^2+cx+d$, differentiate twice


A point of inflection occurs when the second derivative of a function changes from positive to negative or vice versa. You can verify that for a cubic function, the point of inflection occurs when $latex f”(x)=0$, which is when $latex 6ax+2b=0$, or $latex x=-\frac{2b}{6a}=-\frac{b}{3a}$.

You are watching: Quanta Magazine. Info created by GBee English Center selection and synthesis along with other related topics.