# Math Insight

### Applet: Function iteration

The effect of repeatedly applying the function $f(x)$ to the starting value $x_0$ is shown both by the list at the right and the graph at the left. At first, only the initial value $x_0$ is shown in the list and just the point $(0,x_0)$ is shown on the graph. (In the list heading, $x_n$ is written as x_n.) Each time you click the “iterate” button, the function is iterated by applying $f$ to the previous value, using the recursion $x_n = f(x_{n-1})$. Then, the new iterate $x_n$ appears in the list and the new point $(n,x_n)$ appears on the graph. Note that the iteration number $n$ is plotted on the horizontal axis (what you may normally think of as the $x$-axis), and the values of $x_{n}$ are plotted on the vertical axis (what you may normally think of as the $y$-axis). The values of each $x_{n}$ are also marked with horizontal lines and the last value $x_{n}$ is labeled. You can change the function $f(x)$ by typing a new function in the box. You can change the initial point $x_0$ by typing a new value in the box or dragging the blue point. You can zoom the vertical axis with the + and - buttons and pan up and down with the buttons labeled by arrows.

Applet file: function_iteration.ggb