Equation Solver — Free Linear, Quadratic & Cubic Solver with Graph 2026 | AllInOneTools
🧮 Free Solver

Equation Solver

Solve linear, quadratic, and cubic equations instantly. Step-by-step solutions, interactive graph, discriminant analysis, root verification, and complex number support.

Algebraic Equation Solver
🧮
EQUATION
Enter any equation with = sign
ALGEBRA
f(x)=0
💡 Try an example:
3x + 7 = 22
x² - 5x + 6 = 0
2x² + 4x + 5 = 0
x³ - 6x² + 11x - 6 = 0
x² = 49
4x - 8 = 2x + 10
ax+b=0|ax²+bx+c=0|ax³+bx²+cx+d=0
Solution
--
💡 Equation Insight

Equation Solver: Complete Guide to Solving Linear, Quadratic, and Cubic Equations with Graphs, Proofs, and Real-World Applications

Equations are the backbone of algebra and one of the most powerful tools in all of mathematics. An equation states that two expressions are equal, and solving an equation means finding the value (or values) of the unknown variable that make this statement true. From simple linear equations that model everyday proportional relationships to complex cubic equations that describe three-dimensional surfaces, the ability to solve equations unlocks the door to physics, engineering, economics, computer science, and virtually every quantitative field. This solver handles linear, quadratic, and cubic equations with exact solutions, step-by-step explanations, interactive graphing, and automatic verification of every root.

Linear Equations: The Foundation

A linear equation has the form ax + b = 0, where a and b are constants and x is the unknown. The solution is simply x = −b/a (provided a ≠ 0). Despite their simplicity, linear equations model countless real-world situations: converting currencies, calculating speed from distance and time, determining cost from unit price, and balancing chemical equations. When you see "3x + 7 = 22," you subtract 7 from both sides to get 3x = 15, then divide by 3 to find x = 5. Our solver automates this process, extracts coefficients from any form (including equations like "4x − 8 = 2x + 10"), and verifies the solution by substitution.

Quadratic Equations: The Quadratic Formula

A quadratic equation has the form ax² + bx + c = 0 (a ≠ 0). The universal solution is the quadratic formula: x = (−b ± √(b² − 4ac)) / 2a. The expression under the square root, Δ = b² − 4ac, is the discriminant. It determines the nature of the roots: when Δ > 0 the equation has two distinct real roots, when Δ = 0 there is exactly one repeated real root, and when Δ < 0 the roots are complex conjugates of the form p ± qi where i = √(−1). The quadratic formula was known to Babylonian mathematicians over 4,000 years ago, making it one of the oldest algorithms in human history.

Linear: ax + b = 0 → x = −b/a

Quadratic: ax² + bx + c = 0
x = (−b ± √(b²−4ac)) / 2a
Discriminant: Δ = b² − 4ac
Δ > 0: two real roots
Δ = 0: one repeated root
Δ < 0: two complex roots

Vertex: (−b/2a, f(−b/2a))
Sum of roots: −b/a
Product of roots: c/a

Cubic: ax³ + bx² + cx + d = 0
Solved via Cardano's formula + Newton refinement

The Discriminant and What It Reveals

The discriminant Δ = b² − 4ac is perhaps the single most informative quantity associated with a quadratic equation. Beyond determining whether roots are real or complex, it reveals geometric information about the parabola. When Δ > 0, the parabola crosses the x-axis at two points. When Δ = 0, the parabola is tangent to the x-axis (touching at exactly one point). When Δ < 0, the parabola never touches the x-axis — it floats entirely above or entirely below it. The sign of the leading coefficient a determines the parabola's direction: a > 0 opens upward (minimum at vertex), a < 0 opens downward (maximum at vertex). Our graph visualization clearly shows all these cases.

Cubic Equations and Cardano's Method

Cubic equations (ax³ + bx² + cx + d = 0) were first solved in the 16th century by Italian mathematicians Scipione del Ferro and Niccolò Fontana Tartaglia, with the solution famously published by Gerolamo Cardano in 1545. The method involves depressing the cubic (removing the x² term via substitution) to obtain t³ + pt + q = 0, then applying Cardano's formula. A cubic always has at least one real root, and may have three. Our solver implements Cardano's analytical method supplemented by Newton-Raphson refinement for numerical precision, ensuring roots are accurate to at least 10 significant digits.

Vieta's Formulas: Connecting Roots and Coefficients

Vieta's formulas provide elegant relationships between the roots and coefficients of any polynomial. For a quadratic ax² + bx + c = 0 with roots r₁ and r₂: the sum r₁ + r₂ = −b/a and the product r₁ · r₂ = c/a. For a cubic with roots r₁, r₂, r₃: their sum equals −b/a, the sum of pairwise products equals c/a, and their triple product equals −d/a. These identities serve as powerful verification tools — if the computed roots don't satisfy Vieta's formulas, something has gone wrong. Our solver displays and verifies these relationships when applicable.

Complex Numbers and Imaginary Roots

When a quadratic's discriminant is negative, the roots involve the imaginary unit i = √(−1). A complex number has the form a + bi, where a is the real part and b is the imaginary part. Complex roots of polynomials with real coefficients always come in conjugate pairs: if p + qi is a root, then p − qi is also a root. Complex numbers are not just mathematical abstractions — they are indispensable in electrical engineering (AC circuit analysis), quantum mechanics, signal processing, control theory, and fluid dynamics. Our solver identifies complex roots, displays them clearly, and shows their real and imaginary components separately.

Graphical Interpretation

Every equation f(x) = 0 can be visualized as the intersection of the curve y = f(x) with the x-axis. Our interactive graph renders the function with a smooth gradient curve, highlights root locations with green markers, shows the vertex for quadratics with a purple marker, and draws a subtle zero-line for reference. The graph auto-scales to fit all roots and critical points, uses smart grid spacing for readability, and fills the area between the curve and x-axis with a translucent overlay. For quadratics, the graph clearly reveals the parabolic shape, and for cubics, the characteristic S-curve with possible inflection points becomes visible.

Real-World Applications of Equation Solving

Equations appear everywhere in practical life. Physics: projectile motion follows h(t) = −½gt² + v₀t + h₀, a quadratic in time. Finding when a ball hits the ground means solving h(t) = 0. Finance: compound interest, loan amortization, and break-even analysis all require solving equations. Engineering: structural analysis, circuit design, and control systems produce polynomial equations. Biology: population growth models and drug concentration curves involve solving for time or dosage. Computer graphics: ray-tracing algorithms solve quadratic equations millions of times per frame to render realistic 3D scenes.

Factoring, Completing the Square, and Alternative Methods

Besides the quadratic formula, several other methods solve quadratics. Factoring works when roots are simple: x² − 5x + 6 = (x − 2)(x − 3) = 0 gives x = 2 or x = 3. Completing the square transforms ax² + bx + c into a(x − h)² + k, revealing the vertex (h, k) and enabling direct solving. The graphical method plots the function and reads off x-intercepts. For cubics, the rational root theorem tests possible rational roots, and synthetic division factors out known roots. Our solver uses the most robust analytical method for each equation type, falling back to numerical root-finding for non-standard forms.

How to Use This Equation Solver

Type any equation using standard notation: "2x² + 5x - 3 = 0", "3x + 7 = 22", "x³ - 6x² + 11x - 6 = 0", or even "x² = 49". The solver accepts implicit multiplication (2x means 2×x), negative numbers, decimals, and equations with terms on both sides of the equals sign. Click "Solve Equation" or try one of the preset examples. The interactive graph plots f(x) with highlighted roots and auto-scaling. The step-by-step section shows coefficient extraction, formula application, discriminant analysis, and root verification by substitution. Every root is checked against the original equation to ensure mathematical correctness.

Solver Tip
This solver automatically detects equation degree (linear, quadratic, or cubic) by evaluating the expression at test points. For best results, simplify your equation first and use standard algebraic notation. The solver supports the variable x (default), y, or t. For numerical equations beyond degree 3, the solver uses bisection with Newton refinement to find real roots in the range [−100, 100].

Frequently Asked Questions

How do you solve a quadratic equation?
Use x = (−b ± √(b²−4ac)) / 2a. The discriminant b²−4ac determines if roots are real or complex.
What is the quadratic formula?
x = (−b ± √(b²−4ac)) / (2a) for ax² + bx + c = 0 where a ≠ 0.
How do you solve a linear equation?
Isolate the variable: ax + b = 0 → x = −b/a. Move x terms to one side, constants to the other.
What is the discriminant?
Δ = b² − 4ac. Positive: 2 real roots. Zero: 1 repeated root. Negative: 2 complex roots.
Can this solver handle cubic equations?
Yes. Uses Cardano's formula with Newton refinement. Finds all real roots of ax³+bx²+cx+d=0.