Math calculators

Equation solver

Linear, quadratic (with discriminant and vertex) and cubic equations with real and complex roots, plus systems of linear equations.

Inputs

x^2 - 3x + 2 = 0

Results

Methodology

Conventions

  • Quadratic and cubic roots, real or complex, are found with the same all-roots iteration as the polynomial calculator.
  • Systems are solved by LU decomposition after a rank check, so systems with no solution or infinitely many are reported as such.

References

  • Press, Teukolsky, Vetterling and Flannery, Numerical Recipes, 3rd ed. (2007), ยง2.3
  • Aberth, Iteration methods for finding all zeros of a polynomial simultaneously (1973)

Formulas

Discriminant
\Delta = b^2 - 4ac
Quadratic roots
x = \frac{-b \pm \sqrt{\Delta}}{2a}
Vertex
\left(-\frac{b}{2a},\ c - \frac{b^2}{4a}\right)
Linear system
A\mathbf{x} = \mathbf{b},\quad PA = LU