Skip to content

Equation Solver

Type any equation in x and get the solution — with the working out, not just the final answer.

How the equation solver chooses its method

When you type an equation, the parser first attempts to extract a polynomial in the unknown. If your equation is 2x² − 5x + 2 = 0, that polynomial is 2x² − 5x + 2. The degree of the polynomial decides the strategy:

  • Degree 1 (linear). Move the constant to the right, divide by the coefficient of x, done.
  • Degree 2 (quadratic). Compute the discriminant b² − 4ac and apply the quadratic formula. If the discriminant is negative, the two roots are complex conjugates.
  • Degree 3 (cubic). Apply Cardano’s formula on the depressed cubic. The sign of the resolvent decides whether you get one real and two complex roots or three real roots.
  • Degree 4 (quartic). Apply Ferrari’s method via a resolvent cubic.
  • Degree 5 and higher. No closed form exists (Abel–Ruffini), so the solver runs the Durand–Kerner iteration to find all roots simultaneously.

If the equation is not polynomial — for example sin(x) = 1/2 or 2^x = 16 — the solver samples the difference LHS − RHS on the interval [−50, 50] and runs bisection wherever it sees a sign change. That catches every root in the visible range without needing a symbolic algebra system.

Notation tips

  • Use ^ for exponents. x^2 means x squared.
  • Implicit multiplication is supported: 2x, 3(x + 1) and 2x sin(x) all work.
  • Functions need parentheses: sin(x), not sin x.
  • Constants you can use: pi, e, tau, phi.
  • Available functions: sin, cos, tan, asin, acos, atan, sinh, cosh, tanh, log, ln, log10, log2, sqrt, cbrt, abs, exp, floor, ceil, round, sign.

Frequently asked questions

What kinds of equations can this solver handle?

Single-variable equations in x. Polynomials of any degree, plus transcendental equations like sin(x) = 0.5 or 2^x = 16. The solver picks closed-form solutions when possible and falls back to bisection otherwise.

How are complex roots displayed?

In the form a ± bi. For example, x² + 1 = 0 is reported as x = 0 ± 1i.

Can I use functions other than x?

Yes — type any single variable name and the solver will treat it as the unknown. The default is x.