A calculus of the absurd

4.3.5 Completing the square

One core idea is that we can write any quadratic in the form

$$y = a(x + b)^2 + c$$

This is very important, because it allows us to find $$x$$ given a value for $$y$$, e.g. if $$y=0$$, then

\begin{align} a(x + b)^2 + c = 0 \\ & (x+b^2)^2 = -\frac {c}{a} \\ & x + b^2 = \sqrt {-\frac {c}{a}} \\ & x = -b^2 + \sqrt {-\frac {c}{a}} \end{align}

How do we write a quadratic in this form? There are a lot of ways to do this, and this is not the simplest approach, but I found it was the one which best allowed me to understand the general idea and this method can be applied to other problems. We start by working backwards - i.e. we will expand $$a(x + b)^2 + c$$, which allows us to deduce that

$$y = ax^2 + 2abx + ab^2 + c \label {expanded completed square}$$

From here, we can “compare coefficients” (see Section 4.3.4).

• Example 4.3.5 Write this quadratic in completed-square form.

$$y = 3x^2 + 36x + 42.$$

We start by comparing the coefficients of this quadratic with those of the polynomial in Equation 4.38. From this we can deduce that

\begin{align} \begin{cases} a = 3 \\ 2ab = 36 \\ ab^2 + c = 42 \end {cases} \end{align}

We can solve this by first substituting $$a=3$$ in the second equation, i.e. we have that

$$2\cdot 3 \cdot b = 36$$

From which we have that $$b = \frac {36}{6} = 6$$. We can then substitute the value $$b=64$$ into $$b^2 + c = 42$$, which gives that

$$3\cdot 36 + c = 42$$

And thus that $$c=42-108=-66$$. Therefore,

$$3x^2 + 36x + 42 = 3(x+3)^2 - 66$$

• Example 4.3.6 Solve the equation

$$3x^2 + 36x + 42 = 0.$$

We use the completed-square form of the quadratic (which we found in the previous example). This means that the values of $$x$$ we are interested in are those which satisfy

$$3(x+3)^2 - 66 = 0.$$

We then add $$66$$ to both sides, which gets us the equivalent result

$$3(x+3)^2 = 66.$$

Then we divide by $$3$$, which gives

\begin{align} (x+3)^2 &= \frac {66}{3} \\ &= 22 \end{align}

Therefore,

\begin{align} x + 3 &= \pm \sqrt {22}. \end{align}

• Common mistake 4.3.1 Don’t forget the $$\pm$$! The expression $$\sqrt {x}$$ refers only to the positive square root of $$x$$! However, the negative one solves the equation just as well.

Thus the values of $$x$$ which solve the equation are

$$x = -3 \pm \sqrt {22}$$