# 10.5: Solving Quadratic Equations Using the Method of Completing the Square

$$\newcommand{\vecs}{\overset { \rightharpoonup} {\mathbf{#1}} }$$ $$\newcommand{\vecd}{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}}$$$$\newcommand{\id}{\mathrm{id}}$$ $$\newcommand{\Span}{\mathrm{span}}$$ $$\newcommand{\kernel}{\mathrm{null}\,}$$ $$\newcommand{\range}{\mathrm{range}\,}$$ $$\newcommand{\RealPart}{\mathrm{Re}}$$ $$\newcommand{\ImaginaryPart}{\mathrm{Im}}$$ $$\newcommand{\Argument}{\mathrm{Arg}}$$ $$\newcommand{\norm}{\| #1 \|}$$ $$\newcommand{\inner}{\langle #1, #2 \rangle}$$ $$\newcommand{\Span}{\mathrm{span}}$$ $$\newcommand{\id}{\mathrm{id}}$$ $$\newcommand{\Span}{\mathrm{span}}$$ $$\newcommand{\kernel}{\mathrm{null}\,}$$ $$\newcommand{\range}{\mathrm{range}\,}$$ $$\newcommand{\RealPart}{\mathrm{Re}}$$ $$\newcommand{\ImaginaryPart}{\mathrm{Im}}$$ $$\newcommand{\Argument}{\mathrm{Arg}}$$ $$\newcommand{\norm}{\| #1 \|}$$ $$\newcommand{\inner}{\langle #1, #2 \rangle}$$ $$\newcommand{\Span}{\mathrm{span}}$$$$\newcommand{\AA}{\unicode[.8,0]{x212B}}$$

## The Logic Behind The Method

Suppose we wish to solve the quadratic equation $$x^2 - 3x - 1 = 0$$. Since the equation is not of the form $$x^2 = K$$, we cannot use extraction of roots. Next, we try factoring, but after a few trials we see that $$x^2 - 3x - 1$$ is not factorable. We need another method for solving quadratic equations.

The method we shall study is based on perfect square trinomials and extraction of roots. The method is called solving quadratic equations by completing the square. Consider the equation

$x^2 + 6x + 5 = 0.$

This quadratic equation could be solved by factoring, but we'll use the method of completing the square. We will explain the method in detail after we look at this example. First we'll rewrite the equation as

$x^2 + 6x = -5$

Then, we'll add $$9$$ to each side. We get

$x^2 + 6x + 9 = -5 + 9$

The left side factors as a perfect square trinomial.

$(x + 3)^2 = 4$

We can solve this by the extraction of roots.

$\begin{array}{flushleft} x + 3 &= \pm \sqrt{4}\\ x + 3 &= \pm 2\\ x &= \pm 2 - 3\\ x &= + 2 - 3 & \text{ and } & x = -2 - 3\\ x &= -1 & \text{ and } -5 \end{array}$

Notice that when the roots are rational numbers, the equation is factorable.

The big question is, "How did we know to add 9 to each side of the equation?" We can convert any quadratic trinomial appearing in an equation into a perfect square trinomial if we know what number to add to both sides. We can determine that particular number by observing the following situation:

Consider the square of the binomial and the resulting perfect square trinomial

$(x + p)^2 = x^2 + 2px + p^2$

Notice that the constant term (the number we are looking for) can be obtained from the linear term $$2px$$. If we take one half the coefficient of $$x$$, $$\dfrac{20}{2} = p$$, and square it, we get the constant term $$p^2$$. This is true for every perfect square trinomial with a leading coefficient $$1$$.

##### Note

In a perfect square trinomial with leading coefficient $$1$$, the constant term is the square of one-half the coefficient of the linear term.

Study these examples to see what constant term will make the given binomial into a perfect square trinomial.

##### Example $$\PageIndex{1}$$

$$x^2 + 6x$$. The constant must be the square of one half the coefficient of $$x$$. Since the coefficient of $$x$$ is $$6$$, we have

$$\dfrac{6}{2} = 3$$ and $$3^2 = 9$$

The constant is $$9$$.

$x^2 + 6x + 9 = (x + 3)^2$

This is a perfect square trinomial.

##### Example $$\PageIndex{2}$$

$$a^2 + 10a$$. The constant must be the square of one half the coefficient of $$a$$. Since the coefficient of $$a$$ is $$10$$, we have

$$\dfrac{10}{2} = 5$$ and $$5^2 = 25$$.

The constant is $$25$$

$a^2 + 10a + 25 = (a + 5)^2$

##### Example $$\PageIndex{3}$$

$$y^2 + 3y$$. The constant must be the square of one-half the coefficient of $$y$$. Since the coefficient of $$y$$ is $$3$$, we have

$$\dfrac{3}{2}$$ and $$(\dfrac{3}{2})^2 = \dfrac{9}{4}$$

The constant is $$\dfrac{9}{4}$$.

$y^2 + 3y + \dfrac{9}{4} = (y + \dfrac{3}{2})^2$

## The Method Of Completing The Square

Now, with these observations, we can describe the method of completing the square.

##### The Method of Completing the Square
1. Write the equation so that the constant term appears on the right side of the equation.
2. If the leading coefficient is different from 1, divide each term of the equation by that coefficient.
3. Take one half of the coefficient of the linear term, square it, then add it to both sides of the equation.
4. The trinomial on the left is now a perfect square trinomial and can be factored as $$()^2$$. The first term in the parentheses is the square root of the quadratic term. The last term in the parentheses is one-half the coefficient of the linear term.
5. Solve this equation by extraction of roots.

## Sample Set A

Solve the following equations.

##### Example $$\PageIndex{4}$$

$$\begin{array}{flushleft} x^2 + 8x - 9 &= 0 & \text{ Add } 9 \text{ to both sides.}\\ x^2 + 8x &= 9 & \text{ One half the coefficient of } x \text{ is } 4, \text{ and } 4^2 \text{ is } 16. \text{ Add } 16 \text{ to both sides. }\\ x^2 + 8x + 16 &= 9 + 16\\ x^2 + 8x + 16 &= 25 & \text{ Factor. }\\ (x+4)^2 &= 25 & \text{ Take square roots. }\\ x + 4 &= \pm 5\\ x &= \pm 5 - 4 & +5 - 4 = 1, -5 - 4 = -9\\ x &= 1, -9 \end{array}$$

##### Example $$\PageIndex{5}$$

$$\begin{array}{flushleft} x^2 - 3x - 1 &= 0 & \text{ Add } 1 \text{ to both sides.}\\ && \text{ One half the coefficient of } x \text{ is } \dfrac{-3}{2}.\\ x^2 - 3x &= 1 & \text{ Square it: } (\dfrac{-3}{2})^2 = \dfrac{9}{4}. \text{ Add } \dfrac{9}{4} \text{to each side.}\\ x^2 - 3x + \dfrac{9}{4} &= 1 + \dfrac{9}{4}\\ x^2 - 3x + \dfrac{9}{4} &= \dfrac{13}{4} & \text{Factor. Notice that since the sign of the middle term of the trinomial is "-", its factored form has a "-" sign.}\\ (x - \dfrac{3}{2})^2 &= \dfrac{13}{4} & \text{ Now take square roots }\\ x - \dfrac{3}{2} &= \pm \sqrt{\dfrac{13}{4}}\\ x - \dfrac{3}{2} &= \pm \sqrt{\dfrac{13}{2}}\\ x &= \pm \dfrac{\sqrt{13}}{2} + \dfrac{3}{2}\\ x &= \dfrac{\pm \sqrt{13} + 3}{2}\\ x &= \dfrac{3 \pm \sqrt{13}}{2} \end{array}$$

##### Example $$\PageIndex{6}$$

$$\begin{array}{flushleft} 3a^2 - 36a - 39 &= 0 & \text{ Add } 39 \text{ to both sides.}\\ 3a^2 - 36a &= 39 & \text{ The leading coefficient is } 3 \text{ and we need it to be } 1. \text{ Divide each term by } 3 \text{. One half of the coefficient of } a \text{ is } -6\\ a^2 - 12a &= 13 & \text{ Square it: } (-6)^2 = 36 \text{ Add } 36 \text{ to each side. }\\ a^2 - 12a + 36 &= 13 + 36\\ a^2 - 12a + 36 &= 49\\ (a-6)^2 &= 49 & \text{ Factor. }\\ a - 6 &= \pm 7\\ a &= \pm 7 + 6 & +7 + 6 = 13, -7 + 6 = -1 \end{array}$$

$$a = 13, -1$$.

##### Example $$\PageIndex{7}$$

$$\begin{array}{flushleft} 2x^2 + x + 4 &= 0\\ 2x^2 + x &= -4\\ x^2 + \dfrac{1}{2}x &= -2\\ x^2 + \dfrac{1}{2}x + (\dfrac{1}{4})^2 &= -2 + (\dfrac{1}{4})^2 \end{array}$$

$$(x + \dfrac{1}{4})^2 = -2 + \dfrac{1}{16} = \dfrac{-32}{16} + \dfrac{1}{16} = \dfrac{-31}{16}$$

Since we know that the square of any number is positive, this equation has no real number solution.

##### Example $$\PageIndex{8}$$

Calculator Problem:

Solve $$7a^2 - 5a - 1 = 0$$. Round each solution to the nearest tenth.

$$\begin{array}{flushleft} 7a^2 - 5a - 1 &= 0\\ 7a^2 - 5a &= 1\\ a^2 - \dfrac{5}{7}a &= \dfrac{1}{7}\\ a^2 - \dfrac{5}{7}a + (\dfrac{5}{14})^2 &= \dfrac{1}{7} + (\dfrac{5}{14})^2\\ (a - \dfrac{5}{14})^2 &= \dfrac{1}{7} + \dfrac{25}{196} &= \dfrac{28}{196} + \dfrac{25}{196} = \dfrac{53}{196}\\ a - \dfrac{5}{14} &= \pm \sqrt{\dfrac{53}{196}} &= \pm \dfrac{\sqrt{53}}{14} \end{array}$$

$$a = \dfrac{5}{14} \pm \dfrac{\sqrt{53}}{14} = \dfrac{5 \pm \sqrt{53}}{14}$$

Rounding to tenths, we get $$a \approx -0.2$$. Thus, $$a \approx 0.9$$ and $$-0.2$$ to the nearest tenth.

## Practice Set A

Solve each of the following quadratic equations using the method of completing the square.

##### Practice Problem $$\PageIndex{1}$$

$$x^2 - 2x - 48 = 0$$

$$x=−6, 8$$

##### Practice Problem $$\PageIndex{2}$$

$$x^2 + 3x - 5 = 0$$

$$x = \dfrac{-3 \pm \sqrt{29}}{2}$$

##### Practice Problem $$\PageIndex{3}$$

$$4m^2 + 5m = -1$$

$$m = \dfrac{-1}{4}, -1$$

##### Practice Problem $$\PageIndex{4}$$

$$5y^2 - 2y - 4 = 0$$

$$y = \dfrac{1 \pm \sqrt{21}}{5}$$

##### Practice Problem $$\PageIndex{5}$$

Calculator problem:

Solve $$3x^2 - x - 1= 0$$. Round each solution to the nearest tenth.

$$x = 0.8, -0.4$$

## Exercises

For the following problems, solve the equations by completing the square.

##### Exercise $$\PageIndex{1}$$

$$x^2 +2x - 8 = 0$$

$$x=−4, 2$$

##### Exercise $$\PageIndex{2}$$

$$y^2 - 5y - 6 = 0$$

##### Exercise $$\PageIndex{3}$$

$$a^2 + 7a + 12 = 0$$

$$a=−3, −4$$

##### Exercise $$\PageIndex{4}$$

$$x^2 - 10x + 16 = 0$$

##### Exercise $$\PageIndex{5}$$

$$y^2 - 2y - 24 = 0$$

$$y = -4, 6$$

##### Exercise $$\PageIndex{6}$$

$$a^2 + 2a - 35 = 0$$

##### Exercise $$\PageIndex{7}$$

$$x^2 + 2x + 5 = 0$$

No real number solution.

##### Exercise $$\PageIndex{8}$$

$$x^2 - 6x + 1 = 0$$

##### Exercise $$\PageIndex{9}$$

$$x^2 + 4x + 4 = 0$$

$$x=−2$$

##### Exercise $$\PageIndex{10}$$

$$a^2 + 4a + 7 = 0$$

##### Exercise $$\PageIndex{11}$$

$$b^2 + 5b - 3 = 0$$

$$b = \dfrac{-5 \pm \sqrt{37}}{2}$$

##### Exercise $$\PageIndex{12}$$

$$b^2 - 6b = 72$$

##### Exercise $$\PageIndex{13}$$

$$a^2 + 10a - 9 = 0$$

$$a = -5 \pm \sqrt{34}$$

##### Exercise $$\PageIndex{14}$$

$$a^2 - 2a - 3 = 0$$

##### Exercise $$\PageIndex{15}$$

$$x^2 - 10x = 0$$

$$x=10, 0$$

##### Exercise $$\PageIndex{16}$$

$$y^2 - 8y = 0$$

##### Exercise $$\PageIndex{17}$$

$$a^2 - 6a = 0$$

$$a = 6, 0$$

##### Exercise $$\PageIndex{18}$$

$$b^2 + 6b = 0$$

##### Exercise $$\PageIndex{19}$$

$$-x^2 - 14x = 13$$

$$x=−13, −1$$

##### Exercise $$\PageIndex{20}$$

$$-x^2 +8x = -84$$

##### Exercise $$\PageIndex{21}$$

$$2a^2 + 2a - 1 = 0$$

$$a = \dfrac{-1 \pm \sqrt{3}}{2}$$

##### Exercise $$\PageIndex{22}$$

$$4b^2 - 8b = 16$$

##### Exercise $$\PageIndex{23}$$

$$9x^2 + 12x - 5 = 0$$

$$x = \dfrac{1}{3}, -\dfrac{5}{3}$$

##### Exercise $$\PageIndex{24}$$

$$16y^2 - 8y - 3 = 0$$

##### Exercise $$\PageIndex{25}$$

$$2x^2 + 5x - 4 = 0$$

$$x = \dfrac{-5 \pm \sqrt{57}}{4}$$

##### Exercise $$\PageIndex{26}$$

$$3a^2 + 2a - 24 = 0$$

##### Exercise $$\PageIndex{27}$$

$$x^2 + 2x + 8 = 0$$

No real number solution.

##### Exercise $$\PageIndex{28}$$

$$y^2 - 3y + 10 = 0$$

##### Exercise $$\PageIndex{29}$$

$$7a^2 + 3a - 1 = 0$$

$$a = \dfrac{-3 \pm \sqrt{37}}{14}$$

### Calculator Problems

For the following problems, round each solution to the nearest hundredth.

##### Exercise $$\PageIndex{30}$$

$$5m^2 - 2m - 6 = 0$$

##### Exercise $$\PageIndex{31}$$

$$3y^2 + 5y = 7$$

$$y=0.91, −2.57$$

##### Exercise $$\PageIndex{32}$$

$$1.8x^2 + 2.3x - 4.1 = 0$$

##### Exercise $$\PageIndex{33}$$

$$0.04a^2 - 0.03a + 0.02 = 0$$

No real number solution.

## Exercises For Review

##### Exercise $$\PageIndex{34}$$

Factor $$12ax - 6bx + 20ay - 10by$$ by grouping.

##### Exercise $$\PageIndex{35}$$

Graph the compound inequality $$-6 \le -2x + 2 < -4$$  ##### Exercise $$\PageIndex{36}$$

Find the equation of the line that passes through the points $$(1, -2)$$ and $$(0, 4)$$

##### Exercise $$\PageIndex{37}$$

Find the product: $$\dfrac{x^2 - 4x - 12}{x^2 - 2x - 8} \cdot \dfrac{x^2 - 3x - 4}{x^2 - 3x - 18}$$

$$\dfrac{x+1}{x+3}$$
##### Exercise $$\PageIndex{38}$$
Use the method of extraction of roots to solve $$(x-2)^2 = 25$$