info prev up next book cdrom email home

Quadratic Equation

A quadratic equation is a second-order Polynomial

\begin{displaymath}
ax^2+bx+c = 0,
\end{displaymath} (1)

with $a\not=0$. The roots $x$ can be found by Completing the Square:
\begin{displaymath}
x^2 + {b\over a} x = - {c\over a}
\end{displaymath} (2)


\begin{displaymath}
\left({x + {b\over 2a}}\right)^2 = - {c\over a} + {b^2\over 4a^2} = {b^2-4ac\over 4a^2}
\end{displaymath} (3)


\begin{displaymath}
x + {b\over 2a} = {\pm \sqrt{b^2-4ac}\over 2a}.
\end{displaymath} (4)

Solving for $x$ then gives
\begin{displaymath}
x = {-b\pm\sqrt{b^2-4ac}\over 2a}.
\end{displaymath} (5)

This is the Quadratic Formula.


An alternate form is given by dividing (1) through by $x^2$:

\begin{displaymath}
a+{b\over x}+{c\over x^2}=0
\end{displaymath} (6)


\begin{displaymath}
c\left({{1\over x^2}+ {b\over cx}}\right)+a=0
\end{displaymath} (7)


\begin{displaymath}
c\left({{1\over x}+{b\over 2c}}\right)^2=c\left({b\over 2c}\right)^2-a = {b^2\over 4c}-{4ac\over 4c} = {b^2-4ac\over 4c}.
\end{displaymath} (8)

Therefore,
\begin{displaymath}
{1\over x}+{b\over 2c}=\pm {\sqrt{b^2-4ac}\over 2c}
\end{displaymath} (9)


\begin{displaymath}
{1\over x}={-b\pm\sqrt{b^2-4ac}\over 2c}
\end{displaymath} (10)


\begin{displaymath}
x={2c\over -b\pm \sqrt{b^2-4ac}}.
\end{displaymath} (11)

This form is helpful if $b^2\gg 4ac$, in which case the usual form of the Quadratic Formula can give inaccurate numerical results for one of the Roots. This can be avoided by defining
\begin{displaymath}
q\equiv -{\textstyle{1\over 2}}\left\lfloor{b+\hbox{sgn}\,(b)\sqrt{b^2-4ac}\,}\right\rfloor
\end{displaymath} (12)

so that $b$ and the term under the Square Root sign always have the same sign. Now, if $b>0$, then
\begin{displaymath}
q=-{\textstyle{1\over 2}}(b+\sqrt{b^2-4ac}\,)
\end{displaymath} (13)


$\displaystyle {1\over q}$ $\textstyle =$ $\displaystyle {-2\over b+\sqrt{b^2-4ac}} {b-\sqrt{b^2-4ac}\over b-\sqrt{b^2-4ac}}
= {-2(b-\sqrt{b^2-4ac}\,)\over b^2-(b^2-4ac)}$  
  $\textstyle =$ $\displaystyle {-2(b-\sqrt{b^2-4ac}\,)\over 4ac} = {-b+\sqrt{b^2-4ac}\over 2ac},$ (14)

so
$\displaystyle x_1$ $\textstyle \equiv$ $\displaystyle {q\over a} = {-b-\sqrt{b^2-4ac}\over 2a}$ (15)
$\displaystyle x_2$ $\textstyle \equiv$ $\displaystyle {c\over q} = {-b+\sqrt{b^2-4ac}\over 2a}.$ (16)

Similarly, if $b<0$, then
\begin{displaymath}
q=-{\textstyle{1\over 2}}(b-\sqrt{b^2-4ac}\,) = {\textstyle{1\over 2}}(-b+\sqrt{b^2-4ac}\,)
\end{displaymath} (17)


$\displaystyle {1\over q}$ $\textstyle =$ $\displaystyle {2\over -b+\sqrt{b^2-4ac}} {b+\sqrt{b^2-4ac}\over b+\sqrt{b^2-4ac}}
= {2(b+\sqrt{b^2-4ac}\,)\over -b^2+(b^2-4ac)}$  
  $\textstyle =$ $\displaystyle {b+\sqrt{b^2-4ac}\over -2ac} = {-b-\sqrt{b^2-4ac}\over 2ac},$ (18)

so
$\displaystyle x_1$ $\textstyle \equiv$ $\displaystyle {q\over a} = {-b+\sqrt{b^2-4ac}\over 2a}$ (19)
$\displaystyle x_2$ $\textstyle \equiv$ $\displaystyle {c\over q} = {-b-\sqrt{b^2-4ac}\over 2a}.$ (20)

Therefore, the Roots are always given by $x_1=q/a$ and $x_2=c/q$.

See also Carlyle Circle, Conic Section, Cubic Equation, Quartic Equation, Quintic Equation, Sextic Equation


References

Abramowitz, M. and Stegun, C. A. (Eds.). Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables, 9th printing. New York: Dover, p. 17, 1972.

Beyer, W. H. CRC Standard Mathematical Tables, 28th ed. Boca Raton, FL: CRC Press, p. 9, 1987.

Courant, R. and Robbins, H. What is Mathematics?: An Elementary Approach to Ideas and Methods, 2nd ed. Oxford, England: Oxford University Press, pp. 91-92, 1996.

King, R. B. Beyond the Quartic Equation. Boston, MA: Birkhäuser, 1996.

Press, W. H.; Flannery, B. P.; Teukolsky, S. A.; and Vetterling, W. T. ``Quadratic and Cubic Equations.'' §5.6 in Numerical Recipes in FORTRAN: The Art of Scientific Computing, 2nd ed. Cambridge, England: Cambridge University Press, pp. 178-180, 1992.

Spanier, J. and Oldham, K. B. ``The Quadratic Function $ax^2+bx+c$ and Its Reciprocal.'' Ch. 16 in An Atlas of Functions. Washington, DC: Hemisphere, pp. 123-131, 1987.



info prev up next book cdrom email home

© 1996-9 Eric W. Weisstein
1999-05-25