Unit 9 · Lesson 2 of 5

Completing the square

About 25 minutes · 5 steps · one idea: add \(\left(\frac{b}{2}\right)^2\) to make a perfect square

You'll be able to: solve any quadratic equation by turning it into "a square equals a number", even when it does not factor.

  1. 1 Warm-up
  2. 2 The idea
  3. 3 Examples
  4. 4 Practice
  5. 5 Wrap-up

Step 1 of 5Warm-up

Two quick questions from earlier lessons. Answer from memory first. Both are pieces of today's method.

Solve \((x - 4)^2 = 7\).

Square root of both sides, with ±: \(x - 4 = \pm\sqrt{7}\).

Add 4: \(x = 4 \pm \sqrt{7}\).

Factor \(x^2 + 10x + 25\).

25 is \(5^2\), and \(10x = 2 \cdot 5 \cdot x\). This is a perfect square trinomial.

Answer: \((x + 5)^2\).

Step 2 of 5The idea

Look at the warm-up: \(x^2 + 10x + 25 = (x + 5)^2\). The 25 is exactly \(\left(\frac{10}{2}\right)^2\). That always happens: half of the middle number, squared, turns \(x^2 + bx\) into a perfect square trinomial.

So if an equation does not factor, you can add that number to both sides, write the left side as a square, and finish with the square root property from the last lesson. This is called completing the square.

The magic number. For \(x^2 + bx\), add \(\left(\dfrac{b}{2}\right)^2\). Then \(x^2 + bx + \left(\dfrac{b}{2}\right)^2 = \left(x + \dfrac{b}{2}\right)^2\).

Steps to solve \(ax^2 + bx + c = 0\).

1. If \(a \ne 1\), divide every term by \(a\). 2. Move the constant to the right side. 3. Add \(\left(\frac{b}{2}\right)^2\) to both sides. 4. Write the left side as \(\left(x + \frac{b}{2}\right)^2\). 5. Use the square root property.

Fractions are normal here. If \(b = 5\), half of it is \(\frac{5}{2}\) and the magic number is \(\frac{25}{4}\).

Why this shows up on the placement test: it is how the vertex form of a parabola is found, and the quadratic formula in the next lesson comes straight from it.

Step 3 of 5Worked examples

Example 1: \(x^2 + 6x - 7 = 0\)

  1. Move the constant: \(x^2 + 6x = 7\).
  2. Half of 6 is 3, and \(3^2 = 9\). Add 9 to both sides: \(x^2 + 6x + 9 = 16\).
  3. Write the left side as a square: \((x + 3)^2 = 16\). The number inside is half of \(b\): 3.
  4. Root with ±: \(x + 3 = \pm 4\).
  5. Subtract 3: \(x = -3 + 4 = 1\) or \(x = -3 - 4 = -7\). Check: \(1 + 6 - 7 = 0\) and \(49 - 42 - 7 = 0\).

Example 2: \(2x^2 - 8x + 3 = 0\) (when \(a \ne 1\))

  1. Divide every term by 2: \(x^2 - 4x + \dfrac{3}{2} = 0\). The trick needs \(x^2\) alone in front.
  2. Move the constant: \(x^2 - 4x = -\dfrac{3}{2}\).
  3. Half of \(-4\) is \(-2\), and \((-2)^2 = 4\). Add 4 to both sides: \(x^2 - 4x + 4 = -\dfrac{3}{2} + 4 = \dfrac{5}{2}\).
  4. Write as a square: \((x - 2)^2 = \dfrac{5}{2}\).
  5. Root with ±: \(x - 2 = \pm\sqrt{\dfrac{5}{2}} = \pm\dfrac{\sqrt{10}}{2}\). \(\sqrt{\frac{5}{2}} = \frac{\sqrt{5}}{\sqrt{2}} = \frac{\sqrt{5}\cdot\sqrt{2}}{2} = \frac{\sqrt{10}}{2}\) (rationalizing).
  6. Add 2: \(x = 2 \pm \dfrac{\sqrt{10}}{2} = \dfrac{4 \pm \sqrt{10}}{2}\).

Step 4 of 5Practice

Type your answer and press Check. For equations, list every solution separated by commas, or use ± (type +- or ±). If you miss twice, open the worked solution. Then mark how it went.

What number completes the square? \(x^2 + 12x + \underline{\quad}\)

Half of 12 is 6, and \(6^2 = 36\).

Answer: \(36\), because \(x^2 + 12x + 36 = (x + 6)^2\).

What number completes the square? \(x^2 - 5x + \underline{\quad}\)

Half of \(-5\) is \(-\dfrac{5}{2}\), and \(\left(-\dfrac{5}{2}\right)^2 = \dfrac{25}{4}\).

Answer: \(\dfrac{25}{4}\), because \(x^2 - 5x + \dfrac{25}{4} = \left(x - \dfrac{5}{2}\right)^2\).

Solve by completing the square: \(x^2 + 8x = 9\).

Half of 8 is 4, and \(4^2 = 16\). Add 16 to both sides: \(x^2 + 8x + 16 = 25\).

So \((x + 4)^2 = 25\), and \(x + 4 = \pm 5\).

\(x = -4 + 5 = 1\) or \(x = -4 - 5 = -9\).

Solve by completing the square: \(x^2 - 2x - 4 = 0\).

Move the constant: \(x^2 - 2x = 4\).

Half of \(-2\) is \(-1\), and \((-1)^2 = 1\). Add 1: \(x^2 - 2x + 1 = 5\), so \((x - 1)^2 = 5\).

\(x - 1 = \pm\sqrt{5}\), so \(x = 1 \pm \sqrt{5}\).

Solve by completing the square: \(x^2 + 4x + 13 = 0\).

Move the constant: \(x^2 + 4x = -13\).

Half of 4 is 2, and \(2^2 = 4\). Add 4: \(x^2 + 4x + 4 = -9\), so \((x + 2)^2 = -9\).

\(x + 2 = \pm\sqrt{-9} = \pm 3i\), so \(x = -2 \pm 3i\).

Solve by completing the square: \(x^2 + 3x - 1 = 0\).

Move the constant: \(x^2 + 3x = 1\).

Half of 3 is \(\dfrac{3}{2}\), and \(\left(\dfrac{3}{2}\right)^2 = \dfrac{9}{4}\). Add it: \(x^2 + 3x + \dfrac{9}{4} = 1 + \dfrac{9}{4} = \dfrac{13}{4}\).

So \(\left(x + \dfrac{3}{2}\right)^2 = \dfrac{13}{4}\), and \(x + \dfrac{3}{2} = \pm\dfrac{\sqrt{13}}{2}\).

\(x = -\dfrac{3}{2} \pm \dfrac{\sqrt{13}}{2} = \dfrac{-3 \pm \sqrt{13}}{2}\).

Solve by completing the square: \(3x^2 - 6x - 1 = 0\).

Divide every term by 3: \(x^2 - 2x - \dfrac{1}{3} = 0\), so \(x^2 - 2x = \dfrac{1}{3}\).

Half of \(-2\) is \(-1\); add \(1\): \(x^2 - 2x + 1 = \dfrac{4}{3}\), so \((x - 1)^2 = \dfrac{4}{3}\).

\(x - 1 = \pm\sqrt{\dfrac{4}{3}} = \pm\dfrac{2}{\sqrt{3}} = \pm\dfrac{2\sqrt{3}}{3}\).

\(x = 1 \pm \dfrac{2\sqrt{3}}{3} = \dfrac{3 \pm 2\sqrt{3}}{3}\).

Which equation do you get by completing the square on \(x^2 - 10x + 4 = 0\)?

  1. \((x - 5)^2 = 21\)
  2. \((x - 5)^2 = 29\)
  3. \((x + 5)^2 = 21\)
  4. \((x - 10)^2 = 96\)

Move the constant: \(x^2 - 10x = -4\). Half of \(-10\) is \(-5\), and \((-5)^2 = 25\).

Add 25 to both sides: \(x^2 - 10x + 25 = 21\), so \((x - 5)^2 = 21\). That is (a).

(b) adds 25 to \(+4\) instead of to \(-4\). (c) has the wrong sign inside. (d) uses all of \(b\) instead of half of it.

Step 5 of 5Wrap-up

You can now complete the square: make \(x^2\) stand alone, add \(\left(\frac{b}{2}\right)^2\) to both sides, write the square, and solve with ±√. It works on every quadratic, even ones that don't factor.

Read or watch next: OpenStax Intermediate Algebra 2e, 9.2 Solve Quadratic Equations by Completing the Square (free textbook, with more practice at the end of the section).

Also good: Khan Academy: Completing the square intro (short videos). Quick rules: Quadratics cheat sheet.

Something unclear? Ask your teacher bot a follow-up question, for example: "Why do I take half of b and square it? Can you show me with a picture of a square?" It knows this course and can explain things another way.