### Applet: Function iteration using initial bacteria growth model

To test how well the model $B_{t+1}=\frac{5}{3}B_t$ with $B_0=0.022$ matches experimental data for the bacteria population, we can iterate the function $f(x)=\frac{5}{3}x$ with initial conditions $x_0=0.022$. For comparison, the bacteria data are plotted with purple diamonds. Click iterate a few times to see the solution $B_{t} = \left(\frac{5}{3}\right)^t 0.022$, shown in the right panel under the x_n heading and plotted as green dots in the right panel.

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_bacteria_growth_initial_model.ggb

#### Applet links

#### 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.