Algebra

Three Ways to Solve a Quadratic Equation

By Math Solving Space · · 2 min read

On this page
  1. Before you start: get it into standard form
  2. Method 1: Factoring
  3. Method 2: The quadratic formula
  4. Method 3: Completing the square
  5. Which method should I use?
  6. Common mistakes
  7. Practice questions
  8. Frequently asked questions

A quadratic equation has the form ax2+bx+c=0ax^2 + bx + c = 0 with a≠0a \ne 0. There are three standard ways to solve one: factoring, the quadratic formula and completing the square. Factoring is fastest when it works, the formula always works, and completing the square explains where the formula comes from.

Before you start: get it into standard form

Move everything to one side so the other side is zero. For example, x2=5x−6x^2 = 5x - 6 becomes

x2−5x+6=0x^2 - 5x + 6 = 0

Now you can read off a=1a = 1, b=−5b = -5 and c=6c = 6.

Method 1: Factoring

Look for two numbers that multiply to cc and add to bb.

For x2−5x+6=0x^2 - 5x + 6 = 0 we need two numbers that multiply to 66 and add to −5-5. Those are −2-2 and −3-3:

x2−5x+6=(x−2)(x−3)=0x^2 - 5x + 6 = (x - 2)(x - 3) = 0

If a product is zero, one of the factors must be zero, so x=2x = 2 or x=3x = 3.

Second example: x2+x−6=0x^2 + x - 6 = 0. Two numbers that multiply to −6-6 and add to 11 are 33 and −2-2:

(x+3)(x−2)=0⇒x=−3 or x=2(x + 3)(x - 2) = 0 \Rightarrow x = -3 \text{ or } x = 2

Method 2: The quadratic formula

This works for every quadratic:

x=−b±b2−4ac2ax = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}

Example: x2−2x−1=0x^2 - 2x - 1 = 0, so a=1a = 1, b=−2b = -2, c=−1c = -1.

x=2±4+42=2±222=1±2x = \frac{2 \pm \sqrt{4 + 4}}{2} = \frac{2 \pm 2\sqrt{2}}{2} = 1 \pm \sqrt{2}

These roots are irrational, which is why factoring would not have found them. As decimals they are about 2.4142.414 and −0.414-0.414.

Method 3: Completing the square

Rewrite the quadratic as a perfect square plus a constant.

For x2−2x−1=0x^2 - 2x - 1 = 0:

  1. Move the constant: x2−2x=1x^2 - 2x = 1.
  2. Add the square of half the xx-coefficient to both sides. Half of −2-2 is −1-1, and (−1)2=1(-1)^2 = 1: x2−2x+1=2x^2 - 2x + 1 = 2.
  3. The left side is now a square: (x−1)2=2(x - 1)^2 = 2.
  4. Take square roots: x−1=±2x - 1 = \pm\sqrt{2}, so x=1±2x = 1 \pm \sqrt{2}.

Same answer as the formula, because the formula is completing the square done once in general.

Which method should I use?

Situation Best method
Small whole-number coefficients Try factoring first
Messy numbers or decimals Quadratic formula
You need the vertex of the parabola Completing the square
You want to know how many roots Work out b2−4acb^2 - 4ac first

Common mistakes

  • Forgetting the ± sign. A quadratic usually has two roots.
  • Sign errors with −b-b. If b=−5b = -5, then −b=5-b = 5.
  • Dividing only part of the numerator by 2a2a. The whole of −b±…-b \pm \sqrt{\ldots} is divided.

Practice questions

  1. Solve x2−7x+12=0x^2 - 7x + 12 = 0 by factoring.
  2. Solve 2x2+3x−2=02x^2 + 3x - 2 = 0 with the formula.
  3. Solve x2+6x+4=0x^2 + 6x + 4 = 0 by completing the square.

Answers: 1) x=3x = 3 or x=4x = 4 2) x=−2x = -2 or x=12x = \frac{1}{2} 3) x=−3±5x = -3 \pm \sqrt{5}

You can check any of these with the quadratic equation solver, which shows the parabola and its roots, or plot the curve in the graphing calculator. For more on the b2−4acb^2 - 4ac part, read what the discriminant tells you.

Frequently asked questions

Can a quadratic have only one solution?

Yes. When b² − 4ac = 0 the two roots are equal, so there is one repeated root, and the parabola just touches the x-axis.

What if b² − 4ac is negative?

There are no real solutions. The roots are complex numbers involving i, where i² = −1.

Does factoring always work?

Only when the roots are rational. The quadratic formula works for every quadratic equation.

Open the calculator →

#quadratics#algebra#equations