### Video: Using applet to explore lead level decay

#### Video links

This video is found in the pages

#### Transcript of video

To model the decay of lead levels in the bloodstream, we'll use the discrete dynamical system spreadsheet applet. When you download the applet and run it using Geogebra on your own computer, the applet will look like this, with a menu and toolbar visible at the top.

In the spreadsheet at the right, we will compute the evolution of the lead concentration. The first column, column A, shows the time point, where time is measured in weeks. In the second column, column B, we'll compute the lead level $p_t$. Let's change the column heading to $p_t$ from the generic $x_t$ that is the default heading. The third column, column C, contains the points that are plotted in the Graphics window at the left. It contains the ordered pairs $(t,p_t)$, which means we will be plotting lead concentration versus time. Let's change the column heading to be in terms of $p_t$.

When we start the applet, column C contains the points (0,10) and (1,11), which are plotted in the Graphics window. Notice that if I type an ordered pair anywhere in the spreadsheet, the point is plotted to the left. If I type (5,13) in cell B5, a point appears here. Here's the point (15,21). We can delete points by highlighting them in either the Graphics window or the spreadsheet and pressing Delete.

The initial condition for the model is stored in cell B2. You can change the initial condition by typing in a new value there or by dragging the initial condition point along the vertical axis.

Let's start with the initial lead concentration of 64 μg/dl. But, when we enter an initial condition of 64, the points are outside the range of the Graphics window axes and disappear from the screen. To change the vertical axis, hold shift and drag up or down on the axis. Now we can see the points. If you hold shift and drag elsewhere, you can move the whole window around.

In our model, we assume that lead levels decrease by 11% each week, so we need to multiply the previous week's lead concentration by 0.89 to get the next week's concentration. The concentration after the first week is shown in cell B3. By default, the applet is just adding one to the initial condition. We need to change the formula in cell B3. Right-click cell B3 and select Object Properties. In the Basic tab, the definition of B3 is currently B2 + 1. Remember B2 is the initial condition. Type 0.89 times B2 to change it to the right formula of multiplying by 0.89 and press Enter. Clicking B3 in the list at the left shows that the formula has indeed changed to 0.89 times B2.

Closing the properties window, we see that the lead level after week 1 will be 56.96 μg/dl according to our model. The point (1,56.96) shows up in the graph.

We can use the properties of the spreadsheet to quickly calculate the lead level after week 2. We just highlight the cells in row 3, press Ctrl+C to copy, click in cell A4, and press Ctrl+V to paste. The spreadsheet automatically multiplies 56.96 by 0.89 to get the new concentration of 50.69 μg/dl, and plots the point (2, 50.69) from cell C4.

To calculate more than one point at a time, you can highlight a rectangle of cells, including columns A through C and as many rows as you like. Press Ctrl+V to paste into that rectangle, and the applet shows the lead concentration decreasing as the weeks go by.

The labels C2, C3, etc. get in the way and are irrelevant for our model, so let's get rid of them. Highlight the points, right-click, and turn off the labels by clicking Show Label.

No plot is useful without labels explaining how to interpret it. We must label our axes. The horizontal axis represents time t in weeks. To add a label, click the Add Text tool, click below the axis, and type in a label. We'll label it: time t (weeks). Let's label the vertical axis, too. We'll label it: lead level pt (μg/dl). To get the mu symbol, click Symbols and find it under Basic. We should really rotate the text so it fits better, but that's complicated to do in Geogebra given that we have a Greek symbol and a subscript. Instead, we'll just put each word on its own line. Edit the text by right-clicking, clicking Object properties, and going to the Text tab. Then press Enter between each word. That's good enough.

You can give your plot more style by changing how the points look. You can highlight them, go to Object Properties, and change their color, their size, or their style.

Now, you are at the point where you can explore what the model predicts about how fast the lead level decays and how this decay depends on the initial condition $p_0$.