Math Insight

Higher dimensional discrete dynamical systems

Math 2241, Spring 2023
Name:
ID #:
Due date: Feb. 8, 2023, 11:59 p.m.
Table/group #:
Group members:
Total points: 1
  1. So far, we have studied only two-dimensional discrete dynamical systems. For higher-dimensional systems, the ideas are the same. Let's take a look at an example: \begin{eqnarray*} x_{n+1}&=&1.1 x_{n} + 1.3 y_{n} + 0.8 z_{n}\\ y_{n+1}&=&0.7 x_{n} + 0.3 y_{n} + 0.8 z_{n}\\ z_{n+1}&=&0.4 x_{n} + 1.2 y_{n} + 0.7 z_{n}\\ x_0&=&49\\ y_0&=&32\\ z_0&=&43 \end{eqnarray*} Suppose we want to determine the long-term behavior of the system.
    1. The first step is to find the eigenvalues and eigenvectors of the corresponding matrix, which is $$A=\left[\begin{matrix}1.1 & 1.3 & 0.8\\0.7 & 0.3 & 0.8\\0.4 & 1.2 & 0.7\end{matrix}\right]$$ Finding the eigenvalues by hand is difficult for larger matrices, so we will have a computer program do it for us. There are many programs that can do this. We'll show you how to compute the eigenvalues and eigenvectors using Wolfram Alpha ® and R ©.

      For Wolfram Alpha, start by going to www.wolframalpha.com. Enter eigenvalues { { 1.1, 1.3, 0.8 }, { 0.7, 0.3, 0.8 }, { 0.4, 1.2, 0.7 } }. In general, each row is entered in curly brackets.

      For R, open the R console and start by creating the matrix. Enter A=matrix(c(1.1, 1.3, 0.8, 0.7, 0.3, 0.8, 0.4, 1.2, 0.7),3,3,byrow=TRUE) . You may wish to verify that the matrix is correct by just typing A on the next line. The c() command specificies the elements of the matrix, while the next two numbers specifies the size of the matrix. Next, enter eigen(A) to compute the eigenvalues and eigenvectors. Include at least five significant digits in your answer.

      Enter the eigenvectors and corresponding eigenvalues below:
      $\lambda_1=$
      , $\vc{v}_1=$

      $\lambda_2=$
      , $\vc{v}_2=$

      $\lambda_3=$
      , $\vc{v}_3=$

    2. The long-term behavior for a three-dimensional system is similar as for a two-dimensional system. Except for special initial conditions, the long-term behavior will be determined by the dominant eigenvalue (i.e., the eigenvalue that is largest in magnitude) and its eigenvector.

      What is the dominant eigenvalue?
      Since that eigenvalue's magnitude is
      , the solution will be
      (unless the initial condition happened to be a linear combination of just the other two eigenvectors, which is unlikely).

    3. What is the eigenvector of the dominant eigenvalue?

      We don't have a three-dimensional applet for you to visualize how multiplication by $A$ transforms vectors. But, the principles you learned in two dimensions work for three and higher dimensions.

      If the initial condition is a scalar multiple of an eigenvector (which is unlikely), what happens to the direction of the vector of state variables?

      For most initial conditions, what happens to the direction of the vector of state variables?

    4. For most applications, we don't gain intuition about the state variable vector by thinking about what direction it points. (Imagine if we have four or more state variables -- we'd have trouble visualizing the direction of a vector in four or more dimensions!) Let's reinterpret what the direction of a vector means so that it is easier to apply to a conclusion about the state variables.

      When we consider the direction of a vector, it means that we don't care about how long the vector is. If we scale a vector (multiply all its components by the same non-zero number), we lengthen or shorten the vector but leave its direction unchanged.

      What properties of a vector remain fixed when we rescale a vector? All but one of the following properties are unchanged under rescaling. Which one is not?

      From the direction of a vector, we can infer any of the properties that you didn't select, as those properties are determined by the direction (and not the length) of the vector.

    5. For most initial conditions, we know the direction of the state variable vector will approach the eigenvector of the dominant eigenvalue:
      $(x,y,z) = _$.

      In this direction, what is the ratio of $x$ to $y$?
      Therefore, for most initial conditions, in the solution $(x_n,y_n,z_n)$, the ratio of $x_n$ to $y_n$ for large $n$ will approach what value?

      We can rescale the eigenvector of the dominant eigenvalue by dividing each component by the sum of all the vector's components. In this form, the eigenvector gives the relative size of each of the components. What is this rescaled eigenvector?

      Imagine that $x_n$, $y_n$, and $z_n$ represented quantities. Relative to the total amount $x_n+y_n + z_n$, after a long time, what fraction of the total would you expect $x_n$ to account for?
      What fraction would you expect $y_n$ to account for?

      If, after a long time, the total amount $x_n+y_n+z_n=1000$, how large would you expect $z_n$ to be?

  2. Let's look at a model of a monarch butterfly population. The model incorporates the four stages of the butterfly's life: egg, caterpillar, pupa (chrysalis), and butterfly. Each day, an egg hatches into a caterpillar with probability $0.08$ or stays an egg with probability $0.2$. A caterpillar will turn into a pupa with probability $0.06$ or stay a caterpillar with probability $0.47$. A pupa will become an adult butterfly with probability $0.1$ or stay a pupa with probability $0.58$. Lastly, an adult butterfly will survive to the next day with probability $0.73$. Additionally, adult butterflies lay eggs at an average rate of $100$ per day. If $e_n, c_n, p_n,$ and $b_n$ denote the numbers of eggs, caterpillars, pupae, and butterflies, respectively, on day $n$, the dynamics of the population can be written as the following mathematical model: \begin{eqnarray*} e_{n+1}&=&0.2e_n+100b_n\\ c_{n+1}&=&0.08e_n+0.47c_n\\ p_{n+1}&=&0.06c_n+0.58p_n\\ b_{n+1}&=&0.1p_n+0.73b_n\\ e_0&=&250000\\ c_0&=&800\\ p_0&=&300\\ b_0&=&400 \end{eqnarray*} We want to predict if the monarch butterfly population will be able to sustain itself long-term or if they will eventually die off. We also want to know what fraction of the population will be adult butterflies in several years.
    1. Let's start by looking at the first week of butterfly populations. We'll use R to compute these values. First, create a matrix for the system and a matrix to represent the initial condition vector. The matrix corresponding to the butterfly model is $$A=\left[\begin{matrix}0.2 & 0 & 0 & 100\\0.08 & 0.47 & 0 & 0\\0 & 0.06 & 0.58 & 0\\0 & 0 & 0.1 & 0.73\end{matrix}\right]$$ To create the matrix in R enter the following at the R > command prompt:
      A=matrix(c(0.2, 0, 0, 100, 0.08, 0.47, 0, 0, 0, 0.06, 0.58,0, 0, 0, 0.1, 0.73),4,4,byrow=TRUE)
      For the initial condition vector, enter x=c(250000, 800, 300, 400). You may wish to verify that the matrices are correct by entering just the name on the next line (A or x, respectively).

      Now, to find the next day's population, enter the command:
      x=A %*% x
      The %*% is the R command for matrix multiplication. Written this way, we are overwriting the value of the vector $\vc{x}$ with the next day's populations. To see the actual value, enter x on the next line. Repeat these two steps for each day, and enter the values you get below (include at least one decimal place).

      Write the state vectors below, with $\vc{x}_n=\begin{bmatrix} e_n \\ c_n \\ p_n \\ b_n \end{bmatrix}$.
      $\vc{x}_1=$

      $\vc{x}_2=$

      $\vc{x}_3=$

      $\vc{x}_4=$

      $\vc{x}_5=$

      $\vc{x}_6=$

      $\vc{x}_7=$

      Based on this first week, do you think the population will be larger or smaller in several years?
      Are you confident about your answer?

    2. To get a certain answer, we need to find the eigenvalues and eigenvectors. To find the eigenvalues and eigenvectors in R, use the command eigen(A) with the matrix you created in part a. Include at least five significant digits in your answer.

      Enter the eigenvalues of $A$ (in any order) below.

      $\lambda_1=$

      $\lambda_2=$

      $\lambda_3=$

      $\lambda_4=$

    3. Two of the eigenvalues are complex, involving the imaginary number $i=\sqrt{-1}$, which adds oscillatory effects to the system. We are interested in which eigenvalue is largest in magnitude. List the magnitudes of the eigenvalues in increasing order:

      Magnitude of a complex number (Show)

      What is the dominant eigenvalue?

      What is its eigenvector?

    4. What are the long term prospects for the monarch butterfly population? Will it eventually grow larger, or will the butterflies gradually die off?

    5. It's good a thing we aren't relying on visualizing the effects of $A$ on the system. Since we have four state variables, we are dealing with four-dimensional vectors. Our visualizations don't work so well in four dimensions! Even so, we can easily work with higher dimensional vectors by just thinking of them as lists of numbers, in this case representing population sizes.

      Remember, the only important feature of an eigenvector is its direction (as it is still the same eigenvector after rescaling it by a non-zero number). It turns out that the matrices we'll consider for models like these will have a single dominant eigenvalue with an eigenvector that can be made to be all positive. When we rescale the eigenvector by the sum of its entries, each entry will be positive and correspond to the relative size of the corresponding state variable. Rescale this eigenvector so that the components sum to one.

      Now let's consider the fraction of the population which are adults in several years. The fraction on day $n$ is given by $\frac{b_{n}}{b_{n} + c_{n} + e_{n} + p_{n}}$. Based on the above rescaled eigenvector, after a long time, what fraction of the population will be adults, i.e., what value does this fraction approach as $n$ increases?

      After a long time, what fraction will be caterpillars?

    6. Let's see if the butterfly population has reached this long term prediction after 7 days. According to your above calculation, what was total population size ($e_n+c_n+p_n+b_n$) on day 6?
      On day 7?
      What is the ratio of the day 7 total to the day 6 total?
      Does the population size appear to be decaying as predicted by the dominant eigenvalue?

    7. Simulate the model for another 7 days. What is the predicted total population size on day 13?
      On day 14?
      What is the ratio of the day 14 total to the day 13 total?
      Does the population size appear to be decaying as predicted by the dominant eigenvalue?

    8. OK, this isn't going too well. Simulate the model for another 14 days. What is the predicted total population size on day 27?
      On day 28?
      What is the ratio of the 28 day total to the 27 day total?
      Does the population size appear to be decaying as predicted by the dominant eigenvalue?

      Finally, it looks like we are getting to the long term behavior. Let's see if the distribution across the different stages after 28 days is similar to that predicted by the dominant eigenvalue's eigenvector. Take the state variable $\vc{x}_{28}$ that you computed and divide by total population size (i.e., its sum) so that the resulting vector represents the fraction of each stage on day 28 as predicted by the model.


      Are those numbers pretty close to the rescaled eigenvector?

      On day 28, what fraction of the population is adults?
      What fraction is caterpillars?