📐 Quadratic Equation Solver

🔧 Operation

📝 Coefficients of a·x² + b·x + c

Set a = 0 and the tool will solve the linear form b·x + c = 0.

📍 Evaluation point

Returns y = a·x² + b·x + c plus the vertex.

📝 Roots

Produces the monic quadratic (x − r₁)(x − r₂) = 0.

📤 Result

{{ line.label }} {{ line.value }}
{{ line.label }} {{ line.value }}
{{ line.label }} {{ line.value }}
Enter coefficients and the result will appear here.
⚠️

ℹ️ About Quadratic Equation Solver

Quadratic equation solver, discriminant calculator, and vertex finder

This is a three-in-one solver for second-degree polynomial equations of the form a·x² + b·x + c = 0. Given the coefficients a, b, c, the page works as a quadratic formula calculator, a discriminant calculator, and a parabola vertex finder in one workflow. It reports the real or complex roots, the parabola's vertex and axis of symmetry, a rational factored form (when one exists), and Vieta's sum and product of the roots. It also evaluates y = a·x² + b·x + c at any specific x, and can build the canonical monic quadratic given two roots.

  • Solve — full breakdown of a·x² + b·x + c = 0.
  • Evaluate — compute y = a·x² + b·x + c at a chosen x (useful for plotting and sanity checks).
  • From roots — given two roots r₁ and r₂, build the monic quadratic (x − r₁)(x − r₂).

Use it to check homework, calculate x-intercepts, compare standard, vertex, and factored forms, or verify whether a quadratic has two crossings, one repeated root, or a complex conjugate pair.

The quadratic formula

Starting from a·x² + b·x + c = 0 with a ≠ 0, divide by a and complete the square:

  • x² + (b/a)·x + c/a = 0
  • (x + b/(2a))² = b²/(4a²) − c/a
  • x + b/(2a) = ± √(b² − 4ac) / (2a)
  • x = (−b ± √(b² − 4ac)) / (2a)

The expression under the square root, Δ = b² − 4ac, is the discriminant. Its sign determines the nature of the roots.

Discriminant interpretation

Discriminant Roots Geometric meaning
Δ > 0 Two distinct real roots Parabola crosses the x-axis at two points
Δ = 0 One repeated real root Parabola is tangent to the x-axis at the vertex
Δ < 0 Two complex conjugate roots Parabola does not touch the x-axis

Vertex form

Every quadratic can be rewritten in vertex form:

f(x) = a · (x − h)² + k

where the vertex of the parabola lies at (h, k). Completing the square on the standard form gives:

  • h = −b / (2a) ← x-coordinate of the vertex; also the axis of symmetry
  • k = c − b² / (4a) ← y-coordinate of the vertex (= f(h))

The vertex is the minimum of the parabola when a > 0 and the maximum when a < 0.

Worked examples

  • Two real roots (Δ > 0): 2x² − 3x − 5 = 0. Δ = 9 + 40 = 49, so the roots are x = (3 ± 7) / 4, giving x₁ = 2.5 and x₂ = −1. Factored: (2x − 5)(x + 1). Vertex: (0.75, −6.125).
  • Repeated root (Δ = 0): x² − 2x + 1 = 0. Δ = 0, so x = 1 is a repeated root. The parabola is tangent to the x-axis at (1, 0), which is also the vertex. Factored: (x − 1)².
  • Complex roots (Δ < 0): x² + 1 = 0. Δ = −4, so x = ± √(−4) / 2 = ±i. The roots are i and −i; the parabola sits one unit above the x-axis.
  • Linear edge case (a = 0): 2x − 4 = 0 reduces to a linear equation with the single root x = 2. The tool flags isLinear.
  • Degenerate (a = b = 0): 5 = 0 has no solutions; 0 = 0 is satisfied by every real number (reported as rootCount: "infinite").

Vieta's formulas

For roots x₁, x₂ of a·x² + b·x + c = 0:

  • x₁ + x₂ = −b / a (sum of roots)
  • x₁ · x₂ = c / a (product of roots)

Vieta's relations follow directly from expanding a·(x − x₁)(x − x₂) and matching coefficients. The tool reports both quantities under the breakdown so you can sanity-check the answer at a glance.

Use cases

  • Physics — projectile motion. The vertical position of a projectile under gravity is a quadratic in time; solving for time-to-ground yields exactly the kind of root the solver returns.
  • Engineering optimisation. A quadratic cost or revenue model has its optimum at the vertex; the axis of symmetry and the y-coordinate give the optimal input and minimum/maximum value directly.
  • Signal processing. Second-order IIR filter design uses the discriminant to decide whether poles are real (overdamped), critically damped, or complex conjugates (underdamped, oscillatory).
  • Computer graphics — ray/sphere intersection. Substituting a parametric ray into the implicit sphere equation gives a quadratic in t; the discriminant tells you whether the ray misses, grazes, or pierces the sphere, and the roots give the entry/exit distances.
  • Education. Verify by-hand quadratic-formula and completing-the-square exercises; double-check textbook examples and exam answers.

Limitations and edge cases

  • Finite numeric inputs only. Decimal coefficients are accepted, but empty values, NaN, infinity, and symbolic input such as √2 are rejected.
  • Rounded display. Results are rounded to 10 decimal places to avoid floating-point noise. Use a symbolic algebra system when you need an exact proof or radical-preserving output.
  • Factored form is conditional. The tool shows a factored form only when real roots can be represented cleanly as rational factors that reproduce the original coefficients.
  • Complex roots are conjugates. When Δ < 0, roots are reported as p + qi and p − qi; there is no real x-intercept or real factored form.
  • Model fit is your responsibility. Projectile, optimization, and engineering examples assume the situation is actually well-modeled by a quadratic equation.

References and source material

  • Wolfram MathWorld, Quadratic Formula — formula used for the root calculation.
  • Wolfram MathWorld, Quadratic Equation — background on the equation form and its roots.
  • Wolfram MathWorld, Discriminant — algebraic context for root classification.
  • Wolfram MathWorld, Vieta's Formulas — sum/product identities used to cross-check computed roots.
  • OpenStax, Quadratic Equations — instructional reference for solving by factoring, square roots, completing the square, and the quadratic formula.
  • OpenStax, Quadratic Functions — vertex, axis of symmetry, graph shape, and real-world parabola examples.

API Usage Example:

POST /api/tools/math/quadratic-solver
Content-Type: application/json

{
    "operation": "solve",
    "a": 2,
    "b": -3,
    "c": -5
}
Ready