Quadratic Equation Solver
Every student, engineer, and scientist eventually faces the same algebra problem: finding the unknown values of x that satisfy ax² + bx + c = 0. Doing this by hand is slow and error-prone, especially under time pressure. Our quadratic equation solver eliminates the guesswork – enter three coefficients and receive the roots, the discriminant, and a full step-by-step breakdown in seconds.
What is a quadratic equation?
A quadratic equation is any polynomial equation of degree two, written in the standard form:
ax² + bx + c = 0
where a ≠ 0, and a, b, c are real (or complex) coefficients. The graph of the associated function f(x) = ax² + bx + c is a parabola – it opens upward when a > 0 and downward when a < 0.
Examples of quadratic equations:
- 2x² − 5x + 3 = 0 (a = 2, b = −5, c = 3)
- x² − 9 = 0 (a = 1, b = 0, c = −9)
- −x² + 4x − 4 = 0 (a = −1, b = 4, c = −4)
How to use the quadratic equation solver
The calculator above follows the quadratic formula, the universal method that works for any set of coefficients:
x = (−b ± √(b² − 4ac)) / 2a
To solve your equation:
- Identify the coefficients – rearrange the equation into standard form and read off a, b, and c.
- Enter the values – type each coefficient into the corresponding field of the solver.
- Read the output – the calculator returns the discriminant, both roots, and the intermediate steps.
The solver handles all three discriminant cases automatically, including complex roots when the discriminant is negative.
What does the discriminant tell you about the roots?
The expression under the square root, Δ = b² − 4ac, is called the discriminant. Its sign alone reveals how many and what type of roots the equation has, before you compute them.
| Discriminant value | Number of real roots | Type of roots | Parabola vs. x-axis |
|---|---|---|---|
| Δ > 0 | 2 | Distinct real | Crosses at two points |
| Δ = 0 | 1 | Double real root | Touches at one point (vertex) |
| Δ < 0 | 0 | Two complex conjugates | No intersection |
Example 1 – two real roots: For x² − 5x + 6 = 0, Δ = (−5)² − 4(1)(6) = 25 − 24 = 1 > 0. The roots are x₁ = 3 and x₂ = 2.
Example 2 – double root: For x² − 6x + 9 = 0, Δ = 36 − 36 = 0. The single root is x = 3.
Example 3 – complex roots: For x² + 2x + 5 = 0, Δ = 4 − 20 = −16 < 0. The roots are x = −1 ± 2i.
Step-by-step: solving quadratic equations by hand
While the quadratic equation solver handles the arithmetic, understanding the manual process helps you verify results and build algebra skills.
Method 1 – The quadratic formula
This method always works, regardless of the coefficients.
Solve 2x² + 7x + 3 = 0:
- Read the coefficients: a = 2, b = 7, c = 3.
- Calculate the discriminant: Δ = 7² − 4(2)(3) = 49 − 24 = 25.
- Take the square root: √25 = 5.
- Apply the formula: x = (−7 ± 5) / 4.
- Compute each root:
- x₁ = (−7 + 5) / 4 = −2/4 = −0.5
- x₂ = (−7 − 5) / 4 = −12/4 = −3
Method 2 – Factoring
Factoring is the fastest method, but it only works when the roots are rational numbers.
Solve x² − x − 12 = 0:
- Find two numbers that multiply to −12 and add to −1: −4 and 3.
- Write the factored form: (x − 4)(x + 3) = 0.
- Set each factor to zero: x₁ = 4, x₂ = −3.
If you cannot quickly spot the factors, move straight to the quadratic formula or the solver above.
Method 3 – Completing the square
This technique rewrites the equation so the left side becomes a perfect square trinomial.
Solve x² + 6x + 2 = 0:
- Move the constant: x² + 6x = −2.
- Add (b/2)² to both sides: x² + 6x + 9 = −2 + 9 → (x + 3)² = 7.
- Take the square root: x + 3 = ±√7.
- Solve for x: x = −3 ± √7 ≈ −0.354 and −5.646.
Completing the square is also the method from which the quadratic formula itself is derived.
Vieta’s formulas: a quick verification shortcut
Vieta’s formulas express the relationship between the coefficients and the roots without solving the equation:
- Sum of roots: x₁ + x₂ = −b / a
- Product of roots: x₁ · x₂ = c / a
For x² − 5x + 6 = 0: the sum should equal 5 and the product should equal 6. The roots x₁ = 2 and x₂ = 3 satisfy both conditions, confirming the solution is correct.
Use these identities as a fast check on any result the quadratic equation solver returns.
Real-world applications of quadratic equations
Quadratic equations are not confined to textbooks. They model situations where a quantity depends on the square of another variable.
Projectile motion. The height h of an object launched upward at velocity v₀ from height h₀ follows h = −4.9t² + v₀t + h₀ (in meters, with g ≈ 9.8 m/s²). Setting h = 0 and solving for t tells you when the object hits the ground.
Revenue optimization. If the demand price p is linear in quantity q, revenue R = p · q becomes a quadratic function of q. The vertex gives the quantity that maximizes revenue.
Rectangle areas. Given a fixed perimeter, expressing the area of a rectangle in terms of one side always produces a quadratic. The maximum area occurs at the vertex – a square.
Electrical circuits. In RLC circuits, the characteristic equation for current is quadratic, determining whether the response is overdamped, critically damped, or underdamped.
Common mistakes to avoid
- Forgetting to rearrange into standard form. Before reading a, b, c, make sure the equation equals zero and all terms are on one side.
- Sign errors on coefficients. In x² − 3x + 2 = 0, b = −3, not 3. A missing negative sign flips the roots.
- Dividing by 2a before taking the square root. The ± belongs to the entire numerator – compute (−b ± √Δ) first, then divide by 2a.
- Assuming Δ < 0 means “no solution.” It means no real solution. Complex roots are perfectly valid and the solver above displays them.
This article is for educational purposes. For critical engineering or financial calculations, verify results with a qualified professional.