Home Practice
For learners and parents For teachers and schools
Textbooks
Full catalogue
Leaderboards
Learners Leaderboard Classes/Grades Leaderboard Schools Leaderboard
Pricing Support
Help centre Contact us
Log in

We think you are located in United States. Is this correct?

2.2 Completing the square

2.2 Completing the square (EMBFJ)

Completing the square

Can you solve each equation using two different methods?

  1. \(x^2 - 4 = 0\)
  2. \(x^2 - 8 = 0\)
  3. \(x^2 -4x + 4 = 0\)
  4. \(x^2 -4x - 4 = 0\)

Factorising the last equation is quite difficult. Use the previous examples as a hint and try to create a difference of two squares.

We have seen that expressions of the form \(x^2 - b^2\) are known as differences of squares and can be factorised as \((x-b)(x+b)\). This simple factorisation leads to another technique for solving quadratic equations known as completing the square.

Consider the equation \(x^2-2x-1=0\). We cannot easily factorise this expression. When we expand the perfect square \((x-1)^2\) and examine the terms we see that \((x-1)^2 = x^2-2x+1\).

We compare the two equations and notice that only the constant terms are different. We can create a perfect square by adding and subtracting the same amount to the original equation.

\begin{align*} x^2-2x-1 &= 0 \\ (x^2-2x+1)-1-1 &= 0 \\ (x^2-2x+1)-2 &= 0 \\ (x-1)^2-2 &= 0 \end{align*}

Method 1: Take square roots on both sides of the equation to solve for \(x\). \begin{align*} (x-1)^2-2 &= 0 \\ (x-1)^2 &= 2 \\ \sqrt{(x-1)^2} &= \pm \sqrt{2} \\ x-1 &= \pm \sqrt{2} \\ x &= 1 \pm \sqrt{2} \\ \text{Therefore }x &= 1 + \sqrt{2} \text{ or }x = 1 - \sqrt{2} \end{align*}

Very important: Always remember to include both a positive and a negative answer when taking the square root, since \(2^2 = 4\) and \((-2)^2 = 4\).

Method 2: Factorise the expression as a difference of two squares using \(2 = \left(\sqrt{2}\right)^2\).

We can write

\begin{align*} (x-1)^2-2 &= 0 \\ (x-1)^2 - \left( \sqrt{2} \right)^2 &= 0 \\ \left( (x-1) + \sqrt{2} \right)\left( (x-1) - \sqrt{2} \right) &= 0 \end{align*}

The solution is then \begin{align*} (x-1) + \sqrt{2} &= 0 \\ x &= 1 - \sqrt{2} \end{align*} or \begin{align*} (x-1) - \sqrt{2} &= 0 \\ x &= 1 + \sqrt{2} \end{align*}

Method for solving quadratic equations by completing the square

  1. Write the equation in the standard form \(a{x}^{2}+bx+c=0\).

  2. Make the coefficient of the \({x}^{2}\) term equal to \(\text{1}\) by dividing the entire equation by \(a\).

  3. Take half the coefficient of the \(x\) term and square it; then add and subtract it from the equation so that the equation remains mathematically correct. In the example above, we added \(\text{1}\) to complete the square and then subtracted \(\text{1}\) so that the equation remained true.

  4. Write the left hand side as a difference of two squares.

  5. Factorise the equation in terms of a difference of squares and solve for \(x\).

Worked example 6: Solving quadratic equations by completing the square

Solve by completing the square: \(x^2-10x-11=0\)

The equation is already in the form \(ax^2 + bx + c = 0\)

Make sure the coefficient of the \(x^2\) term is equal to \(\text{1}\)

\[x^2-10x-11=0\]

Take half the coefficient of the \(x\) term and square it; then add and subtract it from the equation

The coefficient of the \(x\) term is \(-\text{10}\). Half of the coefficient of the \(x\) term is \(-\text{5}\) and the square of it is \(\text{25}\). Therefore \(x^2 - 10x + 25 - 25 - 11 = 0\).

Write the trinomial as a perfect square

\begin{align*} (x^2 - 10x + 25) - 25 - 11 &= 0 \\ (x-5)^2 - 36 &= 0 \end{align*}

Method 1: Take square roots on both sides of the equation

\begin{align*} (x-5)^2 - 36 &= 0 \\ (x-5)^2 &= 36 \\ x-5 &= \pm\sqrt{36} \end{align*}

Important: When taking a square root always remember that there is a positive and negative answer, since \((6)^2 = 36\) and \((-6)^2 = 36\).

\[x - 5 = \pm 6\]

Solve for \(x\)

\[x = -1 \text{ or } x = 11\]

Method 2: Factorise equation as a difference of two squares

\begin{align*} (x-5)^2 - (6)^2 &= 0 \\ \left[\left(x-5\right) + 6\right] \left[\left(x-5\right) - 6\right] &= 0 \end{align*}

Simplify and solve for \(x\)

\begin{align*} (x+1)(x-11) &= 0 \\ \therefore x = -1 \text{ or } x &= 11 \end{align*}

Write the final answer

\[x = -1 \text{ or } x = 11\]

Notice that both methods produce the same answer. These roots are rational because \(\text{36}\) is a perfect square.

Worked example 7: Solving quadratic equations by completing the square

Solve by completing the square: \(2x^2 - 6x - 10 = 0\)

The equation is already in standard form \(a{x}^{2}+bx+c=0\)

Make sure that the coefficient of the \(x^2\) term is equal to \(\text{1}\)

The coefficient of the \({x}^{2}\) term is \(\text{2}\). Therefore divide the entire equation by \(\text{2}\):

\[x^2 - 3x - 5 = 0\]

Take half the coefficient of the \(x\) term, square it; then add and subtract it from the equation

The coefficient of the \(x\) term is \(-\text{3}\), so then \(\left( \dfrac{-3}{2} \right)^2 = \dfrac{9}{4}\):

\[\left( x^2 - 3x + \frac{9}{4}\right) - \frac{9}{4} - 5 = 0\]

Write the trinomial as a perfect square

\begin{align*} \left( x - \frac{3}{2} \right)^2 - \frac{9}{4} - \frac{20}{4} &= 0 \\ \left( x - \frac{3}{2} \right)^2 - \frac{29}{4} &= 0 \end{align*}

Method 1: Take square roots on both sides of the equation

\begin{align*} \left( x - \frac{3}{2} \right)^2 - \frac{29}{4} &= 0 \\ \left( x - \frac{3}{2} \right)^2 &= \frac{29}{4} \\ x - \frac{3}{2} &= \pm \sqrt{\frac{29}{4}} \end{align*}

Remember: When taking a square root there is a positive and a negative answer.

Solve for \(x\)

\begin{align*} x - \frac{3}{2} &= \pm \sqrt{\frac{29}{4}} \\ x &= \frac{3}{2} \pm \frac{\sqrt{29}}{2} \\ &= \frac{3 \pm \sqrt{29}}{2} \end{align*}

Method 2: Factorise equation as a difference of two squares

\begin{align*} \left( x - \frac{3}{2} \right)^2 - \frac{29}{4} &= 0 \\ \left( x - \frac{3}{2} \right)^2 - \left( \sqrt{\frac{29}{4}} \right)^2 &= 0\\ \left( x - \frac{3}{2} - \sqrt{\frac{29}{4}} \right) \left( x - \frac{3}{2} + \sqrt{\frac{29}{4}} \right) &= 0 \end{align*}

Solve for \(x\)

\begin{align*} \left( x - \frac{3}{2} - \frac{\sqrt{29}}{2} \right) \left( x - \frac{3}{2} + \frac{\sqrt{29}}{2} \right) &= 0 \\ \text{Therefore } x = \frac{3}{2} + \frac{\sqrt{29}}{2} &\text{ or } x = \frac{3}{2} - \frac{\sqrt{29}}{2} \end{align*}

Notice that these roots are irrational since \(\text{29}\) is not a perfect square.

Solution by completing the square

Textbook Exercise 2.2

Solve the following equations by completing the square:

\({x}^{2}+10x-2=0\)

\begin{align*} x^2 + 10x - 2 &= 0\\ x^2 +10x&= 2\\ x^2 +10x +25 &= 2 + 25\\ (x+5)^2 - 27 &= 0\\ \left[(x+5) + \sqrt{27}\right]\left[(x+5) - \sqrt{27}\right] &= 0\\ (x+5) = -\sqrt{27} &\text{ or } (x+5) = \sqrt{27}\\ x = -5 - 3\sqrt{3} &\text{ or } x= -5 + 3\sqrt{3} \end{align*}

\({x}^{2}+4x+3=0\)

\begin{align*} x^2+4x+3&=0\\ x^2 +4x &= -3\\ x^2 + 4x + 4 &= -3 + 4\\ (x+2)^2 &= 1\\ (x+2)&= \pm \sqrt {1}\\ &=\pm 1\\ x = -2 + 1 = -1 &\text{ or } x = -2-1=-3 \end{align*}

\(p^2 - 5 = - 8p\)

\begin{align*} p{^2} - 5 &= - 8p\\ p{^2}+8p-5 &= 0\\ p^2 + 8p &=5\\ p^2 + 8p + 16 &= 5 + 16\\ (p+4)^2 &= 21\\ (p+4)&=\pm \sqrt{21}\\ p &= -4 \pm \sqrt{21} \end{align*}

\(2(6x + x^2) = -4\)

\begin{align*} 2(6x + x^2) &= -4 \\ 2x^2+12x+4 &= 0\\ x^2 + 6x + 2 &= 0\\ x^2 +6x &= -2\\ x^2 + 6x + 9&= -2 +9\\ (x+3)^2 &= 7\\ x + 3 &= \pm \sqrt{7}\\ x &= -3 \pm \sqrt{7} \end{align*}

\({x}^{2}+5x+9=0\)

\begin{align*} x^2+5x+9 &= 0\\ x^2 + 5x &= -9\\ x^2 + 5x + \frac{25}{4} &= -9 + \frac{25}{4}\\ \left(x+\frac{5}{2}\right)^2 &= -\frac{11}{4}\\ x + \frac{5}{2} &= \pm \sqrt{-\frac{11}{4}}\\ \text{ No real solution } \end{align*}

\(t^2 + 30 = 2(10-8t)\)

\begin{align*} t^2 + 30 &= 2(10 - 8t) \\ t^2+16t+10&=0\\ t^2 +16t &= -10\\ t^2 + 16t+64 &= -10 +64\\ (t+8)^2&=54\\ t + 8 &= \pm \sqrt{54}\\ t &= -8 \pm \sqrt{9 \times 6} \\ \therefore t &= -8 \pm 3\sqrt{6} \end{align*}

\(3{x}^{2}+6x-2=0\)

\begin{align*} 3x^2+6x-2&=0\\ x^2 + 2x &= \frac{2}{3}\\ x^2 + 2x + 1 &= \frac{2}{3} + 1\\ (x+1)^2 &= \frac{5}{3}\\ x +1 &= \pm \sqrt{\frac{5}{3}}\\ x &= -1 \pm \sqrt{\frac{5}{3}} \end{align*}

\({z}^{2}+8z-6=0\)

\begin{align*} z^2 + 8z - 6 &= 0\\ z^2 +8z &= 6\\ z^2 + 8z+16 &= 6+16\\ (z+4)^2 &= 22\\ z+4 &= \pm \sqrt{22}\\ z &= -4 \pm \sqrt{22} \end{align*}

\(2z^2 = 11z\)

\begin{align*} 2z^2 &= 11z\\ 2z^2 - 11z &= 0\\ z^2 - \frac{11}{2}z &= 0\\ z^2 - \frac{11}{2}z + \frac{121}{16} &= \frac{121}{16}\\ \left(z-\frac{11}{4}\right)^2 &= \frac{121}{16}\\ z - \frac{11}{4} &= \pm \frac{11}{4}\\ z = \frac{11}{4} + \frac{11}{4} = \frac{11}{2} &\text{ or } z = \frac{11}{4} - \frac{11}{4} = 0 \end{align*}

\(5+4z-{z}^{2}=0\)

\begin{align*} 5 + 4z - z^2 &= 0\\ z^2 -4z &= 5\\ z^2 - 4z +4 &= 5+4\\ (z-2)^2 &= 9\\ z-2 &= \pm \sqrt{9}\\ z = 2+3 = 5 &\text{ or } z = 2-3 = -1 \end{align*}

Solve for \(k\) in terms of \(a\): \(k^2 + 6k+ a = 0\)

\begin{align*} k^2 + 6k+ a &= 0\\ k^2 + 6k &= -a\\ k^2 + 6k + 9 &= 9 - a\\ (k + 3)^2 &= 9 - a\\ k + 3 &= \pm \sqrt{9 - a}\\ k & = -3 \pm \sqrt{9 - a} \end{align*}

Solve for \(y\) in terms of \(p\), \(q\) and \(r\): \(py^2 + qy + r = 0\)

\begin{align*} py^2 + qy + r &= 0\\ y^2 + \frac{q}{p}y + \frac{r}{p} &= 0\\ y^2 + \frac{q}{p}y &= -\frac{r}{p}\\ y^{2} + \frac{q}{p}y + \left(\frac{q}{2p}\right)^{2} &= \left(\frac{q}{2p}\right)^{2} - \frac{r}{p}\\ \left(y + \frac{q}{2p}\right)^2 &= \frac{q^{2}}{4p^{2}} - \frac{r}{p} \\ y + \frac{q}{2p} &= \pm \sqrt{\frac{q^{2} - 4pr}{4p^{2}}}\\ y &= -\frac{q}{2p} \pm \frac{\sqrt{q^{2} - 4pr}}{2p}\\ y & = \frac{-q \pm \sqrt{q^{2} - 4pr}}{2p} \end{align*}