Iteration

You can also solve many equations of the form f (x) = x numerically using Iterate from the Calculus submenu. This technique works for functions satisfying $\left\vert\vphantom{ f^{\prime }(x)}\right.$f(x)$\left.\vphantom{ f^{\prime }(x)}\right\vert$ < 1 near the intersection of the curve y = f (x) and the line y = x. You start with an estimate x0 for the root, and Iterate returns the list of values

f (x0), f$\displaystyle \left(\vphantom{ f(x_{0})}\right.$f (x0)$\displaystyle \left.\vphantom{ f(x_{0})}\right)$, f$\displaystyle \left(\vphantom{ f\left( f(x_{0})\right) }\right.$f$\displaystyle \left(\vphantom{ f(x_{0})}\right.$f (x0)$\displaystyle \left.\vphantom{ f(x_{0})}\right)$$\displaystyle \left.\vphantom{ f\left( f(x_{0})\right) }\right)$, f$\displaystyle \left(\vphantom{ f\left( f\left( f(x_{0})\right) \right) }\right.$f$\displaystyle \left(\vphantom{ f\left( f(x_{0})\right) }\right.$f$\displaystyle \left(\vphantom{ f(x_{0})}\right.$f (x0)$\displaystyle \left.\vphantom{ f(x_{0})}\right)$$\displaystyle \left.\vphantom{ f\left( f(x_{0})\right) }\right)$$\displaystyle \left.\vphantom{ f\left( f\left( f(x_{0})\right) \right) }\right)$,…

up to the number of iterations you specify. In appropriate situations, these values converge to a root of the equation f (x) = x.


\begin{example}
Use \textsf{Iterate} to solve the equation $\cos x=x$.
\par
\be...
...0)),\ldots ,f(f(f(f(f(f(f(f(f(f(1.0))))))))))
\end{displaymath}
\end{example}

You can generate these numbers geometrically by starting at the point (1, 0) and moving vertically to the curve y = cos x, then horizontally to the line y = x, then vertically to the curve y = cos x, then horizontally to the line y = x, and so forth, as illustrated in the following figure. dtbpF3in2.0003in0pt

This figure can be generated by plotting cos x and x as usual, then selecting the matrix

$\displaystyle \left[\vphantom{
\begin{array}{cc}
1.0 & 0 \\
1.0 & .5403 \...
...348 & .79348 \\
.79348 & .70137 \\
.70137 & .70137
\end{array}
}\right.$$\displaystyle \begin{array}{cc}
1.0 & 0 \\
1.0 & .5403 \\
.5403 & .5403 ...
... \\
.79348 & .79348 \\
.79348 & .70137 \\
.70137 & .70137
\end{array}$$\displaystyle \left.\vphantom{
\begin{array}{cc}
1.0 & 0 \\
1.0 & .5403 \...
...348 & .79348 \\
.79348 & .70137 \\
.70137 & .70137
\end{array}
}\right]$

and dragging it to the frame.