学习中心 / 代数

Quadratic equations: how to solve them

Factorising, completing the square, the quadratic formula and the discriminant — and how to tell which method to use.

阅读约 2 分钟更新于 2026年11月2日作者:Sumzo team审核:Sumzo team

A quadratic equation is an equation where the highest power of the unknown is 2. In standard form it is written ax2+bx+c=0ax^2 + bx + c = 0 with a≠0a \neq 0 — for example x2−5x+6=0x^2 - 5x + 6 = 0 or 2x2=4x+62x^2 = 4x + 6 (which rearranges to 2x2−4x−6=02x^2 - 4x - 6 = 0). It has at most two solutions, called roots.

There are three main ways to solve a quadratic equation: factorising, completing the square, and the quadratic formula. Each gives the same roots; the trick is choosing the quickest one.

Method 1: factorising

If the quadratic splits into two brackets, use the fact that a product is zero only when one of its factors is zero.

例题

Solving by factorising

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

显示解题过程
  1. Find two numbers that multiply to 6 and add to −5: −2 and −3.
    (x−2)(x−3)=0(x - 2)(x - 3) = 0
  2. Set each bracket to zero.
    x=2 or x=3x = 2 \text{ or } x = 3

答案: x=2x = 2 or x=3x = 3

已由 Sumzo 数学引擎核验

Method 2: completing the square

Completing the square rewrites x2+bxx^2 + bx as a perfect square minus a number: x2+bx=(x+b2)2−(b2)2x^2 + bx = \left(x + \frac{b}{2}\right)^2 - \left(\frac{b}{2}\right)^2. It always works and is how the quadratic formula is proved.

例题

Completing the square

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

显示解题过程
  1. Half of 6 is 3, so x2+6x=(x+3)2−9x^2 + 6x = (x + 3)^2 - 9.
    (x+3)2−9−7=0(x + 3)^2 - 9 - 7 = 0
  2. Move the numbers across.
    (x+3)2=16(x + 3)^2 = 16
  3. Take square roots — both signs.
    x+3=±4x + 3 = \pm 4
  4. Solve each case.
    x=1 or x=−7x = 1 \text{ or } x = -7
  5. Check: 1+6−7=01 + 6 - 7 = 0 and 49−42−7=049 - 42 - 7 = 0.
    ✓\checkmark

答案: x=1x = 1 or x=−7x = -7

已由 Sumzo 数学引擎核验

Method 3: the quadratic formula

The formula always works, even when the roots are irrational or complex.

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

The discriminant Δ=b2−4ac\Delta = b^2 - 4ac tells you what to expect: two real roots if Δ>0\Delta > 0, one repeated root if Δ=0\Delta = 0, and two complex roots if Δ<0\Delta < 0.

例题

Using the quadratic formula

Solve x2+x−1=0x^2 + x - 1 = 0, giving exact answers.

显示解题过程
  1. Here a=1a = 1, b=1b = 1, c=−1c = -1, so the discriminant is 5.
    Δ=12−4(1)(−1)=5\Delta = 1^2 - 4(1)(-1) = 5
  2. Substitute into the formula.
    x=−1±52x = \frac{-1 \pm \sqrt{5}}{2}

答案: x=−1+52x = \frac{-1 + \sqrt{5}}{2} or x=−1−52x = \frac{-1 - \sqrt{5}}{2} (about 0.618 and −1.618)

已由 Sumzo 数学引擎核验

How to solve a quadratic equation: which method?

  • Small whole numbers that multiply to acac and add to bb? Factorise — it is fastest.
  • The question asks for the vertex, or the form (x+p)2+q(x + p)^2 + q? Complete the square.
  • Anything else — decimals, awkward numbers, or no factor pair works? Use the quadratic formula.
  • Want to see it? Graph y=ax2+bx+cy = ax^2 + bx + c: the roots are where the curve crosses the x-axis.

Common mistakes

  • Forgetting the ± when taking a square root: (x+3)2=16(x + 3)^2 = 16 gives x+3=4x + 3 = 4 or x+3=−4x + 3 = -4.
  • Using the formula before the equation equals zero: 2x2=4x+62x^2 = 4x + 6 must become 2x2−4x−6=02x^2 - 4x - 6 = 0 first.
  • Sign errors with −b-b: for x2−5x+6=0x^2 - 5x + 6 = 0, b=−5b = -5 so −b=5-b = 5.
  • Dividing only part of the top by 2a2a in the formula.

常见问题

What is a quadratic equation?

An equation that can be written as ax2+bx+c=0ax^2 + bx + c = 0 with a≠0a \neq 0 — the unknown is squared, and no higher power appears.

How many solutions can a quadratic equation have?

Two real solutions, one repeated solution, or none that are real (two complex ones). The discriminant b2−4acb^2 - 4ac tells you which.

When should I use the quadratic formula?

Whenever factorising isn’t quick — it works for every quadratic. Check the discriminant first to know whether the roots are whole numbers, surds or complex.

遇到难题?问问 Sumzo AI