Quadratic equation solver
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.
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
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.
Questions
x = (−b ± √(b² − 4ac)) ÷ 2a.