Math Insight

Applet: Visualizing function iteration via cobwebbing, combined with plot of solution

Cobwebbing is a graphical method of exploring the behavior of repeatedly applying a function $f(x)$ to an initial value $x_0$. The left panel shows a cobweb plot while the right panel shows a plot of the results versus iteration number. The initial value $x_0$ is shown as the blue point on the horizontal-axis in the left panel and the blue point on the vertical axis in the right panel. At first just $x_0$ is shown. 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})$. The cobweb plot at the left shows how the new value of $x$ can be obtained by moving straight up or down from the previous point to the graph of $f$ (the blue curve). This process gives the new value $x_n$ as the vertical coordinate of the point where one hits the graph. To translate that value of $x_n$ to the horizontal coordinate, one moves left or right to the diagonal line (the red line). Then, one can find the next value by moving up or down to the graph of $f$ again. The new values are simultaneously plotted in the right panel as the points $(n,x_n)$. 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 one of the blue points. You can zoom in and out with the + and - buttons as well as pan in different directions with the buttons labeled by arrows.

Applet file: function_iteration_cobweb_combined.ggb

Applet links

This applet is found in the pages

List of all applets

General information about Geogebra Web applets

This applet was created using Geogebra. In most Geogebra applets, you can move objects by dragging them with the mouse. In some, you can enter values with the keyboard. To reset the applet to its original view, click the icon in the upper right hand corner.

You can download the applet onto your own computer so you can use it outside this web page or even modify it to improve it. You simply need to download the above applet file and download the Geogebra program onto your own computer.