Loading [MathJax]/jax/output/HTML-CSS/jax.js
Skip to main content
Library homepage
 

Text Color

Text Size

 

Margin Size

 

Font Type

Enable Dyslexic Font
Mathematics LibreTexts

8.3: Completing the Square

( \newcommand{\kernel}{\mathrm{null}\,}\)

In Introduction to Radical Notation, we showed how to solve equations such as x2=9 both algebraically and graphically.

x2=9x=±3

fig 8.3.1.png
Figure 8.3.1

Note that when we take the square root of both sides of this equation, there are two answers, one negative and one positive.

A perfect square is nice, but not required. Indeed, we may even have to factor out a perfect square to put our final answer in simple form.

x2=8x=±8x=±42x=±22

fig 8.3.2.png
Figure 8.3.2

Readers should use their calculators to check that 222.8284 and 222.8284.

Now, let’s extend this solution technique to a broader class of equations.

Example 8.3.1

Solve for x:(x4)2=9

Solution

Much like the solutions of x2=9 are x=±3, we use a similar approach on (x4)2=9 to obtain:

(x4)2=9 Original equation. x4=±3 There are two square roots. 

To complete the solution, add 4 to both sides of the equation.

x=4±3 Add 3 to both sides. 

Note that this means that there are two answers, namely:

x=43x=1

or

x=4+3x=7

Check: Check each solution by substituting it into the original equation.

Substitute 1 for x:

(x4)2=9(14)2=9(3)2=9

Substitute 7 for x:

(x4)2=9(74)2=9(3)2=9

Because the last statement in each check is a true statement, both x=1 and x=7 are valid solutions of (x4)2=9.

Exercise 8.3.1

Solve for x:(x+6)2=10

Answer

2, 10

In Example 8.3.1, the right-hand side of the equation (x4)2=9 was a perfect square. However, this is not required, as the next example will show.

Example 8.3.2

Solve for x:(x+5)2=7

Solution

Using the same technique as in Example 8.3.1, we obtain:

(x+5)2=7 Original equation. x+5=±7 There are two square roots. 

To complete the solution, subtract 5 from both sides of the equation.

x=5±7 Subtract 5 from both sides.

Note that this means that there are two answers, namely:

x=57 or x=5+7

Check: Check each solution by substituting it into the original equation.

Substitute 57 for x:

(x+5)2=7((57)+5)2=7(7)2=7

Substitute 5+7 for x:

(x+5)2=7((5+7)+5)2=7(7)2=7

Because the last statement in each check is a true statement, both x=57 and x=5+7 are valid solutions of (x+5)2=7.

Exercise 8.3.2

Solve for x:(x4)2=5

Answer

4+5,45

Sometimes you will have to factor out a perfect square to put your answer in simple form.

Example 8.3.3

Solve for x:(x+4)2=20

Solution

Using the same technique as in Example 8.3.1, we obtain:

(x+4)2=20 Original equation. x+4=±20 There are two square roots. x+4=±45 Factor out a perfect square. x+4=±25 Simplify: 4=2

To complete the solution, subtract 4 from both sides of the equation.

x=4±25 Subtract 4 from both sides. 

Note that this means that there are two answers, namely:

x=425 or x=4+25

Check: Although it is possible to check the exact answers, let’s use our calculator instead. First, store 425 in X. Next, enter the left-hand side of the equation (x+4)2=20 (see image on the left in Figure 8.3.3). Note that (x+4)2 simplifies to 20, showing that 425 is a solution of (x+4)2=20.

In similar fashion, the solution 4+25 also checks in (x+4)2=20 (see image on the right in Figure 8.3.3).

fig 8.3.3.png
Figure 8.3.3: Checking 425 and 4+25 in the equation (x+4)2=20.

Exercise 8.3.3

Solve for x:(x+7)2=18

Answer

7+32,732

Perfect Square Trinomials Revisited

Recall the squaring a binomial shortcut.

Squaring a Binomial

If a and b are any real numbers, then: (a±b)2=a2±2ab+b2That is, you square the first term, take the product of the first and second terms and double the result, then square the third term.

Reminder examples:

(x+3)2=x2+2(x)(3)+32=x2+6x+9

(x8)2=x22(x)(8)+82=x216x+64

Because factoring is “unmultiplying,” it is a simple matter to reverse the multiplication process and factor these perfect square trinomials.

x2+6x+9=(x+3)2

x216x+64=(x8)2

Note how in each case we simply take the square root of the first and last terms.

Example 8.3.4

Factor each of the following trinomials:

  1. x212x+36
  2. x2+10x+25
  3. x234x+289

Solution

Whenever the first and last terms of a trinomial are perfect squares, we should suspect that we have a perfect square trinomial.

  1. The first and third terms of x212x+36 are perfect squares. Hence, we take their square roots and try:x212x+36=(x6)2Note that 2(x)(6)=12x, which is the middle term on the left. The solution checks.
  2. The first and third terms of x2+10x+25 are perfect squares. Hence, we take their square roots and try:x2+10x+25=(x+5)2Note that 2(x)(5)=10x, which is the middle term on the left. The solution checks.
  3. The first and third terms of x234x+289 are perfect squares. Hence, we take their square roots and try:x234x+289=(x17)2Note that 2(x)(17)=34x, which is the middle term on the left. The solution checks.

Exercise 8.3.4

Factor: x2+30x+225

Answer

(x+15)2

Completing the Square

In this section we start with the binomial x2+bx and ask the question “What constant value should we add to x2+bx so that the resulting trinomial is a perfect square trinomial?” The answer lies in this procedure.

Completing the square

To calculate the constant required to make x2+bx a perfect square trinomial:

  1. Take one-half of the coefficient of x:b2
  2. Square the result of step one: (b2)2=b24
  3. Add the result of step two to x2+bx:x2+bx+b24

If you follow this process, the result will be a perfect square trinomial which will factor as follows:

x2+bx+b24=(x+b2)2

Example 8.3.5

Given x2+12x, complete the square to create a perfect square trinomial.

Solution

Compare x2+12x with x2+bx and note that b=12.

  1. Take one-half of 12:6
  2. Square the result of step one: 62=36
  3. Add the result of step two to x2+12x:x2+12x+36

Check: Note that the first and last terms of x2+12x+36 are perfect squares. Take the square roots of the first and last terms and factor as follows:

x2+12x+36=(x+6)2

Note that 2(x)(6)=12x, so the middle term checks.

Exercise 8.3.5

Given x2+16x, complete the square to create a perfect square trinomial.

Answer

x2+16x+64=(x+8)2

Example 8.3.6

Given x23x, complete the square to create a perfect square trinomial.

Solution

Compare x23x with x2+bx and note that b=3.

  1. Take one-half of 3:32
  2. Square the result of step one: (32)2=94
  3. Add the result of step two to x23x:x23x+94

Check: Note that the first and last terms of x23x+94 are perfect squares. Take the square roots of the first and last terms and factor as follows:

x23x+94=(x32)2

Note that 2(x)(32)=3x, so the middle term checks.

Exercise 8.3.6

Given x25x, complete the square to create a perfect square trinomial.

Answer

x25x+104=(x52)2

Solving Equations by Completing the Square

Consider the following nonlinear equation.

x2=2x+2

The standard approach is to make one side zero and factor.x22x2=0 However, one quickly realizes that there is no integer pair whose product is ac=2 and whose sum is b=2. So, what does one do in this situation? The answer is “Complete the square.”

Example 8.3.7

Use completing the square to help solve x2=2x+2.

Solution

First, move 2x to the left-hand side of the equation, keeping the constant 2 on the right-hand side of the equation.x22x=2On the left, take one-half of the coefficient of x:(12)(2)=1. Square the result: (1)2=1. Add this result to both sides of the equation.

x22x+1=2+1x22x+1=3

We can now factor the left-hand side as a perfect square trinomial.

(x1)2=3

Now, as in Examples 8.3.1, 8.3.2, and 8.3.3, we can take the square root of both sides of the equation. Remember, there are two square roots.

x1=±3

Finally, add 1 to both sides of the equation.

x=1±3

Thus, the equation x2=2x+2 has two answers, x=13 and x=1+3.

Check: Let’s use the calculator to check the solutions. First, store 13 in X (see the image on the left in Figure 8.3.4). Then enter the left- and right-hand sides of the equation x2=2x+2 and compare the results (see the image on the left in Figure 8.3.4). In similar fashion, check the second answer 1+3 (see the image on the right in Figure 8.3.4).

fig 8.3.4.png
Figure 8.3.4: Checking 13 and 1+3 in the equation x2=2x+2.

In both cases, note that the left- and right-hand sides of x2=2x+2 produce the same result. Hence, both 13 and 1+3 are valid solutions of x2=2x+2.

Exercise 8.3.7

Use completing the square to help solve x2=36x.

Answer

3+23,323

Example 8.3.8

Solve the equation x28x12=0, both algebraically and graphically. Compare your answer from each method.

Solution

First, move the constant 12 to the right-hand side of the equation.

x28x12=0 Original equation. x28x=12 Add 12 to both sides. 

Take half of the coefficient of x:(1/2)(8)=4. Square: (4)2=16. Now add 16 to both sides of the equation.

x28x+16=12+16 Add 16 to both sides. (x4)2=28 Factor left-hand side. x4=±28 There are two square roots. 
Note that the answer is not in simple radical form.

x4=±47 Factor out a perfect square. x4=±27 Simplify: 4=2x=4±27 Add 4 to both sides. 

Graphical solution: Enter the equation y=x28x12 in Y1 of the Y= menu (see the first image in Figure 8.3.5). After some experimentation, we settled on the WINDOW parameters shown in the middle image of Figure 8.3.5. Once you’ve entered these WINDOW parameters, push the GRAPH button to produce the rightmost image in Figure 8.3.5.

fig 8.3.5.png
Figure 8.3.5: Drawing the graph of y=x28x12.

We’re looking for solutions of x28x12=0, so we need to locate where the graph of y=x28x12 intercepts the x-axis. That is, we need to find the zeros of y=x28x12. Select 2:zero from the CALC menu, move the cursor slightly to the left of the first x-intercept and press ENTER in response to “Left bound.” Move the cursor slightly to the right of the first x-intercept and press ENTER in response to “Right bound.” Leave the cursor where it sits and press ENTER in response to “Guess.” The calculator responds by finding the x-coordinate of the x-intercept, as shown in the first image in Figure 8.3.6.

Repeat the process to find the second x-intercept of y=x28x12 shown in the second image in Figure 8.3.6.

fig 8.3.6.png
Figure 8.3.6: Calculating the zeros of y=x28x12.

Reporting the solution on your homework: Duplicate the image in your calculator’s viewing window on your homework page. Use a ruler to draw all lines, but freehand any curves.

  • Label the horizontal and vertical axes with x and y, respectively (see Figure 8.3.7).
  • Place your WINDOW parameters at the end of each axis (see Figure 8.3.7).
  • Label the graph with its equation (see Figure 8.3.7).
  • Drop dashed vertical lines through each x-intercept. Shade and label the x-values of the points where the dashed vertical line crosses the x-axis. These are the solutions of the equation x28x12=0 (see Figure 8.3.7).
fig 8.3.7.png
Figure 8.3.7: Reporting your graphical solution on your homework.

Thus, the graphing calculator reports that the solutions of x28x12=0 are x1.291503 and x9.2915026.

Comparing exact and calculator approximations: How well do the graphing calculator solutions compare with the exact solutions, x=427 and x=4+27? After entering each in the calculator (see Figure 8.3.8), the comparison is excellent!

fig 8.3.8.png
Figure 8.3.8: Approximating exact solutions x=427 and x=4+27.

Exercise 8.3.8

Solve the equation x2+6x+3=0 both algebraically and graphically, then compare your answers.

Answer

36,3+6

Exercise 8.3.8.png


This page titled 8.3: Completing the Square is shared under a CC BY-NC-ND 3.0 license and was authored, remixed, and/or curated by David Arnold via source content that was edited to the style and standards of the LibreTexts platform.

Support Center

How can we help?