Maths Algebra

Quadratic equation solver

a
b
c
Roots 2, 1
1x² + -3x + 2 · discriminant 1
What kind two real roots
Discriminant 1
First root 2
Second root 1
Vertex x 1.5
Vertex y -0.25
Discriminant b² − 4ac decides the roots

The b² − 4ac term under the square root decides everything. Positive gives two distinct real roots, zero gives one repeated root where the parabola just touches the axis, and negative gives a complex pair. Checking it first tells you what kind of answer to expect, and it is the fastest way to spot an arithmetic slip; a negative discriminant on a problem that should have real roots means a sign is wrong.

Advertisement
320 × 100

The quadratic formula gives x = (−b ± √(b² − 4ac)) ÷ 2a. For x² − 3x + 2, the discriminant is 1 and the roots are 2 and 1. A negative discriminant means the roots are a complex conjugate pair.

How to solve a quadratic

1 Enter a, b and c with their signs: the equation is read as ax² + bx + c = 0.
2 Read the two roots, then the discriminant that produced them.
3 A negative discriminant is answered with a complex pair rather than an error.
4 Use the vertex rows when you want the turning point rather than the crossings.

Completing the square is where the formula comes from, and it also gives the vertex directly. Writing ax² + bx + c as a(x + b∕2a)² + (c − b²∕4a) shows the turning point at x = −b∕2a immediately. That form is often more useful than the roots: for a projectile it gives the maximum height, and for an optimisation problem it gives the answer without needing calculus. The formula has one real failure mode and it is arithmetic rather than algebra. When b² dwarfs 4ac, −b and √(b² − 4ac) are almost equal, and subtracting two nearly equal numbers throws away most of the digits you had. Solve x² − 200,000x + 1 = 0 in ordinary double-precision and the small root comes back as 0.0000049999944 where it should be 0.0000050000000. Correct to about six significant figures where a double normally carries sixteen. This page uses the standard formula, so on coefficients that lopsided, take the larger root as reliable and recover the smaller one from the fact that the two must multiply to c∕a.

Questions

x = (−b ± √(b² − 4ac)) ÷ 2a.

Advertisement
300 × 250
Was this tool any good?
Internal signal only · I use it to find the tools worth rebuilding