Dear Uncle Colin,

I have a quartic expression and I want to know whether it can be expressed as a perfect square. How would you do it?

Quite Ugly Algebra – Rooting Turns Into Clean Squares?

Hi, QUARTIC, and thanks for your message!

Like quadratics, quartics have a discriminant. Unfortunately, the discriminant is too unwieldy to be much use here, and doesn’t actually answer your question – so we won’t be looking at it.

I can think of two methods for this: an algebraic one (matching coefficients) and a calculus one (finding turning points).

For the purposes of this post, I’ll consider two expressions:

  • $9x^4 - 30x^3 + 37x^2 - 20x + 4$, which is a square
  • $9x^4 - 30x^3 + 37x^2 - 20x + 9$, which is not a square

Matching coefficients

If the quartic is a perfect square, its square root is an arbitrary quadratic that can be expressed as $ax^2 + bx + c$. So the quartic is $\br{ax^2 + bx + c}^2$, or $a^2x^4 + 2abx^3 + (b^2 + 2ac)x^2 + 2bcx + c^2$.

That’s a bit of a mess, but it does allow us to pattern match quite easily.

If the quartic is a square, then its $x^4$ coefficient must be a square ($a^2$) and its unit term must be a square $c^2$. Both of our candidates satisfy this test. Without loss of generality, we can say that $a$ is positive.

  • For the first expression, $a=3$ and $c = \pm 2$
  • For the second, $a=3$ and $c = \pm 3$

We can work out a candidate $b$ from the $x^3$ coefficient, which must equal $2ab$. In both cases, that gives $b = -5$.

Then we can check whether it works using the $x$ coefficient, which must equal $2bc$.

In both cases, the $x$ coefficient is $-20$, so $c = 2$ is the only possible value – which means the first expression is $\br{3x^2 - 5x + 2}^2$ and the other is not a square.

Calculus

If the quartic is a perfect square, all of its zeros – including the complex ones – must also be turning points.

Let’s look at the derivative of $(ax^2 + bx + c)^2$, which is $(2ax + b)(ax^2 + bx + c)$.

That has (generally) three solutions: one at $x = -\frac{b}{2a}$ and two more at $x = \frac{-b \pm \sqrt{b^2-4ac}}{2a}$.

That is to say, the two ‘outer’ turning points are evenly spaced around the inner one – the curve is symmetric about its inner turning point. (The turning points might involve complex numbers. That’s ok.) This is a necessary but not sufficient condition for the quartic to be a square – as we’ll see immediately: in both of the expressions, we have the same cubic derivative: $36x^3 - 90x^2 + 74x - 20$.

If the expression has a line of symmetry, then it’s midway between the points of inflexion! So we can differentiate again: $108x^2 - 180x + 74$; we don’t even need to solve it, the zeros are evenly spaced around $\frac{180}{2\times108}$, which is $\frac{5}{6}$.

This tells us that $6x -5$ is a factor of $36x^3 - 90x^2 + 74x - 20$. We can do the division and get $6x^2 - 10x + 4$ back out; this factorises as $2(3x-2)(x-1)$.

The outer turning points are therefore at $x = \frac{2}{3}$ and $x=1$, which are indeed equally spaced about $x=\frac{5}{6}$.

But are they zeros? You have two options. You may plonk them back into the original expressions and see whether you get 0; or you may work out $(3x-2)^2(x-1)^2$ and see that you match exactly one of the options.


Do you know of a better way? Let me know!

- Uncle Colin