Skip to main content
MATHEMATICS

Quadratic Equation Solver

Solve quadratic equations ax² + bx + c = 0 with the quadratic formula. Features real and complex roots, discriminant analysis (b² - 4ac), and factoring.

DOCUMENTED FORMULA intermediate
Interactive Workbench
intermediate
Quick PresetsClick to autofill values
Parameters3 variables
Leading coefficient (must not be zero).
Middle coefficient.
Constant term.
Calculation ResultAwaiting Input
Roots
--.--

Real or complex roots of the equation.

Quadratic Parabola & Root Intersections

quadratic
Loading diagram...
Parabola f(x)Vertex (h, k)Real Roots (x₁, x₂)
Live SVG Render

On this page Jump to section ▾

Practical Worked Example

Step-by-step practical problem and numerical calculation scenario.

Problem Statement

Solve the quadratic equation:

2x2−4x+5=02 x^2 - 4 x + 5 = 0

Identify coefficients aa, bb, and cc, evaluate the discriminant Δ\Delta, and find the exact complex roots.

Step-by-Step Numerical Solution

Step 1: Identify Coefficients

  • a=2a = 2
  • b=−4b = -4
  • c=5c = 5

Step 2: Compute Discriminant (Δ=b2−4ac\Delta = b^2 - 4ac)

Δ=(−4)2−4(2)(5)=16−40=−24\Delta = (-4)^2 - 4(2)(5) = 16 - 40 = -24

Since Δ=−24<0\Delta = -24 < 0, the equation has two complex conjugate roots.

Step 3: Apply Quadratic Formula for Complex Roots

x=−(−4)±−242(2)=4±24⋅i4x = \frac{-(-4) \pm \sqrt{-24}}{2(2)} = \frac{4 \pm \sqrt{24} \cdot i}{4}

Simplify 24=4×6=26\sqrt{24} = \sqrt{4 \times 6} = 2 \sqrt{6}: x=4±26i4=1±62ix = \frac{4 \pm 2 \sqrt{6} i}{4} = 1 \pm \frac{\sqrt{6}}{2} i

Step 4: Decimal Value Evaluation (6≈2.4495\sqrt{6} \approx 2.4495)

x1=1+1.2247ix_1 = 1 + 1.2247 i x2=1−1.2247ix_2 = 1 - 1.2247 i

Step 5: Verify using Vieta’s Formula

  • Sum: x1+x2=1+1=2=−−42✓x_1 + x_2 = 1 + 1 = 2 = -\frac{-4}{2} \checkmark
  • Product: x1⋅x2=12−(1.2247i)2=1+1.5=2.5=52✓x_1 \cdot x_2 = 1^2 - (1.2247 i)^2 = 1 + 1.5 = 2.5 = \frac{5}{2} \checkmark

Result Summary: The roots are x=1±1.225ix = 1 \pm 1.225 i.

Variables & Units Reference

Input parameters, calculated outputs, and supported SI/US customary units.

Mathematical Variables and Units Summary Table
Variable Symbol Parameter Name & Description Role Supported Units
a Coefficient a Leading coefficient (must not be zero). Input dimensionless
b Coefficient b Middle coefficient. Input dimensionless
c Coefficient c Constant term. Input dimensionless
result Roots Real or complex roots of the equation. Output dimensionless
ℹ

Result Interpretation & Practical Meaning

Physical significance, evaluation guidelines, and domain context for the calculated output.

The output provides the mathematical roots (solutions for x where ax² + bx + c = 0) determined via the algebraic quadratic formula, governed by the discriminant Δ = b² − 4ac. When Δ > 0, the parabola intersects the horizontal axis at two distinct real roots. When Δ = 0, the parabola's vertex touches the axis tangentially at a single repeated real root (x = −b / 2a). When Δ < 0, the parabola does not cross the real axis, yielding a pair of complex conjugate roots (x = u ± v·i).

Theoretical Foundation of Quadratic Equations

Definition:
The quadratic formula determines the exact roots of second-degree polynomial equations ax2+bx+c=0a x^2 + b x + c = 0, given by x=−b±b2−4ac2ax = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}. The discriminant Δ=b2−4ac\Delta = b^2 - 4ac dictates whether solutions are two distinct real roots (Δ>0\Delta > 0), one repeated root (Δ=0\Delta = 0), or complex conjugate pairs (Δ<0\Delta < 0).

A quadratic equation is a second-order polynomial equation in a single variable xx, structured in standard form as:

ax2+bx+c=0(a≠0)a x^2 + b x + c = 0 \quad (a \ne 0)

Where aa, bb, and cc represent constant real or complex coefficients. Geometrically, a quadratic function f(x)=ax2+bx+cf(x) = a x^2 + b x + c traces a parabola in the Cartesian plane. The solutions to the equation—termed the roots or zeros—denote the exact xx-coordinates where the parabolic curve intersects the horizontal axis (y=0y = 0).

Quadratic equations form the mathematical bedrock of physical sciences and classical engineering:

  • Kinematics & Ballistics: Trajectory altitude over time governed by gravitational acceleration (y(t)=y0+v0yt−12gt2y(t) = y_0 + v_{0y}t - \frac{1}{2}gt^2).
  • Structural Optimization: Locating extreme fiber bending stresses where the first derivative of deflection vanishes.
  • Electrical Engineering: Determining resonant poles and damping ratios in second-order RLC network transfer functions.

The Quadratic Formula & Discriminant Analysis

The fundamental closed-form solution derived via the technique of completing the square is the universal Quadratic Formula:

x=−b±Δ2ax = \frac{-b \pm \sqrt{\Delta}}{2a}

The algebraic term beneath the radical sign is the Discriminant (Δ\Delta or DD):

Δ=b2−4ac\Delta = b^2 - 4ac

The numerical sign of Δ\Delta completely dictates the algebraic character and geometric multiplicity of the roots:

  1. Two Distinct Real Roots (Δ>0\Delta > 0): The parabola crosses the xx-axis at two unique points: x1=−b+Δ2a,x2=−b−Δ2ax_1 = \frac{-b + \sqrt{\Delta}}{2a}, \quad x_2 = \frac{-b - \sqrt{\Delta}}{2a}

  2. One Repeated Real Root (Δ=0\Delta = 0): The vertex of the parabola touches the xx-axis tangentially at exactly one inflection point: x1=x2=−b2ax_1 = x_2 = -\frac{b}{2a}

  3. Two Complex Conjugate Roots (Δ<0\Delta < 0): The parabola does not intersect the real xx-axis. The roots reside in the complex plane (C\mathbb{C}), utilizing imaginary unit i=−1i = \sqrt{-1}: x1,2=−b2a±i∣Δ∣2ax_{1,2} = -\frac{b}{2a} \pm i \frac{\sqrt{|\Delta|}}{2a}


Step-by-Step Solved Engineering Example

Problem Scenario: An emergency rescue flare is launched vertically upward from an observation tower 2.0 m2.0\text{ m} above sea level with an initial vertical velocity of v0=24.5 m/sv_0 = 24.5\text{ m/s}. Under standard gravity (g=9.8 m/s2g = 9.8\text{ m/s}^2), its elevation above sea level is given by:

h(t)=−4.9t2+24.5t+2.0=0h(t) = -4.9 t^2 + 24.5 t + 2.0 = 0

Calculate the precise impact time tsplasht_{\text{splash}} when the spent flare contacts the water (h=0h = 0).

  1. Identify Coefficients:

    • a=−4.9a = -4.9
    • b=24.5b = 24.5
    • c=2.0c = 2.0
  2. Evaluate the Discriminant (Δ\Delta): Δ=b2−4ac=(24.5)2−4(−4.9)(2.0)=600.25−(−39.2)=639.45\Delta = b^2 - 4ac = (24.5)^2 - 4(-4.9)(2.0) = 600.25 - (-39.2) = 639.45 Because Δ>0\Delta > 0, there exist two distinct real roots. Δ=639.45≈25.2873\sqrt{\Delta} = \sqrt{639.45} \approx 25.2873

  3. Compute the Two Mathematical Roots: t1=−24.5+25.28732(−4.9)=0.7873−9.8≈−0.0803 st_1 = \frac{-24.5 + 25.2873}{2(-4.9)} = \frac{0.7873}{-9.8} \approx -0.0803\text{ s} t2=−24.5−25.28732(−4.9)=−49.7873−9.8≈5.0803 st_2 = \frac{-24.5 - 25.2873}{2(-4.9)} = \frac{-49.7873}{-9.8} \approx 5.0803\text{ s}

  4. Physical Interpretation: The negative root (t1=−0.08 st_1 = -0.08\text{ s}) represents the theoretical time prior to launch when the projectile would have left ground level had it started from sea level. The physically valid flight duration is t2=5.08 secondst_2 = 5.08\text{ seconds}.


Standard Lookup Table: Discriminant Classification & Geometric Properties

The table below summarizes the geometric, analytical, and physical properties of the quadratic equation based on coefficient parameters:

Discriminant ConditionParabola Orientation (a>0a > 0)Parabola Orientation (a<0a < 0)Nature of RootsPhysical STEM Analogy
Δ>0\Delta > 0Opens upward, intersects xx-axis twiceOpens downward, intersects xx-axis twiceTwo distinct real rootsOverdamped mechanical oscillator
Δ=0\Delta = 0Opens upward, vertex on xx-axisOpens downward, vertex on xx-axisOne repeated real root (x=−b/2ax = -b/2a)Critically damped RLC circuit
Δ<0\Delta < 0Floats entirely above xx-axis (y>0y > 0)Plunges entirely below xx-axis (y<0y < 0)Complex conjugate pair (u±ivu \pm iv)Underdamped decaying harmonic oscillation
b=0,c<0b = 0, c < 0 (a>0a > 0)Symmetric around yy-axis (xv=0x_v = 0)Symmetric around yy-axis (xv=0x_v = 0)Symmetric real roots (x=±−c/ax = \pm\sqrt{-c/a})Centered freefall drop from rest
c=0c = 0Crosses origin (0,00, 0)Crosses origin (0,00, 0)Factorable (x(ax+b)=0x(ax + b) = 0)Projectile launch from ground baseline

Additional Analytical Properties (Vieta’s Formulas & Vertex)

  1. Vertex Coordinates (Maximum / Minimum): The axis of symmetry occurs at xv=−b2ax_v = -\frac{b}{2a}. Substituting back into the polynomial yields the peak or trough value: yv=c−b24a=−Δ4ay_v = c - \frac{b^2}{4a} = -\frac{\Delta}{4a}

    • If a>0a > 0, the vertex is an absolute minimum.
    • If a<0a < 0, the vertex is an absolute maximum.
  2. Vieta’s Algebraic Relations: Without explicitly calculating square roots, the sum and product of the roots can be found directly from the coefficients: x1+x2=−ba,x1⋅x2=cax_1 + x_2 = -\frac{b}{a}, \quad x_1 \cdot x_2 = \frac{c}{a}


Critical Numerical & Computing Pitfalls

  • Catastrophic Cancellation in Floating-Point Math: When b2≫4acb^2 \gg 4ac, b2−4ac≈∣b∣\sqrt{b^2 - 4ac} \approx |b|. Computing −b+b2−4ac-b + \sqrt{b^2 - 4ac} subtracts two nearly identical large numbers, causing severe loss of numerical precision in 32-bit and 64-bit IEEE 754 arithmetic.
    • Stable Computational Alternative (Citardauq Formula): x1=−b−sgn(b)Δ2a,x2=ca⋅x1x_1 = \frac{-b - \text{sgn}(b)\sqrt{\Delta}}{2a}, \quad x_2 = \frac{c}{a \cdot x_1}
  • Linear Degeneracy (a=0a = 0): If coefficient a=0a = 0, the system ceases to be quadratic and collapses into a linear equation (bx+c=0bx + c = 0) with root x=−c/bx = -c/b. Attempting to execute the quadratic formula directly causes a fatal division by zero (2a=02a = 0).

Authoritative Academic & Industry References

  • Abramowitz, M., & Stegun, I. A. — Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables, National Bureau of Standards (NIST Applied Mathematics Series 55).
  • IEEE Std 754-2019 — IEEE Standard for Floating-Point Arithmetic (Section on Quadratic Root Numerical Stability), IEEE Computer Society.
  • Thomas’ Calculus: Early Transcendentals (14th Edition) — Pearson Education.

Mathematical Derivation & Formula

Theoretical formulation derived from standard physics and engineering textbooks and models.

Step-by-Step Mathematical Proof

Step 1

Divide by Leading Coefficient and Complete the Square

x2+bax+(b2a)2=−ca+b24a2x^2 + \frac{b}{a} x + \left(\frac{b}{2a}\right)^2 = -\frac{c}{a} + \frac{b^2}{4a^2}

Transforming the variable terms into an exact binomial square.

Step 2

Take Square Root and Isolate Variable x

(x+b2a)2=b2−4ac4a2  ⟹  x=−b±b2−4ac2a\left(x + \frac{b}{2a}\right)^2 = \frac{b^2 - 4ac}{4a^2} \implies x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}

Extracting roots yields the general quadratic formula with discriminant delta.

Common Engineering & Calculation Pitfalls

Frequent calculation errors, unit confusion, and model boundary conditions.

Sign Reversal on Leading −b Term

Why it happens: Writing +b in the numerator when b is positive, or failing to negate a negative b value.

Correct approach: If b = −6, then −b = +6; always preserve the leading negation sign.

Dividing Only the Radical by 2a

Why it happens: Formatting error where division bar covers only the square root rather than the entire numerator (−b ± √Δ).

Correct approach: Divide the entire numerator expression by 2a.

Discarding Negative Roots in Physical Problems Without Verification

Why it happens: Assuming negative mathematical solutions are always physically invalid.

Correct approach: Check physical boundary constraints (e.g. time t ≥ 0); negative roots can represent past trajectory intersection points.

Real-World Engineering Applications

Industry deployment scenarios, practical design constraints, and field applications.

Classical Kinematics

Trajectory Flight & Impact Time

Solving quadratic vertical motion equations y(t) = y₀ + v₀ t − ½ g t² to determine landing time.

Optics & Acoustics

Parabolic Reflector Geometry

Determining focal lengths and geometric intersection points of parabolic mirrors and satellite dishes.

Frequently Asked Questions

Technical explanations grounded in governing physical laws and textbook derivations.

Frequently Asked Questions

What is “completing the square”?

Completing the square is an algebraic technique used to rewrite ax2+bx+c=0a x^2 + b x + c = 0 in the form a(x−h)2+k=0a(x - h)^2 + k = 0. It is the method originally used to derive the general quadratic formula.

What is catastrophic cancellation in floating-point quadratic solvers?

When b2≫4acb^2 \gg 4ac, computing −b+b2−4ac-b + \sqrt{b^2 - 4ac} involves subtracting two nearly equal numbers, leading to loss of numerical precision. Professional solvers use Citardauq’s formula: x1=−2cb+sgn(b)b2−4acx_1 = \frac{-2c}{b + \text{sgn}(b) \sqrt{b^2 - 4ac}}

Can coefficient aa be zero?

No. If a=0a = 0, the x2x^2 term vanishes and the equation becomes linear (bx+c=0b x + c = 0).

Academic References & Textbooks

Curated academic sources, engineering textbooks, and relevant technical references.

  • College Algebra (10th Edition)
    Authors: Ron Larson • Source: Cengage Learning • Year: 2017