Algebra 2

Completing the square

Completing the square turns x2+bxx^2 + bx into a perfect square by adding (b2)2\left(\frac{b}{2}\right)^2, half of b, squared. Then x2+bx+(b2)2=(x+b2)2x^2 + bx + \left(\frac{b}{2}\right)^2 = \left(x + \frac{b}{2}\right)^2. Use it to solve quadratics that do not factor, to rewrite y=ax2+bx+cy = ax^2 + bx + c in vertex form, and to find the center and radius of a circle from its expanded equation.

Updated

The key idea

A perfect square trinomial always has the same pattern: the last number is half the middle coefficient, squared. Completing the square means adding exactly that number so the pattern appears.

x2+bx+(b2)2=(x+b2)2x^2 + bx + \left(\frac{b}{2}\right)^2 = \left(x + \frac{b}{2}\right)^2

For example, half of 10 is 5 and 52=255^2 = 25, so x2+10x+25=(x+5)2x^2 + 10x + 25 = (x + 5)^2.

The steps for solving

  1. If the x2x^2 coefficient is not 1, divide every term by it.
  2. Move the constant to the right side.
  3. Add (b2)2\left(\frac{b}{2}\right)^2 to both sides.
  4. Write the left side as a squared binomial.
  5. Take the square root of both sides, with ±\pm, and solve.

Worked examples

Example 1: solve by completing the square

Problem Solve x2+6x−7=0x^2 + 6x - 7 = 0.

  1. Move the constant to the right.
    x2+6x=7x^2 + 6x = 7
  2. Half of 6 is 3, and 32=93^2 = 9. Add 9 to both sides.
    x2+6x+9=16x^2 + 6x + 9 = 16
  3. The left side is now a perfect square.
    (x+3)2=16(x + 3)^2 = 16
  4. Square root of both sides. Remember both signs: x+3=4x + 3 = 4 or x+3=−4x + 3 = -4.
  5. Subtract 3 in each case: x=1x = 1 or x=−7x = -7. Check: 1+6−7=01 + 6 - 7 = 0 and 49−42−7=049 - 42 - 7 = 0.

Answer x=1x = 1 or x=−7x = -7

Example 2: when the leading coefficient is not 1

Problem Solve 2x2−8x−5=02x^2 - 8x - 5 = 0. Give exact answers.

  1. Divide every term by 2.
    x2−4x−52=0x^2 - 4x - \frac{5}{2} = 0
  2. Move the constant.
    x2−4x=52x^2 - 4x = \frac{5}{2}
  3. Half of −4-4 is −2-2, and (−2)2=4(-2)^2 = 4. Add 4 to both sides.
    x2−4x+4=132x^2 - 4x + 4 = \frac{13}{2}
  4. Factor the left side.
    (x−2)2=132(x - 2)^2 = \frac{13}{2}
  5. Take square roots: x−2=±132x - 2 = \pm\sqrt{\frac{13}{2}}. Since 132=262\sqrt{\frac{13}{2}} = \frac{\sqrt{26}}{2}, add 2 to get the answer.

Answer x=2±262x = 2 \pm \frac{\sqrt{26}}{2}, which is about 4.55 or −0.55-0.55

Example 3: vertex form

Problem Write y=3x2+12x+5y = 3x^2 + 12x + 5 in vertex form and give the vertex.

  1. Factor the 3 out of the x terms only.
    3x2+12x+5=3(x2+4x)+53x^2 + 12x + 5 = 3(x^2 + 4x) + 5
  2. Inside the parentheses, half of 4 is 2, and 22=42^2 = 4. Add 4 and subtract 4 inside so nothing changes.
    3(x2+4x)+5=3(x2+4x+4−4)+53(x^2 + 4x) + 5 = 3(x^2 + 4x + 4 - 4) + 5
  3. Move the −4-4 out. It gets multiplied by the 3 on its way out.
    3(x2+4x+4−4)+5=3(x+2)2−12+53(x^2 + 4x + 4 - 4) + 5 = 3(x + 2)^2 - 12 + 5
  4. Combine the constants.
    3(x+2)2−12+5=3(x+2)2−73(x + 2)^2 - 12 + 5 = 3(x + 2)^2 - 7

Answer y=3(x+2)2−7y = 3(x + 2)^2 - 7, so the vertex is (−2,−7)(-2, -7)

Example 4 (test-hard): center and radius of a circle

Problem Find the center and radius of the circle x2+y2+10x−4y−7=0x^2 + y^2 + 10x - 4y - 7 = 0.

  1. Group the x terms and the y terms, and move the constant.
    x2+10x+y2−4y=7x^2 + 10x + y^2 - 4y = 7
  2. Complete the square twice: add 52=255^2 = 25 for x and (−2)2=4(-2)^2 = 4 for y, on both sides.
    (x2+10x+25)+(y2−4y+4)=7+25+4(x^2 + 10x + 25) + (y^2 - 4y + 4) = 7 + 25 + 4
  3. Factor each group.
    (x+5)2+(y−2)2=36(x + 5)^2 + (y - 2)^2 = 36
  4. Compare with (x−h)2+(y−k)2=r2(x - h)^2 + (y - k)^2 = r^2. Here h=−5h = -5, k=2k = 2, and r2=36r^2 = 36.

Answer Center (−5,2)(-5, 2), radius 6

Common mistakes

  • Adding the number to one side only. If you add 9 on the left, add 9 on the right too. Fix: write "+9" on both sides in the same step.
  • Completing the square before dividing by a. With 2x2−8x2x^2 - 8x, half of −8-8 is not the right number. Fix: make the x2x^2 coefficient 1 first, or factor it out of the x terms.
  • Forgetting the factor outside the parentheses. In 3(x2+4x+4−4)3(x^2 + 4x + 4 - 4), the −4-4 leaves as −12-12, not −4-4. Fix: multiply by the outside factor when you move a number out.
  • Taking only the positive square root. (x+3)2=16(x + 3)^2 = 16 has two answers. Fix: write ±\pm as soon as you take the root.
  • Reading the circle radius as r2r^2. In (x+5)2+(y−2)2=36(x + 5)^2 + (y - 2)^2 = 36, the radius is 6, not 36. Also, the center is (−5,2)(-5, 2): the signs flip.

Quick methods

Practice

5 practice questions

  1. What number should be added to x2−14xx^2 - 14x to make a perfect square trinomial?

    1. 77
    2. 1414
    3. 4949
    4. 196196
    Show answer

    Answer: 4949

    Half of −14-14 is −7-7, and (−7)2=49(-7)^2 = 49. So x2−14x+49=(x−7)2x^2 - 14x + 49 = (x - 7)^2. 7 is half of b but not squared, and 196 squares b without halving.

  2. Which is x2+8x+10x^2 + 8x + 10 written in vertex form?

    1. (x+4)2−6(x + 4)^2 - 6
    2. (x+4)2+10(x + 4)^2 + 10
    3. (x−4)2−6(x - 4)^2 - 6
    4. (x+8)2−54(x + 8)^2 - 54
    Show answer

    Answer: (x+4)2−6(x + 4)^2 - 6

    x2+8x+16−16+10=(x+4)2−6x^2 + 8x + 16 - 16 + 10 = (x + 4)^2 - 6. (x+4)2+10(x + 4)^2 + 10 forgets to subtract the 16 you added. (x−4)2(x - 4)^2 has the wrong sign inside.

  3. Solve x2−2x−4=0x^2 - 2x - 4 = 0 by completing the square.

    1. 1±51 \pm \sqrt{5}
    2. −1±5-1 \pm \sqrt{5}
    3. 1±31 \pm \sqrt{3}
    4. 2±52 \pm \sqrt{5}
    Show answer

    Answer: 1±51 \pm \sqrt{5}

    x2−2x=4x^2 - 2x = 4. Add 1: (x−1)2=5(x - 1)^2 = 5, so x=1±5x = 1 \pm \sqrt{5}. 1±31 \pm \sqrt{3} subtracts the 1 instead of adding it.

  4. What is the vertex of y=−2x2+12x−11y = -2x^2 + 12x - 11?

    1. (3,7)(3, 7)
    2. (−3,7)(-3, 7)
    3. (3,−11)(3, -11)
    4. (6,−11)(6, -11)
    Show answer

    Answer: (3,7)(3, 7)

    −2(x2−6x)−11=−2(x2−6x+9)+18−11=−2(x−3)2+7-2(x^2 - 6x) - 11 = -2(x^2 - 6x + 9) + 18 - 11 = -2(x - 3)^2 + 7. The −9-9 leaves the parentheses as +18+18 because it is multiplied by −2-2.

  5. What is the radius of the circle x2+y2−6x+8y=0x^2 + y^2 - 6x + 8y = 0?

    Show answer

    Answer: 5

    Add 9 and 16 to both sides: (x−3)2+(y+4)2=25(x - 3)^2 + (y + 4)^2 = 25. So r2=25r^2 = 25 and the radius is 5. The center is (3,−4)(3, -4).

Frequently asked questions

When should I complete the square instead of factoring?

Factor first if the numbers work out quickly. Complete the square when the quadratic does not factor nicely, when a problem asks for vertex form, or when you need a circle's center and radius. When the x coefficient is even, it is often faster than the quadratic formula.

Where does the quadratic formula come from?

It is completing the square done once on ax2+bx+c=0ax^2 + bx + c = 0 with letters instead of numbers. Divide by a, move ca\frac{c}{a}, add b24a2\frac{b^2}{4a^2} to both sides, take square roots, and you get x=−b±b2−4ac2ax = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}.

Why do I add the number to both sides?

An equation stays true only if both sides change the same way. When solving, you add to both sides. When rewriting an expression like y=…y = \ldots, there is no other side, so you add and subtract the same number instead, which adds zero.

What if the right side becomes negative?

If you reach (x−h)2=(x - h)^2 = a negative number, there are no real solutions, because no real square is negative. In Algebra 2 you can still solve it with ii: (x−1)2=−9(x - 1)^2 = -9 gives x=1±3ix = 1 \pm 3i.

Try asking Ducky

  • “Why do I halve b and then square it? Show me with a picture.”
  • “I got (x + 4)^2 + 10 for vertex form. What did I miss?”
  • “Give me a circle equation and walk me through finding the center.”

Free to start. The web app works in any browser, Chromebooks included; the Mac app can also draw on your real screen.