# Applications of Completing the Square

#### Contents

## Completing the Square - Applications

Completing the square is converting a quadratic equation from $ax^2 + bx + c =0$ to $a(x-p)^2 + q = 0$, where $a, b, c, p, q$ are constants.

This is a very helpful technique with several uses.

## Finding the Vertex

The vertex of a parabola can be found by completing the square in its equation. Consider a parabola whose equation is $y=ax^2+bx+c.$ Completing the square gives

$\begin{aligned} y&=ax^2+bx+c \\ y&=a\left(x^2+\frac{b}{a}x\right)+c\\ y&=a\left(x^2+2\cdot\frac{b}{2a}x+\frac{b^2}{4a^2}\right)-\frac{b^2}{4a}+c\\ y&=a\left(x+\frac{b}{2a}\right)^2-\frac{b^2-4ac}{4a}. \end{aligned}$

According to the properties of a square, the value of the square minimizes to zero when the variable being squared equals zero, and the value of the square increases as the absolute value of the variable being squared increases. Thus, our whole expression $ax^2+bx+c,$ or $a\left(x+\frac{b}{2a}\right)^2-\frac{b^2-4ac}{4a}$ will have an extreme value when $x+\frac{b}{2a}=0.$ Plugging $x=-\frac{b}{2a}$ into the equation gives $y=-\frac{D}{4a},$ and now we know the coordinates of the vertex: $\left(-\frac{b}{2a},-\frac{D}{4a}\right),$ where $D$ is the quadratic's discriminant.

## Finding the Range of Quadratic Functions

Finding the range of $f(x) = ax^2 + bx + c$ may require quite a bit of effort. However, once completing the square is done, the range can be found in just a matter of seconds. Upon completing the square, we have

$\begin{aligned} y&=ax^2+bx+c \\ y&=a\left(x^2+\frac{b}{a}x\right)+c\\ y&=a\left(x^2+2\cdot\frac{b}{2a}x+\frac{b^2}{4a^2}\right)-\frac{b^2}{4a}+c\\ y&=a\left(x+\frac{b}{2a}\right)^2-\frac{b^2-4ac}{4a}. \end{aligned}$

We've discussed in the prior section that this has an extreme value when $x=-\frac{b}{2a}.$ Whether this is a maximum or minimum depends on the sign of $a.$ We know that $\left(x+\frac{b}{2a}\right)^2\geq0$ (since it's a square). Hence if $a>0,$ the extreme value will be a minimum, and the range will be $\left[-\frac{D}{4a},\infty\right).$ When $a<0,$ the function will have a maximum, and its range will be $\left(-\infty,-\frac{D}{4a}\right].$

## Find the range of $f(x) = a(x-p)^2 + q$, where $a$ is a positive real number.

The variable term in $f$ is $a(x-p)^2$. Since it is a perfect square, its range is all non-negative real numbers, that is $[0, \infty)$. After adding $q$, which is a constant, the range of $f$ becomes $[q, \infty)$. $_\square$

Note: We can also find the value of $x$ at which the minimum occurs. This is when $x - p = 0$ , that is, $x = p$.

## Find the range of $f(x) = a(x-p)^2 + q$, where $a$ is a negative real number.

Now the range of $a(x-p)^2$ is $(-\infty, 0]$, since $a$ is negative. After adding $q$, the range of $f$ becomes $(-\infty, q]$, and we are done. $_\square$

Note: Again, at the extreme point, the $x$-coordinate is $p$.

## Find the range of $f(x) = x^2 + 2x + 4$.

After completing the square, we get $f(x) = (x+1)^2 + 3$, implying that its range is $[3, \infty)$. $_\square$

## Factorization

Many times, it becomes difficult to factorize a quadratic expression, especially when the roots are irrational or complex. This is where completing the square helps. Factorization of any quadratic can be done by completing the square followed by using the identity $a^2-b^2=(a+b)(a-b).$

So given a quadratic equation $ax^2+bx+c=0,$ if we succeed in bringing it to the form $(x+m)^2-n^2=0,$ then we can factorize it with the difference of two squares identity to obtain both of its roots easily. The procedure is as follows:

$\begin{aligned} ax^2+bx+c&=0 \\ x^2+\dfrac{b}{a}x+\dfrac{c}{a}&=0 \\ x^2+\dfrac{b}{a}x+\dfrac{b^2}{4a^2}+\dfrac{c}{a}&=\dfrac{b^2}{4a^2}\\ \Bigl( x+\dfrac{b}{2a}\Bigr) ^2 +\dfrac{c}{a} - \dfrac{b^2}{4a^2} &=0 \\ \Bigl( x+\dfrac{b}{2a}\Bigr) ^2 -\dfrac{b^2-4ac}{4a^2} &=0. \end{aligned}$

Observe that now the equation has come into the form $(x+m)^2-n^2 =0.$ Then we apply the difference of two squares identity, and we're done!

## Factorize $x^2 - x - 1.$

First, we complete the square: $\displaystyle \left(x- \frac{1}{2}\right)^2 - \frac{5}{4} .$

Now using the identity $a^2 - b^2 = (a+b)(a-b),$ we get

$\begin{aligned} \left(x- \frac{1}{2}\right)^2 - \frac{5}{4} &= \left(x- \frac{1}{2}\right)^2 - \left(\frac{\sqrt{5}}{2}\right)^2 \\ &= \left(\left(x - \frac{1}{2}\right) + \frac{\sqrt{5}}{2}\right)\left(\left(x - \frac{1}{2}\right) - \frac{\sqrt{5}}{2}\right)\\ &= \left(x - \frac{1 - \sqrt{5}}{2}\right)\left(x - \frac{1 + \sqrt{5}}{2}\right). \ _\square \end{aligned}$

## Factorize $x^2 + 2x + 5.$

Using the same method as in the above example, we get $\begin{aligned} x^2 + 2x + 5 &= (x+1)^2 + 4\\ &= (x+1)^2 + 2^2\\ &= (x+1)^2 - (2i)^2\\ &=(x + 1 + 2i)(x + 1 - 2i). \ _\square \end{aligned}$

**Cite as:**Applications of Completing the Square.

*Brilliant.org*. Retrieved from https://brilliant.org/wiki/applications-of-completing-the-square/