next up previous
Next: Newton-Raphson Method Up: Approximate Numerical Methods for Previous: Forms of Numbers and

Approximate Numerical Methods

Most numerical methods for solving equations in one variable are best illustrated graphically, indeed it is always a good idea to sketch the graph of the function before looking for the roots. Consider the roots of $F$ satisfying
\begin{displaymath}
F(x) = 0,
\end{displaymath} (1.8)

where $F(x)$ is a continuous function of $x$. Setting $y = F(x)$ we can sketch the graph of $F$. This is shown schematically in Figure 1.1.

Figure 1.1: A sketch of a continuous function, $F$, that has a root at $x = r$.
\includegraphics [scale=0.7]{numfig1.ps}

The object is to obtain the value of the root $r$ in the interval $a
\le x \le b$, where $F(r) = 0$ or equivalently where the graph crosses the $x$-axis.

Before using the method described below, it is a good idea to identify the number of roots in the given interval. Consider Figure 1.2.

Figure: The graph of $\cos x$ illustrates a function that has an infinite number of roots where the graph crosses the $x$-axis.
\includegraphics [scale=0.7]{numfig2.ps}

$\cos x$ has an infinite number of roots. If we consider the interval $0 < x < \pi$, there is clearly only one root. Note that

\begin{displaymath}
\cos (0) = 1 > 0, \qquad \cos (\pi) = -1 < 0.
\end{displaymath}

Thus, there is a change in the sign of the function values at the two ends of the interval. However, if we consider the interval $0 < x <
3\pi$, there is again a sign change since

\begin{displaymath}
\cos (0) = 1 > 0, \qquad \cos(3\pi) = -1 < 0,
\end{displaymath}

but this time there are three roots in the interval. So a change in sign means that there are an odd number of roots. In the first interval the function does not have a turning point but in the second interval the function has two turning points, one lying above the $x$-axis and one lying below. These ideas are illustrated in the following example.

Example 1. .4

  1. Show that $F(x) = x^{3} + x - 1$ has only one root in the interval $[0,1]$. (This is a short hand notation for $0 \le x \le
1$.) The function $F$ is continuous and

    \begin{displaymath}
F(0) = - 1, \qquad F(1) = 1.
\end{displaymath}

    Hence, there is a sign change and there must at least one root in $[0,1]$. Now consider the derivative

    \begin{displaymath}
F^{\prime}(x) = 3x^{2} + 1 > 0.
\end{displaymath}

    The derivative is positive and so there are no turning points at all. Hence, there can only be one root.

  2. Show that $F(x) = x^{3} - x + 1$ has only one root in $[-2,-1]$. Note

    \begin{displaymath}
F(-2) = -8 + 2 + 1 = - 5, \qquad F(-1) = -1 + 1 + 1 = 1.
\end{displaymath}

    Again there is a sign change and so there must be at least one root in the interval. To check the number of roots we look at the derivative

    \begin{displaymath}
F^{\prime}(x) = 3x^{2} - 1.
\end{displaymath}

    There are two turning points where

    \begin{displaymath}
x^{2} = {1\over 3}, \qquad x = \pm {1\over \sqrt{3}} = \pm 0.57735
\end{displaymath}

    In this example, the turning points are outside the interval and so there can only be one root in the interval $[-2,-1]$. In fact, it turns out for this function that there is only one root since at the turning points

    \begin{displaymath}
F\left ({1\over \sqrt{3}}\right ) = 1 - {2\over 3\sqrt{3}} = 0.615,
\end{displaymath}

    and

    \begin{displaymath}
F\left (-{1\over \sqrt{3}}\right ) = 1 + {2\over 3\sqrt{3}} = 1.385.
\end{displaymath}

    Both turning points lie above the $x$-axis and so there is only one root.


next up previous
Next: Newton-Raphson Method Up: Approximate Numerical Methods for Previous: Forms of Numbers and
Prof. Alan Hood
2000-02-01