Completing the Square
It's been a very long time since I've had a chance to even think about posting something to this blog. In the interest of getting something out there, I want to share some notes that I wrote up for a precalculus class that I taught last semester on completing the square. This is a fairly common approach for solving quadratic equations and is discussed in algebra classes, but, at least in my own education, I can't recall anyone ever explaining why this technique works. So I sat down to derive it myself, and wrote up some notes for the students to accompany a lecture I gave on the topic. This post is a lightly adapted version of those notes.
Background
Definition (Quadratic Equations): A quadratic equation is an equation involving a second-order polynomial with the general form,
for .
Such equations are of interest to us in pre-calculus for two major reasons:
- Physical Applications: Quadratics are commonly seen in the physical sciences. For
example, projectile motion is governed by a quadratic equation
This is because of calculus: the natural solution to a very common form of differential equation is a quadratic. You'll learn more about this in later math courses.
- Algebraic Tractability: Quadratics represent the upper limit of the complexity of polynomials that can be reasonably factored using a systematic approach. Cubics do have a formula (analogous to the quadratic formula), but it's much more complex. Beyond cubics, factoring polynomials is a very tedious and manual process.
"Solving" for the squared variable in a quadratic equation will generally require factoring, and will result in up to two different answers. The sole situation where factoring is not necessary to obtain the answer is when the coefficient on the first-order term is 0, in which case the solution can be found directly:
For any other quadratic, finding the solution will be more involved.
Perfect Squares
Besides quadratics where the 1st-order coefficient is 0, probably the next easiest type of quadratic to solve is called a perfect square.
Definition (Perfect Square): A perfect square quadratic is one that can be factored into the form
Working backwards from here, we can see the initial form that such a polynomial must have by applying the distributive property twice:
Here are a few examples of perfect squares:
If you happen to stumble upon a quadratic with the following properties, you've found a perfect square:
for some .
Perfect squares are easy to solve, because they can be easily put into the form we saw in the case of the first-order coefficient being 0, and then solved directly in the same manner. This is because we can rewrite,
From which we get,
Imperfect Squares
Unfortunately, very few quadratics you encounter will be a perfect square. However, we can take advantage of one very useful property of quadratics to "force" any quadratic into a close-enough approximation of a perfect square that we can solve it.
The basic idea is this:
Theorem: For any quadratic equation of the form,
Proof: By the definition of perfect square, a quadratic is a perfect square when it has the property that and for some . Thus, we have that it must be the case that .
In order for the equation to be a perfect square, then, we must find a value for such that,
Because the real numbers are closed under all arithmetic operations, such a value is guaranteed to exist. ∎
In a sense, here is an indication of how imperfect a square the quadratic is. It is the quantity that, if added to the quadratic, would make it perfect. If the quadratic already is a perfect square, then .
Of course, this result isn't directly useful in solving quadratics because it requires changing them. You can't simply magic an equation into a perfect square, even if you can easily find how far away from being a perfect square it is. However, we may note one other observation which, when combined with the theorem above, will give us a general technique for solving any quadratic equation.
Observation: If we are able to construct an equation of the form,
In other words, it doesn't matter if we cannot turn our quadratic into a "real" perfect square. As long as we can factor the terms involving , it is trivial to account for any extra "constant" when we are solving it.
This is the basis of the technique called completing the square.
Completing the Square
The process for completing the square is simply finding from our previous discussion and adding it to both sides of the equation. This will allow us to factor the terms involving , and then solve the resulting equation directly.
Consider the general quadratic:
To complete the square, perform the following steps:
- Normalize the second-order coefficient to 1 by dividing through by
- Let
- Add
to both sides of the equation
- Factor the left hand side of the equation
- Solve for
directly
(I didn't perform this step algebraically so as to avoid deriving the quadratic formula, which will fall directly out of this if one isn't careful.)