Skip to content
Tutorials Center
My learning

Topics

Lesson 29 of 37 · Quadratic Equations

Square Roots and Completing the Square

Solve quadratic equations with the square root method and by completing the square, including simplifying radicals, with worked examples and code.

Most quadratic equations do not factor over the integers. x² + 6x + 4 = 0, for example, has no integer pair that multiplies to 4 and adds to 6. You need methods that always work. This lesson gives you the first: use a square root. The next lesson turns it into a formula.

Square roots and the ± sign

The square root of a nonnegative number n, written √n, is the nonnegative number whose square is n. So √49 = 7. But the equation x² = 49 has two solutions, 7 and −7, because both square to 49. We write x = ±7.

For any positive k, the equation x² = k has the solutions x = ±√k. If k = 0 the only solution is 0. If k < 0 there is no real solution, because a real number squared is never negative.

Simplifying radicals. Pull out perfect-square factors: √72 = √(36 · 2) = 6√2. This is exact, while a decimal such as 8.485 is only an approximation.

The square root method

If the equation has a squared quantity by itself, isolate it, then take ± the square root.

Example 1. Solve 3x² − 48 = 0.

  1. 3x² = 48, so x² = 16.
  2. x = ±4.

Example 2. Solve (x − 2)² = 10.

  1. Take the square root of both sides: x − 2 = ±√10.
  2. x = 2 ± √10, which is about 5.16 or −1.16.

Example 3. Solve 2(x + 1)² + 5 = 3. Subtract 5: 2(x + 1)² = −2, so (x + 1)² = −1. A square cannot be negative: no real solutions.

Completing the square

Perfect square trinomials (see Factoring Special Patterns) are the key:

x² + 2px + p² = (x + p)²

Look at the middle term. To turn x² + bx into a perfect square, add (b/2)²:

x² + bx + (b/2)² = (x + b/2)²

Think of x² + bx as a square of side x plus two strips of area (b/2)x. The missing corner has area (b/2)². Adding it completes the square.

Example 4. Solve x² + 6x + 4 = 0.

  1. Move the constant: x² + 6x = −4.
  2. Half of 6 is 3, and 3² = 9. Add 9 to both sides: x² + 6x + 9 = 5.
  3. Factor the left side: (x + 3)² = 5.
  4. Square root: x + 3 = ±√5.
  5. x = −3 ± √5, about −0.76 or −5.24.

Example 5. Solve 2x² − 8x − 10 = 0. If a ≠ 1, divide every term by a first.

  1. Divide by 2: x² − 4x − 5 = 0.
  2. x² − 4x = 5. Half of −4 is −2, and (−2)² = 4.
  3. x² − 4x + 4 = 9, so (x − 2)² = 9.
  4. x − 2 = ±3, so x = 5 or x = −1.

Whatever you add on one side you must add on the other side, or the equation changes.

Python Complete the square step by step

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Why completing the square matters

The method works for every quadratic. It is also how the vertex form of a parabola is found (see Graphing Parabolas): x² + 6x + 4 = (x + 3)² − 5 tells you the lowest point of the curve is at x = −3, where the value is −5.

Python Check the answers with SymPy

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. Solve x² = 25.

    Both 5 and −5 square to 25.
  2. 2. Simplify √50.

    √50 = √(25 · 2) = 5√2.
  3. 3. What number completes the square in x² + 10x?

    Half of 10 is 5, and 5² = 25. Then x² + 10x + 25 = (x + 5)².
  4. 4. Solve (x + 4)² = 9.

    x + 4 = ±3, so x = −4 + 3 = −1 or x = −4 − 3 = −7.

Summary

  • x² = k has solutions x = ±√k when k > 0, one solution when k = 0, and none when k < 0.
  • To complete the square on x² + bx, add (b/2)² to both sides.
  • If a ≠ 1, divide the whole equation by a first.
  • Simplify radicals by pulling out perfect squares.

Next: The Quadratic Formula and the Discriminant