Skip to main content
Logo image

Section 3.4 Completing the Square

Not every quadratic equation can be solved easily by factoring or by extraction of roots. If the solutions are not integers, the expression x2+bx+c may be very difficult to factor. For example, the equation x2+3x1=0 cannot be solved easily by either of these methods. In this section we learn a method that will solve any quadratic equation.

Subsection 3.4.1 Squares of Binomials

We can use extraction of roots to solve equations of the form
a(x+p)2+q=0
where the left side of the equation includes the square of a binomial, or a perfect square. It turns out that we can write any quadratic equation in this form.
Study the following squares of binomials.
Square of binomial (x+p)2 p 2p p2
1. (x+5)2=x2+10x+25 5 2(5)=10 52=25
2. (x3)2=x26x+9 3 2(3)=6 (3)2=9
3. (x12)2=x224x+144 12 2(12)=24 (12)2=144
In each case, the square of the binomial is a quadratic trinomial,
(x+p)2=x2+2px+p2
The coefficient of the linear term, 2p, is twice the constant in the binomial, and the constant term of the trinomial, p2, is its square.  [TK]

Checkpoint 3.4.1. QuickCheck 1.

What is the linear term of  (x+6)2  ?
We would like to reverse the process and write a quadratic expression as the square of a binomial. For example, what constant term can we add to
x216x
to produce a perfect square trinomial? Compare the expression to the formula above:
x2+2px+p2=(x+p)2x216x+ ? =(x+ ? )2
We see that  2p=16 , so
p=12(16)=8   and   p2=(8)2=64
We substitute these values for p2 and p into the equation to find
x216x+64=(x8)2
You can check that in the resulting trinomial, the constant term is equal to the square of one-half the coefficient of x. In other words, we can find the constant term by taking one-half the coefficient of x and then squaring the result. Adding a constant term obtained in this way is called completing the square.

Example 3.4.2.

Complete the square by adding an appropriate constant; write the result as the square of a binomial.
  1. x212x+XXXXXX
  2. x2+5x+XXXXXX

Solution.

  1. One-half of 12 is 6, so the constant term is (6)2, or 36. We add 36 to obtain
    x212x+36=(x6)2p=12(12)=6p2=(6)2=360
  2. One-half of 5 is 52, so the constant term is (52)2, or 254.  [TK]
    We add 254 to obtain
    x2+5x+254=(x+52)2p=12(5)=52  p2=(52)2=254

Checkpoint 3.4.3. QuickCheck 2.

True or False.
  1. Every quadratic equation can be solved by factoring.
  2. Every expression of the form x2+bx can be turned into a perfect square by adding an appropriate constant.
  3. The coefficient of the linear term in the expansion of (x+p)2 is twice the constant term in the binomial.
  4. To complete the square means to square the expression.

Checkpoint 3.4.4. Practice 1.

Complete the square by adding an appropriate constant; write the result as the square of a binomial.
  1. x218x+XXXXXX=(x+XXXXXX)2
  2. x2+9x+XXXXXX=(x+XXXXXX)2
Hint:
  1. p=12(18)=_____ , p2= ______
  2. p=12(9)=_____ , p2= ______
Solution.
  1. x218x+81=(x9)2
  2. x2+9x+814=(x+92)2

Subsection 3.4.2 Solving Quadratic Equations by Completing the Square

Now we will use completing the square to solve quadratic equations. First, we will solve equations in which the coefficient of the squared term is 1. Consider the equation
x26x7=0
Step 1 To begin, we move the constant term to the other side of the equation, to get
x26x  XXXXXX=7
Step 2 Next, we complete the square on the left. Because
p=12(6)=3    and    p2=(3)2=9
we add 9 to both sides of our equation to get
x26x+9=7+9
Step 3 The left side of the equation is now the square of a binomial, namely (x3)2. We write the left side in its square form and simplify the right side, which gives us
(x3)2=16
Step 4 We can now use extraction of roots to find the solutions.  [TK]  Taking square roots of both sides, we get
x3=4orx3=4Solve each equation.x=7orx=1
The solutions are 7 and 1.
In Step 3, you can check that this equation is equivalent to the original one; if you expand the left side and collect like terms, you will return to the original equation:
(x3)2=16Expand the square.x26x+9=16Subtract 16 fron both sides.x26c7=0

Note 3.4.5.

parabola with line of symmetry
The graph of y=x26x7 is shown at left. Notice that the x-intercepts of the graph are x=7 and x=1, and the parabola is symmetric about the vertical line halfway between the intercepts, at x=3.
We can also solve x26x7=0 by factoring instead of completing the square. Of course, we get the same solutions by either method. In the next Example, we solve an equation that cannot be solved by factoring.

Example 3.4.6.

Solve x24x3=0 by completing the square.

Solution.

  1. We write the equation with the constant term on the right side.
    x24x XXXXXX=3
  2. We complete the square on the left side. The coefficient of x is 4, so
    p=12(4)=2    and    p2=(2)2=4
    We add 4 to both sides of our equation:
    x24x+4=3+4
  3. We write the left side as the square of a binomial, and combine terms on the right side:
    (x2)2=7
  4. Finally, we use extraction of roots to obtain
    x2=7orx2=7Solve each equation.x=2+7orx=27
    These are the exact values of the solutions. We use a calculator to find decimal approximations for each solution:
    2+74.646   and   270.646
    These values are the x-intercepts of the graph of y=x24x3, as shown below.
    parabola showing x-intercepts and line of symmetry

Checkpoint 3.4.7. QuickCheck 3.

Put the steps for completing the square in the correct order:
  1. Add to both sides of the equation.
  2. Use extraction of roots.
  3. Write the left side as a perfect square.
  4. Write the equation with the constant term on the right side.

Checkpoint 3.4.8. Practice 2.

  1. Follow the steps to solve by completing the square: x21=3x.
    1. Write the equation with the constant on the right.
    2. Complete the square on the left:
      p=12(3)=_____ , ~~~p2=_____
      Add p2 to both sides.
    3. Write the left side as a perfect square; simplify the right side.
    4. Solve by extracting roots.
  2. Find approximations to two decimal places for the solutions.
  3. Graph the parabola y=x23x1 in the window
    Xmin=4.7Xmax=4.7Ymin=5Ymax=5
Solution.
  1. x=32±134
  2. x0.30 or x3.30

Subsection 3.4.3 The General Case

Our method for completing the square works only if the coefficient of x2 is 1. If we want to solve a quadratic equation whose lead coefficient is not 1, we first divide each term of the equation by the lead coefficient.

Example 3.4.9.

Solve   2x26x5=0.

Solution.

  1. Because the coefficient of x2 is 2, we must divide each term of the equation by 2.
    x23x52=0
    Now we proceed as before. Rewrite the equation with the constant on the right side.
    x23x XXXXXX=52
  2. Complete the square:
    p=12(3)=32    and    p2=(32)2=94
    Add 94 to both sides of our equation:
    x23x+94=52+94
  3. Rewrite the left side as the square of a binomial and simplify the right side to get
    (x32)2=194
  4. Finally, extract roots and solve each equation for x.
    x32=194    or    x32=194
    The solutions are 32+194 and 32194.
    Using a calculator, we can find decimal approximations for the solutions: 3.679 and 0.679.

Caution 3.4.10.

In Example 3.4.9, it is essential that we first divide each term of the equation by 2, the coefficient of x2. The following attempt at a solution is incorrect.
2x26x=52x26x+9=5+9(2x3)2=14       Incorrect!
You can check that (2x3)2 is not equal to 2x26x+9. We have not written the left side of the equation as a perfect square, so the solutions we obtain by extracting roots will not be correct.

Checkpoint 3.4.11. Practice 3.

  1. Follow the steps to solve by completing the square:
    4x236x65=0.
    1. Divide each term by 4. Write the equation with the constant on the right.
    2. Complete the square on the left:
      p=12(9)=_____ , p2=_____
      Add p2 to both sides.
    3. Write the left side as a perfect square; simplify the right side.
    4. Solve by extracting roots.
  2. Graph y=4x236x65 in the window
    Xmin=9.4Xmax=0Ymin=10Ymax=20
Solution.
x=132, x=52
Here is a summary of the steps for solving quadratic equations by completing the square.

To Solve a Quadratic Equation by Completing the Square.

    1. Write the equation in standard form.
    2. Divide both sides of the equation by the coefficient of the quadratic term, and subtract the constant term from both sides.
  1. Complete the square on the left side:
    1. Multiply the coefficient of the first-degree term by one-half, then square the result.
    2. Add the value obtained in (a) to both sides of the equation.
  2. Write the left side of the equation as the square of a binomial. Simplify the right side.
  3. Use extraction of roots to finish the solution.

Exercises 3.4.4 Problem Set 3.4

Skills Practice

4.
Add a term to make a square of a binomial.
  1. x214x+XXXXXX
  2. x2+16x+XXXXXX
  3. x2+XXXXXX+36
  4. x2XXXXXX+9
Exercise Group.
For Problems 5 and 6, which of the expressions are squares of binomials?
5.
  1. x2+4x+16
  2. x25x+254
  3. x2+16x+169
6.
  1. x26x+12
  2. x2+9x+81
  3. x232x+94
Exercise Group.
For Problems 7–10, solve by completing the square.
Exercise Group.
For Problems 13–16, choose the best method, then solve the equation

Applications

Exercise Group.
For Problems 17–20,
  1. Use completing the square to find the x-intercepts of the graph.
  2. Find the vertex of the graph
21.
The diagonal of a rectangle is 20 inches. The width of the rectangle is 4 inches shorter than its length.
  1. Write a quadratic equation about the length of the rectangle.
  2. Solve your equation to find the dimensions of the rectangle.
22.
The city park used 136 meters of fence to enclose its rectangular rock garden. The diagonal path across the middle of the garden is 52 meters long. What are the dimensions of the garden?
23.
The sail pictured is a right triangle of base and height x. It has a colored stripe along the hypotenuse and a white triangle of base and height y in the lower corner.
graph
  1. Write an expression for the area of the colored stripe.
  2. Express the area of the stripe in factored form.
  3. The sail is 712 feet high and the white triangle is 412 feet high. Use your answer to part (b) to calculate mentally the area of the stripe.
24.
An hors d’oeuvres tray has radius x, and the dip container has radius y.
graph
  1. Write an expression for the area for the chips (the shaded region).
  2. Express the area in factored form.
  3. The tray has radius 812 inches and the space for the dip has radius 212 inches. Use your answer to part (b) to calculate mentally the area for the chips. Express your answer as a multiple of π.
25.
  1. Write an expression for the area of the square.
    graph
  2. Express the area as a polynomial.
  3. Divide the square into four pieces whose areas are given by the terms of your answer to part (b).
26.
  1. Write an expression for the area of the shaded region.
    graph
  2. Express the area in factored form.
  3. By making one cut in the shaded region, rearrange the pieces into a rectangle whose area is given by your answer to part (b).
Exercise Group.
For Problems 27–30, solve by completing the square. Your answers will involve a, b,  or c  (or a combination of these).
Exercise Group.
For Problems 31–36, solve the formula for the indicated variable.
31.
V=π(r3)2h, for r
36.
4x29y2=36, for y
You have attempted 1 of 1 activities on this page.