# 10.4: Solving Quadratic Equations by Completing the Square

**At Grade**Created by: CK-12

## Learning Objectives

- Complete the square of a quadratic expression.
- Solve quadratic equations by completing the square.
- Solve quadratic equations in standard form.
- Graph quadratic equations in vertex form.
- Solve real-world problems using functions by completing the square.

## Introduction

You saw in the last section that if you have a quadratic equation of the form \begin{align*}(x - 2)^2 = 5\end{align*}, you can easily solve it by taking the square root of each side:

\begin{align*}x - 2 = \sqrt{5} \ \qquad \text{and} \qquad \ x - 2 = - \sqrt{5}\end{align*}

Simplify to get:

\begin{align*}x = 2 + \sqrt{5} \approx 4.24 \ \qquad \text{and} \qquad \ x = 2 - \sqrt{5} \approx - 0.24\end{align*}

So what do you do with an equation that isn’t written in this nice form? In this section, you’ll learn how to rewrite any quadratic equation in this form by **completing the square.**

## Complete the Square of a Quadratic Expression

Completing the square lets you rewrite a quadratic expression so that it contains a perfect square trinomial that you can factor as the square of a binomial.

Remember that the square of a binomial takes one of the following forms:

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

So in order to have a perfect square trinomial, we need two terms that are perfect squares and one term that is twice the product of the square roots of the other terms.

**Example 1**

*Complete the square for the quadratic expression* \begin{align*}x^2 + 4x\end{align*}.

**Solution**

To complete the square we need a constant term that turns the expression into a perfect square trinomial. Since the middle term in a perfect square trinomial is always 2 times the product of the square roots of the other two terms, we re-write our expression as:

\begin{align*}x^2 + 2(2)(x)\end{align*}

We see that the constant we are seeking must be \begin{align*}2^2\end{align*}:

\begin{align*}x^2 + 2(2)(x) + 2^2\end{align*}

**Answer:** By adding 4 to both sides, this can be factored as: \begin{align*}(x + 2)^2\end{align*}

Notice, though, that we just changed the value of the whole expression by adding 4 to it. If it had been an equation, we would have needed to add 4 to the other side as well to make up for this.

Also, this was a relatively easy example because \begin{align*}a\end{align*}, the coefficient of the \begin{align*}x^2\end{align*} term, was 1. When that coefficient doesn’t equal 1, we have to factor it out from the whole expression before completing the square.

**Example 2**

*Complete the square for the quadratic expression* \begin{align*}4x^2 + 32x\end{align*}.

**Solution**

\begin{align*}& \text{Factor the coefficient of the} \ x^2 \ \text{term}: & & 4(x^2 + 8x)\\ & \text{Now complete the square of the expression in parentheses}.\\ & \text{Re-write the expression}: & & 4 (x^2 + 2(4) (x))\\ & \text{We complete the square by adding the constant} \ 4^2: & & 4(x^2 + 2(4)(x) + 4^2)\\ & \text{Factor the perfect square trinomial inside the parenthesis}: & & 4(x + 4)^2 \qquad \text{Answer}\end{align*}

The expression **“completing the square”** comes from a geometric interpretation of this situation. Let’s revisit the quadratic expression in Example 1: \begin{align*}x^2 + 4x\end{align*}.

We can think of this expression as the sum of three areas. The first term represents the area of a square of side \begin{align*}x\end{align*}. The second expression represents the areas of two rectangles with a length of 2 and a width of \begin{align*}x\end{align*}:

We can combine these shapes as follows:

We obtain a square that is not quite complete. To complete the square, we need to add a smaller square of side length 2.

We end up with a square of side length \begin{align*}(x + 2)\end{align*}; its area is therefore \begin{align*}(x + 2)^2\end{align*}.

## Solve Quadratic Equations by Completing the Square

Let’s demonstrate the method of **completing the square** with an example.

**Example 3**

*Solve the following quadratic equation:* \begin{align*}3x^2 - 10x = -1\end{align*}

**Solution**

Divide all terms by the coefficient of the \begin{align*}x^2\end{align*} term:

\begin{align*}x^2 - \frac{10}{3} x = - \frac{1}{3}\end{align*}

Rewrite: \begin{align*}x^2 - 2 \left ( \frac{5}{3} \right ) (x) = - \frac{1}{3}\end{align*}In order to have a perfect square trinomial on the right-hand-side we need to add the constant \begin{align*}\left ( \frac{5}{3} \right )^2\end{align*}. Add this constant to **both** sides of the equation:

\begin{align*}x^2 - 2 \left ( \frac{5}{3} \right ) (x) + \left ( \frac{5}{3} \right )^2 = - \frac{1}{3} + \left ( \frac{5}{3} \right )^2\end{align*}

Factor the perfect square trinomial and simplify:

\begin{align*}\left ( x - \frac{5}{3} \right )^2 & = - \frac{1}{3} + \frac{25}{9}\\ \left (x - \frac{5}{3} \right )^2 & = \frac{22}{9}\end{align*}

Take the square root of both sides:

\begin{align*}x - \frac{5}{3} &= \sqrt{\frac{22}{9}} && \text{and} && x - \frac{5}{3} = - \sqrt{ \frac{22}{9}}\\ x &= \frac{5}{3} + \sqrt{\frac{22}{9}} \approx 3.23 && \text{and} && x = \frac{5}{3} - \sqrt{\frac{22}{9}} \approx 0.1\end{align*}

**Answer:** \begin{align*}x = 3.23\end{align*} and \begin{align*}x = 0.1\end{align*}

If an equation is in standard form \begin{align*}(ax^2 + bx + c = 0)\end{align*}, we can still solve it by the method of completing the square. All we have to do is start by moving the constant term to the right-hand-side of the equation.

**Example 4**

*Solve the following quadratic equation:* \begin{align*}x^2 + 15x + 12 = 0\end{align*}

**Solution**

Move the constant to the other side of the equation:

\begin{align*}x^2 + 15x = -12\end{align*}

Rewrite: \begin{align*}x^2 + 2 \left ( \frac{15}{2} \right )(x) = -12\end{align*}

Add the constant \begin{align*}\left ( \frac{15}{2} \right )^2\end{align*} to both sides of the equation:

\begin{align*}x^2 + 2\left ( \frac{15}{2} \right )(x) + \left ( \frac{15}{2} \right )^2 = -12 + \left ( \frac{15}{2} \right )^2\end{align*}

Factor the perfect square trinomial and simplify:

\begin{align*}\left (x + \frac{15}{2} \right )^2 & = -12 + \frac{225}{4}\\ \left (x + \frac{15}{2} \right )^2 & = \frac{177}{4}\end{align*}

Take the square root of both sides:

\begin{align*}x + \frac{15}{2} &= \sqrt{\frac{177}{4}} && \text{and} && x + \frac{15}{2} = - \sqrt{\frac{177}{4}}\\ x &= - \frac{15}{2} + \sqrt{\frac{177}{4}} \approx - 0.85 && \text{and} && x = - \frac{15}{2} - \sqrt{\frac{177}{4}} \approx -14.15\end{align*}

**Answer:** \begin{align*}x = -0.85\end{align*} and \begin{align*}x = -14.15\end{align*}

## Graph Quadratic Functions in Vertex Form

Probably one of the best applications of the method of completing the square is using it to rewrite a quadratic function in vertex form. The vertex form of a quadratic function is

\begin{align*}y - k = a(x - h)^2\end{align*}

This form is very useful for graphing because it gives the vertex of the parabola explicitly. The vertex is at the point \begin{align*}(h, k)\end{align*}.

It is also simple to find the \begin{align*}x-\end{align*}intercepts from the vertex form: just set \begin{align*}y = 0\end{align*} and take the square root of both sides of the resulting equation.

To find the \begin{align*}y-\end{align*}intercept, set \begin{align*}x = 0\end{align*} and simplify.

**Example 5**

*Find the vertex, the* \begin{align*}x-\end{align*}*intercepts and the* \begin{align*}y-\end{align*}*intercept of the following parabolas:*

a) \begin{align*}y - 2 = (x - 1)^2\end{align*}

b) \begin{align*}y + 8 = 2(x - 3)^2\end{align*}

**Solution**

a) \begin{align*}y - 2 = (x - 1)^2\end{align*}

Vertex: (1, 2)

To find the \begin{align*}x-\end{align*}intercepts,

\begin{align*}\text{Set} \ y = 0: & & -2 & = (x - 1)^2 \\ \text{Take the square root of both sides}: & & \sqrt{-2} & = x - 1 && \text{and} && -\sqrt{-2} = x - 1\end{align*}

The solutions are not real so there are **no** \begin{align*}x-\end{align*}**intercepts.**

To find the \begin{align*}y-\end{align*}intercept,

\begin{align*}\text{Set} \ x = 0: & & y - 2 & = (-1)^2\\ \text{Simplify}: & & y - 2 & = 1 \Rightarrow \underline{y = 3}\end{align*}

b) \begin{align*}y + 8 = 2(x - 3)^2\end{align*}

\begin{align*}& \text{Rewrite}: & & y - (-8) = 2(x - 3)^2\\ & \text{Vertex}: & & \underline{(3, -8)}\end{align*}

To find the \begin{align*}x-\end{align*}intercepts,

\begin{align*}\text{Set} \ y = 0: & & 8 & = 2 (x - 3)^2\\ \text{Divide both sides by} \ 2: & & 4 & = (x - 3)^2 \\ \text{Take the square root of both sides}: & & 4 & = x - 3 && \text{and} && -4 = x - 3\\ \text{Simplify}: & & & \underline{\underline{x = 7}} && \text{and} && \underline{\underline{x = -1}}\end{align*}

To find the \begin{align*}y-\end{align*}intercept,

\begin{align*}\text{Set} \ x = 0: & & y + 8 & = 2(-3)^2\\ \text{Simplify}: & & y + 8 & = 18 \Rightarrow \underline{\underline{y = 10}}\end{align*}

To graph a parabola, we only need to know the following information:

- the vertex
- the \begin{align*}x-\end{align*}intercepts
- the \begin{align*}y-\end{align*}intercept
- whether the parabola turns up or down (remember that it turns up if \begin{align*}a > 0\end{align*} and down if \begin{align*}a < 0\end{align*})

**Example 6**

*Graph the parabola given by the function* \begin{align*}y + 1 = (x +3)^2\end{align*}.

**Solution**

\begin{align*}& \text{Rewrite}: & & y - (-1) = (x - (-3))^2\\ & \text{Vertex}: & & \underline{(-3, -1)} && \text{vertex}:(-3, -1)\end{align*}

To find the \begin{align*}x-\end{align*}intercepts,

\begin{align*}&\text{Set} \ y = 0: & & 1 = ( x + 3)^2\\ &\text{Take the square root of both sides}: & & 1 = x + 3 \qquad \text{and} \qquad -1 = x + 3\\ &\text{Simplify}: && \underline{\underline{x = -2}} \qquad \quad \text{and} \qquad \quad \ \underline{\underline{x = -4}}\\ &&& x-\text{intercepts}: \ (-2, 0) \ \text{and} \ (-4, 0)\end{align*}

To find the \begin{align*}y-\end{align*}intercept,

\begin{align*}& \text{Set} \ x = 0: & & y + 1 = (3)^2\\ & \text{Simplify:} & & \underline{\underline{y = 8}} && y-\text{intercept}: (0, 8)\end{align*}

And since \begin{align*}a > 0\end{align*}, the parabola **turns up.**

Graph all the points and connect them with a smooth curve:

**Example 7**

*Graph the parabola given by the function* \begin{align*}y = - \frac{1}{2} (x - 2)^2\end{align*}.

**Solution:**

\begin{align*}& \text{Rewrite} & & y - (0) = - \frac{1} {2} (x - 2)^2\\ & \text{Vertex:} & & \underline{(2, 0)} && \text{vertex:} (2, 0)\end{align*}

To find the \begin{align*}x-\end{align*}intercepts,

\begin{align*}\text{Set} \ y = 0: & & 0 & = - \frac{1} {2} (x - 2)^2 \\ \text{Multiply both sides by} \ -2: & & 0 & = (x - 2)^2 \\ \text{Take the square root of both sides}: & & 0 & = x - 2\\ \text{Simplify}: & & & \underline{\underline{x = 2}} && x-\text{intercept:} (2, 0)\end{align*}

Note: there is only one \begin{align*}x-\end{align*}intercept, indicating that the vertex is located at this point, (2, 0).

To find the \begin{align*}y-\end{align*}intercept,

\begin{align*}\text{Set} \ x = 0: & & y & = -\frac{1} {2}(-2)^2 \\ \text{Simplify:} & & y & = - \frac{1} {2} (4) \Rightarrow \underline{\underline{y = -2}} && y- \text{intercept:}(0, -2)\end{align*}

Since \begin{align*}a < 0\end{align*}, the parabola **turns down.**

Graph all the points and connect them with a smooth curve:

## Solve Real-World Problems Using Quadratic Functions by Completing the Square

In the last section you learned that an object that is dropped falls under the influence of gravity. The equation for its height with respect to time is given by \begin{align*}y = \frac{1}{2}gt^2 + y_0\end{align*}, where \begin{align*}y_0\end{align*} represents the initial height of the object and \begin{align*}g\end{align*} is the coefficient of gravity on earth, which equals \begin{align*}-9.8 \ m/s^2\end{align*} or \begin{align*}-32 \ ft/s^2\end{align*}.

On the other hand, if an object is thrown straight up or straight down in the air, it has an initial vertical velocity. This term is usually represented by the notation \begin{align*}v_{0y}\end{align*}. Its value is positive if the object is thrown up in the air and is negative if the object is thrown down. The equation for the height of the object in this case is

\begin{align*}y = \frac{1}{2}gt^2 + v_{0y}t + y_0\end{align*}

Plugging in the appropriate value for \begin{align*}g\end{align*} turns this equation into

\begin{align*}y = -4.9t^2 + v_{0y}t + y_0\end{align*} if you wish to have the height in meters

\begin{align*}y = -16t^2 + v_{0y}t + y_0\end{align*} if you wish to have the height in feet

**Example 8**

*An arrow is shot straight up from a height of 2 meters with a velocity of 50 m/s.*

a) *How high will the arrow be 4 seconds after being shot? After 8 seconds?*

b) *At what time will the arrow hit the ground again?*

c) *What is the maximum height that the arrow will reach and at what time will that happen?*

**Solution**

Since we are given the velocity in m/s, use: \begin{align*}y = -4.9t^2 + v_{0y}t + y_0\end{align*}

We know \begin{align*}v_{0y} = 50 \ m/s\end{align*} and \begin{align*}y_0 = 2\end{align*} meters so: \begin{align*}y = -4.9t^2 + 50t + 2\end{align*}

a) To find how high the arrow will be 4 seconds after being shot we plug in \begin{align*}t = 4\end{align*}:

\begin{align*}y & = -4.9(4)^2 + 50(4) + 2\\ & = -4.9(16) + 200 + 2 = \underline{\underline{123.6 \ feet}}\end{align*}

we plug in \begin{align*}t = 8\end{align*}:

\begin{align*}y & = -4.9(8)^2 + 50(8) + 2\\ & = -4.9(64) + 400 + 2 = \underline{\underline{88.4 \ feet}}\end{align*}

b) The height of the ball arrow on the ground is \begin{align*}y = 0\end{align*}, so: \begin{align*}0 = -4.9t^2 + 50t + 2\end{align*}

Solve for \begin{align*}t\end{align*} by completing the square:

\begin{align*}-4.9t^2 + 50t & = -2\\ -4.9(t^2 - 10.2t) & = -2\\ t^2 - 10.2t & = 0.41\\ t^2 - 2(5.1)t + (5.1)^2 & = 0.41 + (5.1)^2\\ (t - 5.1)^2 & = 26.43\\ t - 5.1 & = 5.14 \ \text{and} \ t - 5.1 = -5.14\\ t & = \underline{\underline{10.2}} \ sec \ \text{and} \ t = -0.04 \ sec\end{align*}

**The arrow will hit the ground about 10.2 seconds after it is shot.**

c) If we graph the height of the arrow with respect to time we would get an upside down parabola \begin{align*}(a < 0)\end{align*}. The maximum height and the time when this occurs is really the vertex of this parabola: \begin{align*}(t, h)\end{align*}.

\begin{align*}& \text{We re-write the equation in vertex form:} && y = -4.9t^2 + 50t + 2\\ & && y - 2 = -4.9t^2 + 50t\\ & && y - 2 = -4.9(t^2 - 10.2t)\\ & \text{Complete the square:} && y - 2 - 4.9(5.1)^2 = -4.9 \left( t^2 - 10.2t + (5.1)^2 \right)\\ & && y - 129.45 = -4.9(t - 5.1)^2\end{align*}

The vertex is at (5.1, 129.45). In other words, **when \begin{align*}t = 5.1 \ seconds\end{align*}, the height is \begin{align*}y = 129 \ meters\end{align*}.**

Another type of application problem that can be solved using quadratic equations is one where two objects are moving away from each other in perpendicular directions. Here is an example of this type of problem.

**Example 9**

*Two cars leave an intersection. One car travels north; the other travels east. When the car traveling north had gone 30 miles, the distance between the cars was 10 miles more than twice the distance traveled by the car heading east. Find the distance between the cars at that time.*

**Solution**

Let \begin{align*}x =\end{align*} the distance traveled by the car heading east

Then \begin{align*}2x + 10 =\end{align*} the distance between the two cars

Let’s make a sketch:

We can use the Pythagorean Theorem to find an equation for \begin{align*}x\end{align*}:

\begin{align*}x^2 + 30^2 = (2x + 10)^2\end{align*}

Expand parentheses and simplify:

\begin{align*}x^2 + 900 & = 4x^2 + 40x + 100\\ 800 & = 3x^2 + 40x\end{align*}

Solve by completing the square:

\begin{align*}\frac{800}{3} &= x^2 + \frac{40}{3}x\\ \frac{800}{3} + \left ( \frac{20}{3} \right )^2 &= x^2 + 2\left ( \frac{20}{3} \right )x + \left ( \frac{20}{3} \right )^2\\ \frac{2800}{9} &= \left ( x + \frac{20}{3} \right )^2\\ x + \frac{20}{3} &= 17.6 \ \text{and} \ x + \frac{20}{3} =-17.6\\ x &= 11 \ \text{and} \ x = -24.3\end{align*}

Since only positive distances make sense here, the distance between the two cars is: \begin{align*}2(11) + 10 = 32 \ miles\end{align*}

## Review Questions

Complete the square for each expression.

- \begin{align*}x^2 + 5x\end{align*}
- \begin{align*}x^2 - 2x\end{align*}
- \begin{align*}x^2 + 3x\end{align*}
- \begin{align*}x^2 - 4x\end{align*}
- \begin{align*}3x^2 + 18x\end{align*}
- \begin{align*}2x^2 - 22x\end{align*}
- \begin{align*}8x^2 - 10x\end{align*}
- \begin{align*}5x^2 + 12x\end{align*}

Solve each quadratic equation by completing the square.

- \begin{align*}x^2 - 4x = 5\end{align*}
- \begin{align*}x^2 - 5x = 10\end{align*}
- \begin{align*}x^2 + 10x + 15 = 0\end{align*}
- \begin{align*}x^2 + 15x + 20 = 0\end{align*}
- \begin{align*}2x^2 - 18x = 3\end{align*}
- \begin{align*}4x^2 + 5x = -1\end{align*}
- \begin{align*}10x^2 - 30x - 8 = 0\end{align*}
- \begin{align*}5x^2 + 15x - 40 = 0\end{align*}

Rewrite each quadratic function in vertex form.

- \begin{align*} y= x^2 - 6x\end{align*}
- \begin{align*}y + 1 = -2x^2 -x\end{align*}
- \begin{align*}y = 9x^2 + 3x - 10\end{align*}
- \begin{align*}y = -32x^2 + 60x + 10\end{align*}

For each parabola, find the vertex; the \begin{align*}x-\end{align*} and \begin{align*}y-\end{align*}intercepts; and if it turns up or down. Then graph the parabola.

- \begin{align*}y - 4 = x^2 + 8x\end{align*}
- \begin{align*}y = -4x^2 + 20x - 24\end{align*}
- \begin{align*}y = 3x^2 + 15x\end{align*}
- \begin{align*}y + 6 = -x^2 + x\end{align*}
- Sam throws an egg straight down from a height of 25 feet. The initial velocity of the egg is 16 ft/sec. How long does it take the egg to reach the ground?
- Amanda and Dolvin leave their house at the same time. Amanda walks south and Dolvin bikes east. Half an hour later they are 5.5 miles away from each other and Dolvin has covered three miles more than the distance that Amanda covered. How far did Amanda walk and how far did Dolvin bike?

### Notes/Highlights Having trouble? Report an issue.

Color | Highlighted Text | Notes | |
---|---|---|---|

Please Sign In to create your own Highlights / Notes | |||

Show More |