Some caution is advised in using this solution. When b is much, much larger than a and c, the usual formula loses several places of accuracy. A better solution is:

$x_1=-\left(\frac{b+\text{sgn}(b)\sqrt{b^2-4ac}}{2a}\right)$ $x_2=\frac{c}{ax_1}$

Numerical analysis can be a very difficult topic.

The general quadratic equation has the form $ax^2+bx+c=0.$

The general solution is given by:


A similar, but much more complex solution is possible for the cubic equation; and an even worse one for the quartic equation. Beyond that (quintic equation and higher) no such solution exists.

Last change to this page
Full Page history
Links to this page
Edit this page
  (with sufficient authority)
Change password
Recent changes
All pages