Quadratic function – Completing the square

For a full and interactive version of this page with examples and exercises, check out the Pass Your Math platform!

A quadratic function \(f\) is given by \(f(x)=ax^2+bx+c\) with \(a\), \(b\) and \(c\) being real numbers and \(a\neq 0\).
The graph associated with such a function is called a parabola.
When \(a\gt0\), we speak of a parabola opening upwards, and when \(a\lt0\), we speak of a parabola opening downwards.

The significance of these names becomes evident from the graph below of the parabola opening upwards of \(x^2+8\) and the parabola opening downwards of \(-x^2-8\).

Quadratic function image 1.png

To find the zeros of a quadratic function, we need do find the points of intersection of the parabola with the \(x\)-axis. We can do this in three ways:

  • completing the square
  • \(abc\)-formula
  • factorization

In what follows, we will discuss the completing the square method.

An equation like \(\left(x+2\right)^2=3\) can easily be solved by taking the root:

Solve \(x\) in \(\left(x+4\right)^2={{16}\over{25}}\).

Take the root at both sides of the \(=\) sign: \(x+4=\pm {{4}\over{5}}\);

Next, solve the equation: \(x=-4\pm {{4}\over{5}}\);


\(x=-4\pm {{4}\over{5}}\)

However, this will not work in general for a quadratic equation like \(x^2+8x-1=0\), because the unknown \(x\) occurs twice. But there is a method to obtain the first form from the second one:

Completing the square is rewriting a quadratic expression in \(x\) as an expression in which \(x\) only occurs once, in the base of a second power. To be precise, if \(a\), \(b\) and \(c\) are real numbers, then

\(ax^2+bx+c=a\cdot\left( \left(x+\frac{b}{2a}\right)^2-\frac{b^2-4ac}{(2a)^2}\right)\tiny.\)

With this method we cannot only solve quadratic equations, but also determine what the extreme point of a parabola is:

The quadratic polynomial \(ax^2+bx+c\) in which \(a\ne0\), can be written as

\(a\cdot\left(x+\frac{b}{2a}\right)^2 -\frac{b^2-4ac}{4a}\tiny.\)

In particular, \(\left[-\frac{b}{2a},-\frac{{b}^{2}-4a·c}{4a}\right]\) is an extreme:

  • If \(a\gt0\), then the extreme is the lowest point of the parabola opening upwards.
  • If \(a\lt0\), then the extreme is the highest point of the parabola opening downwards.

In other words, the quadratic function \(ax^2+bx+c\) in \(x\) has a minimum or maximum (depending on \(a\gt0\) or \(a\lt0\)) for \(x=-\frac{b}{2a}\), which is \(-\frac{b^2-4ac}{4a}\).

Let’s practice!

Solve \(x\) by completing the square in the equation

\(x^2-6 x-9=0\)

Give your answer in the form \(x=a\lor x=b\).

To find this answer, we complete the square in the following manner:

\(\begin{array}{rcl} (x-3)^2-3^2-9&=&0\\ &&\phantom{xx}\color{blue}{\text{ }x^2-6x\text{ completed to a square}}\\ (x-3)^2&=&3^2+9\\ &&\phantom{xx}\color{blue}{\text{everything outside of the brackets moved to the right hand side}}\\ (x-3)^2&=&18\\ &&\phantom{xx}\color{blue}{\text{simplified the right hand side}}\\ x-3=\sqrt{18} &\lor&x-3=-\sqrt{18}\\ &&\phantom{xx}\color{blue}{\text{the root taken at both sides}}\\ x=3\cdot \sqrt{2}+3&\lor& x=3-3\cdot \sqrt{2}\\ &&\phantom{xx}\color{blue}{-3 \text{ subtracted from both sides}}\\ \end{array}\)


\(x=3\cdot \sqrt{2}+3\lor x=3-3\cdot \sqrt{2}\)

Leave a Reply

Your email address will not be published. Required fields are marked *