Edit made on June 11, 2016 by ColinWright at 19:47:27
Deleted text in red
/
Inserted text in green
WW WM
HEADERS_END
[[[>50
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:
|>>
| EQN:x_1=-\left(\frac{b+\text{sgn}(b)sqrt{b^2-4ac}}{2a}\right) EQN:x_1=-\left(\frac{b+\text{sgn}(b)\sqrt{b^2-4ac}}{2a}\right) | EQN:x_2=\frac{c}{ax_1} |
<<|
Numerical analysis can be a very difficult topic.
]]]
The general quadratic equation has the form EQN:ax^2+bx+c=0.
The general solution is given by:
|>>
| EQN:x=\frac{-b\pm\sqrt{b^2-4ac}}{2a} |
<<|
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.
* http://en.wikipedia.org/wiki/Quadratic_equation