# Math Insight

### Discrete dynamical system iteration examples

The following are examples of iterating discrete dynamical system. You can use the function iteration applet to quickly iterate these systems.

#### Example 1

For the dynamical system \begin{align*} x_{n+1} &= 2 - 0.5 x_n\\ x_0 &= 2 \end{align*} calculate $x_1$, $x_2$, and $x_3$. What happens to $x_n$ after a long time, i.e., for large values of $n$? (You can use the function iteration applet to quickly calculate $x_n$ for large $n$.)

Solution: We just plug in $x_0=2$ into the equation with $n=0$ to calculate $x_1$. \begin{align*} x_1 &= 2- 0.5 x_0\\ &= 2 - 0.5(2) = 1 \end{align*}

Plug in $x_1=1$ into equation with $n=1$ to calculate $x_2$. \begin{align*} x_2 &= 2- 0.5 x_1\\ &= 2 - 0.5(1) = 1.5 \end{align*} Similarly, $x_3=2-0.5x_2=2-0.5(1.5) = 1.25$.

To look at the long time behavior, we type in 2-0.5 x for $f(x)$ and 2 for $x_0$ in the function iteration applet and click “iterate” a bunch of times. The results are: \begin{align*} x_4 &= 1.375\\ x_5 &= 1.3125\\ x_6 &\approx 1.3438\\ x_7 &\approx 1.3281\\ x_8 &\approx 1.3359\\ x_9 &\approx 1.3320\\ x_{10} &\approx 1.3340. \end{align*} For $n \ge 15$, $x_{n} \approx 1.3333$. It appears that $x_{n}$ is pretty close $1 \frac{1}{3}$ for large $n$. (It turns out that $1 \frac{1}{3}$ is something called an equilibrium of the dynamical system.)

#### Example 2

For the dynamical system \begin{align*} x_{n+1} -x_{n} &= 2 - 1.5 x_n\\ x_0 &= 2 \end{align*} calculate $x_1$, $x_2$, and $x_3$. What happens to $x_n$ after a long time, i.e., for large values of $n$? (You can use the function iteration applet to quickly calculate $x_n$ for large $n$.)

Solution: We just plug in $x_0=2$ into the equation with $n=0$ to calculate $x_1$. \begin{align*} x_1 -x_0 &= 2- 0.5 x_0\\ x_1 - 2 &= 2 - 1.5(2) = -1\\ x_1 &= 1 \end{align*}

Plug in $x_1=1$ into equation with $n=1$ to calculate $x_2$. \begin{align*} x_2 -x_1 &= 2- 1.5 x_1\\ x_2 - 1 &= 2 - 1.5(1) = 0.5\\ x_2 &= 1.5 \end{align*}

Plug in $x_2=1.5$ into equation with $n=2$ to calculate $x_3$. \begin{align*} x_3 -x_2 &= 2- 1.5 x_2\\ x_3 - 1.5 &= 2 - 1.5(1.5) = -0.25\\ x_3 &= 1.25 \end{align*}

To plug the result into the function iteration applet, we need to write the dynamical system in the form \begin{align*} x_{n+1} = f(x_n), \end{align*} which we call function iteration form. The left hand side of equation $x_{n+1} -x_{n} = 2 - 1.5 x_n$ is $x_{n+1}-x_n$, which is the difference between the value of $x$ between two time steps (or you can think of $x_{n+1}-x_n$ as being the change in $x$). For this reason, we say the equation is in difference form. It's easy to rewrite the equation in function iteration form. We need to solve for $x_{n+1}$ by adding $x_{n}$ to both sides of the equation. \begin{align*} x_{n+1} -x_{n} &= 2 - 1.5 x_n\\ x_{n+1} &= 2 - 1.5 x_n + x_n = 2-0.5x_n. \end{align*} The dynamical system in function iteration form is \begin{align*} x_{n+1} &= 2 - 0.5 x_n\\ x_0 &= 2. \end{align*} Does this look familiar? It is exactly the same as the previous example. If we plug $f(x)=2-0.5x$ into the function iteration applet and iterate many times, we will see that $x_n$ approaches $1 \frac{1}{3}$.

#### Example 3

For the dynamical system \begin{align*} x_{n+1} &= 2 - 0.5 x_n^2\\ x_0 &= 1 \end{align*} calculate $x_1$, $x_2$, and $x_3$. (The notation $x_n^2$ means $(x_n)^2$.) What happens to $x_n$ after a long time, i.e., for large values of $n$? (You can use the function iteration applet to quickly calculate $x_n$ for large $n$.)

Solution: We just plug in $x_0=1$ into the equation with $n=0$ to calculate $x_1$. \begin{align*} x_1 &= 2- 0.5 x_0^2\\ &= 2 - 0.5(1) ^2 = 1.5 \end{align*}

Plug in $x_1=1.5$ into equation with $n=1$ to calculate $x_2$. \begin{align*} x_2 &= 2- 0.5 x_1^2\\ &= 2 - 0.5(1.5)^2 = 0.875 \end{align*} Similarly, $x_3=2-0.5x_2^2=2-0.5(0.875)^2 \approx 1.6172$.

To look at the long time behavior, we type in 2-0.5 x^2 for $f(x)$ and 1 for $x_0$ in the function iteration applet and click “iterate” a bunch of times. The results are: \begin{align*} x_4 &\approx 0.6924\\ x_5 &\approx 1.7603\\ x_6 &\approx 0.4506\\ x_7 &\approx 1.8985\\ x_8 &\approx 0.1979\\ x_9 &\approx 1.9084\\ x_{10} &\approx 0.0390. \end{align*} For $n \ge 13$, $x_n$ jumps back and forth between $x_n \approx 2$ (for odd $n$) and $x_n \approx 0$ (for even $n$). We say that the solution oscillates between these two values.

#### Example 4

For the dynamical system \begin{align*} y_{t+1} &= 2 - y_t^2\\ y_0 &= 1.5 \end{align*} calculate $y_1$, $y_2$, and $y_3$. What happens to $y_t$ after a long time, i.e., for large values of $t$? (You can use the function iteration applet to quickly calculate $y_t$ for large $t$.)

Solution: We just plug in $y_0=1.5$ into the equation with $t=0$ to calculate $y_1$. \begin{align*} y_1 &= 2- y_0^2\\ &= 2 - (1.5) ^2 = -0.25 \end{align*}

Plug in $y_1=-0.25$ into equation with $t=1$ to calculate $y_2$. \begin{align*} y_2 &= 2- y_1^2\\ &= 2 - (-0.25)^2 = 1.9375 \end{align*} Similarly, $y_3=2-y_2^2=2-(1.9375)^2 \approx -1.7539$.

To look at the long time behavior, we can still use the function iteration applet. However, the applet uses $x$ for the variable, so we have to translate $2-y_t^2$ in terms of $x$ and type in 2-x^2 for $f(x)$. After entering 1.5 for $x_0$ and clicking “iterate” a bunch of times, we obtain the results: \begin{align*} y_4 &\approx -1.0762\\ y_5 &\approx 0.8418\\ y_6 &\approx 1.2913\\ y_7 &\approx 0.3324\\ y_8 &\approx 1.8895\\ y_9 &\approx -1.5701\\ y_{10} &\approx -0.4653. \end{align*} Even after iterating to $y_{40}$ or beyond, we don't discern any clear pattern in the evolution. It turns out that they system is chaotic, and there is no such repeating pattern of the evolution.