Skip to content
Tutorials Center
My learning

Topics

Lesson 11 of 38 · Polynomial Functions

Solving Quadratic Equations

Solve quadratic equations by factoring, square roots, completing the square and the quadratic formula, and use the discriminant to count the real solutions.

A quadratic equation has the form ax² + bx + c = 0 with a ≠ 0. Its solutions are also called roots or zeros, and they are the x-intercepts of the graph of f(x) = ax² + bx + c. There are four main methods. Learning when each one is easiest will save you a lot of work.

Method 1: factoring and the zero product property

If a product is zero, at least one factor is zero: pq = 0 means p = 0 or q = 0. So if you can factor, set each factor to zero.

Example 1. Solve x² - 5x + 6 = 0. Find two numbers that multiply to 6 and add to -5: they are -2 and -3. So (x - 2)(x - 3) = 0, giving x = 2 or x = 3.

Example 2. Solve 2x² + 7x - 4 = 0. Multiply a·c = -8. Find two numbers with product -8 and sum 7: 8 and -1. Split the middle term: 2x² + 8x - x - 4 = 2x(x + 4) - (x + 4) = (2x - 1)(x + 4). Roots: x = 1/2 or x = -4.

Always move everything to one side so the other side is zero before factoring. x² = 3x must become x² - 3x = 0, giving x(x - 3) = 0. Dividing by x would lose the solution x = 0.

Method 2: square roots

If there is no x term, isolate the square. Example 3. 3x² - 48 = 0 gives x² = 16, so x = ±4. The symbol ± ("plus or minus") records both roots. This also works with a squared bracket: (x - 2)² = 9 gives x - 2 = ±3, so x = 5 or x = -1.

Method 3: completing the square

This works on every quadratic. Example 4. Solve x² + 6x - 7 = 0. Move the constant: x² + 6x = 7. Add (6/2)² = 9 to both sides: x² + 6x + 9 = 16, so (x + 3)² = 16, then x + 3 = ±4. Roots: x = 1 or x = -7.

Method 4: the quadratic formula

Apply completing the square to the general equation ax² + bx + c = 0 and you get the quadratic formula:

Text
x = (-b ± √(b² - 4ac)) / (2a)

Example 5. Solve 2x² - 3x - 4 = 0. Here a = 2, b = -3, c = -4. The part under the root is b² - 4ac = 9 + 32 = 41. So x = (3 ± √41)/4, which is about 2.35 or -0.85. The roots are irrational, so factoring would never have worked.

Python A quadratic equation solver

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.

The last line prints values very close to zero. That is a residual: what is left when you substitute a root back in. Tiny nonzero residuals come from rounding, not from a wrong answer.

The discriminant

The expression under the root, D = b² - 4ac, is the discriminant. It tells you how many real roots to expect without solving.

Discriminant Real roots Graph
D > 0 two different crosses the x-axis twice
D = 0 one repeated touches the x-axis at the vertex
D < 0 none never reaches the x-axis

When D < 0 there are still two solutions; they are complex numbers, introduced in chapter 7. If D is a perfect square (and a, b, c are integers), the roots are rational and the equation factors over the integers.

Example 6. For x² + 4x + 5 = 0, D = 16 - 20 = -4 < 0: no real roots. The parabola's vertex is at (-2, 1), above the axis, and it opens upward.

Python Classify equations with the discriminant

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.

Which method should I use?

flowchart TD
    S["ax² + bx + c = 0"] --> Q1{"No x term?"}
    Q1 -- "yes" --> SR["Isolate x² and take square roots"]
    Q1 -- "no" --> Q2{"Factors easily?"}
    Q2 -- "yes" --> FA["Factor, zero product property"]
    Q2 -- "no" --> QF["Quadratic formula"]

A quick decision guide. Completing the square is the method that proves the formula and gives vertex form.

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. Solve x² - 9x + 20 = 0.

    (x - 4)(x - 5) = x² - 9x + 20.
  2. 2. What is the discriminant of 3x² + 2x + 5?

    b² - 4ac = 4 - 60 = -56, so there are no real roots.
  3. 3. Solve (x + 1)² = 25.

    x + 1 = ±5, so x = 4 or x = -6.
  4. 4. A quadratic has discriminant 0. Its graph

    D = 0 gives one repeated root, so the vertex lies on the x-axis.

Summary

  • Move all terms to one side before factoring; use the zero product property.
  • Square roots handle equations with no x term; remember ±.
  • Completing the square works for every quadratic and leads to the quadratic formula.
  • The discriminant b² - 4ac tells you whether there are two, one or no real roots.
  • Check roots by substitution.

Next: Polynomial Operations and Long Division