Quadratic Equation Solver
Solve any quadratic equation with exact roots (surds and complex too), the discriminant, the vertex, a graph and every step.
ax² + bx + c = 0
Factoring needs rational roots.
x = (3 ± √41)/4
- x₁
- (3 + √41)/4 ≈ 2.35
- x₂
- (3 − √41)/4 ≈ −0.85
- Discriminant
- 41
- Vertex (minimum)
- (0.75, −5.125)
- Axis of symmetry
- x = 0.75
- Vertex form
- 2(x − 0.75)² − 5.125
- Factored form
- 2(x − (3 + √41)/4)(x − (3 − √41)/4)
- Sum of roots
- 3/2
- Product of roots
- −2
Working
Enter the coefficients a, b and c, or type the equation as it stands, and the solver gives both roots exactly: reduced fractions, simplified surds such as (3 ± √41)/4, and complex pairs such as −1 ± 2i, each with its decimal. Beside the roots it gives the discriminant, the vertex and axis of symmetry, the vertex and factored forms, and the sum and product of the roots, with the parabola drawn to scale.
The working follows the method you choose: the quadratic formula, completing the square, or factoring by splitting the middle term, every step in your own numbers.
How to use it
a, b and c take whole numbers, decimals and fractions (3/4 or 1 1/2), worked exactly, so 0.1x² + 0.2x − 0.3 gives 1 and −3 with no rounding on the way. Enter 0 for a missing term. A parabola's link in the Graphing Calculator opens here with its a, b and c filled in.
Equation takes a quadratic in x with terms on either side, brackets and powers: 2x^2 − 3x = 5, x² = 4x or 3(x − 1)^2 = 12. The first step of the working brings every term to the left. An expression without “=” is taken as equal to 0.
Working by picks the method the steps follow. Factoring is offered only when the roots are rational, since only then does the quadratic split into brackets with whole numbers. Decimal places sets the decimals, from 0 to 10, or Auto for ten significant figures.
How it works
The discriminant D = b² − 4ac decides what the roots are. A positive D that is a perfect square gives two rational roots; any other positive D gives two irrational roots, a pair of surds; D = 0 gives one double root, where the parabola touches the x-axis at its vertex; and a negative D gives two complex roots, a conjugate pair a ± bi, where the parabola never meets the x-axis.
Completing the square divides by a, moves the constant across, and adds (b ÷ 2a)² to both sides, so the left side becomes a perfect square. Taking the square root of both sides is where the ± comes from, and the quadratic formula is this same working done once with letters.
The square root of D is simplified by taking out square factors: √48 = 4√3. A D larger than 10¹² that is not a perfect square is left as √D, as finding its square factors would take too long. Decimals are worked from the exact root to well past the places shown, so a small root beside a large one keeps its digits.
x = (−b ± √D) ÷ 2a, where D = b² − 4ac
D > 0: two real roots; D = 0: one double root; D < 0: two complex roots
Vertex: (−b ÷ 2a, −D ÷ 4a); axis of symmetry x = −b ÷ 2a
Vertex form: a(x − h)² + k; factored form: a(x − x₁)(x − x₂)
Sum of roots −b ÷ a; product of roots c ÷ a
Examples
Two rational roots, by factoring
With a = 2, b = −3 and c = −5, and Working by Factoring, the two numbers that multiply to ac and add to b split the middle term:
- Find two numbers that multiply to ac = −10 and add to b = −3 −5 × 2 = −10 and −5 + 2 = −3
- Split the middle term 2x² − 5x + 2x − 5 = 0
- Factor each pair x(2x − 5) + 1(2x − 5) = 0
- Take out the common bracket (2x − 5)(x + 1) = 0
- Set each factor to 0 x = 5/2 or x = −1
Surd roots
With a = 2, b = −3 and c = −4, the discriminant is 41, which is not a perfect square, so x = (3 ± √41)/4: x ≈ 2.35 or x ≈ −0.85 to the default two places. The vertex is (0.75, −5.125), and the factored form is 2(x − (3 + √41)/4)(x − (3 − √41)/4).
Complex roots
With a = 2, b = 1 and c = 1, the discriminant is −7, so the roots are a complex pair: x = (−1 ± i√7)/4, or x ≈ −0.25 + 0.66i or x ≈ −0.25 − 0.66i. The parabola's vertex, (−0.25, 0.875), sits above the x-axis and the parabola opens upward, so it never crosses it.
A typed equation
- Equation
- 3(x − 1)^2 = 12
The brackets are expanded and 12 brought across, giving 3x² − 6x − 9 = 0, so x = 3 or x = −1.
- Bring every term to the left side and collect like terms 3x² − 6x − 9 = 0
- Read the coefficients a = 3, b = −6, c = −9
- Work out the discriminant D = b² − 4ac = (−6)² − 4 × 3 × (−9) = 36 + 108 = 144
- D is a perfect square, so the roots are rational
- Put them into the formula x = (−b ± √D) ÷ 2a x = (6 ± √144) ÷ 6
- Simplify the root √144 = 12
- Take + and − in turn x = (6 + 12) ÷ 6 = 3 or x = (6 − 12) ÷ 6 = −1
Frequently asked questions
See also
- Graphing Calculator — to plot the parabola with a, b and c on sliders, beside other curves.
- Fraction Calculator — for the fractions inside a root or a vertex, worked step by step.
- Scientific Calculator — for a root's decimal inside a longer calculation, with √ typed as it reads.