What This Calculator Does
This tool solves a quadratic equation of the form ax² + bx + c = 0 for the variable x. Enter the three coefficients a, b and c, and the calculator returns both roots (x₁ and x₂), the discriminant, and tells you whether the roots are real or complex. It works for any real coefficients and is a universal algebra tool with no regional restrictions.
How to Use It
Type the coefficient of x² as a, the coefficient of x as b, and the constant term as c. For example, the equation 2x² − 3x − 5 = 0 has a = 2, b = −3, c = −5. Press calculate to see the roots immediately. If you accidentally set a = 0 the equation is no longer quadratic, so the tool gracefully solves the linear case bx + c = 0 instead.
The Formula Explained
The quadratic formula is $$x = \frac{-b \pm \sqrt{b^{2} - 4ac}}{2a}$$ The quantity inside the square root, \(\Delta = b^{2} - 4ac\), is called the discriminant. When \(\Delta > 0\) there are two distinct real roots; when \(\Delta = 0\) there is one repeated real root; and when \(\Delta < 0\) the roots are a complex conjugate pair, written as p ± qi.
Worked Example
Solve x² − 3x + 2 = 0 (a = 1, b = −3, c = 2). The discriminant is \((-3)^{2} - 4\cdot 1\cdot 2 = 9 - 8 = 1\). So $$x = \frac{3 \pm \sqrt{1}}{2} = \frac{3 \pm 1}{2}$$ giving x₁ = 2 and x₂ = 1. Both roots are real and distinct.
FAQ
What if the discriminant is negative? The equation has no real solutions; instead it has two complex roots of the form p ± qi, which this calculator displays.
Can a be zero? If a = 0 the equation is linear, not quadratic. The calculator detects this and solves bx + c = 0, returning \(x = -c/b\).
Why are there two roots? The ± sign in the formula produces two values; a parabola generally crosses the x-axis at two points, which correspond to the two solutions.