Math Insight

Analyzing two-dimensional linear differential equations

Math 2241, Spring 2023
Name:
ID #:
Due date: March 1, 2023, 11:59 p.m.
Table/group #:
Group members:
Total points: 1
  1. Our goal is to understand the behavior of two-dimensional linear differential equations. The general form of such a system is \begin{align*} \diff{x}{t} &= \alpha x + \beta y\\ \diff{y}{t} &= \gamma x + \delta y \end{align*} where the parameters $\alpha$, $\beta$, $\gamma$ and $\delta$ are just four numbers. (They are the Greek letters alpha, beta, gamma and delta.)

    The system is linear because each term is either a number times $x$ or a number times $y$. Linear systems are much simpler than nonlinear systems that contain terms like $x^2$ or $xy$ (such as the model for competition between species). In fact, we can completely characterize the behavior of a linear system, determining how the behavior depends on the values of the parameters $\alpha$, $\beta$, $\gamma$ and $\delta$.

    1. To analyze the linear system, we will rewrite it in terms of a matrix-vector product. The behavior of the system will be completely captured by the eigenvalues and eigenvectors of the associated matrix.

      Rewrite the system in matrix form as $$\diff{\vc{x}}{t} = A\vc{x}$$ where $\vc{x}=(x,y)$ and the matrix $A$ is



      $\displaystyle A = $





    2. If the number $\lambda$ is an eigenvalue of $A$ with eigenvector $\vc{u}$, then $A\vc{u} =$
      .

    3. Imagine that at some moment $t$, the state of the system $\vc{x}(t)$ happens to be proportional to the eigenvector $\vc{u}$, i.e,. $\vc{x}(t) = b \vc{u}$ for some number $b$. This means that, at this moment,
      $\diff{\vc{x}}{t} = A\vc{x} = bA\vc{u} = $
      .

      The change in $\vc{x}$, i.e., $\diff{\vc{x}}{t}$ is exactly in the direction of the eigenvector! In other words, if $\vc{x}(t)$ is in the direction of the eigenvector, any change in $\vc{x}$ will also be in the direction of the eigenvector. This means for all future times, the solution $\vc{x}(t)$
      .

      This is our first important observation: if, at any moment $t$, the solution $\vc{x}(t)$ is proportional to an eigenvector of $A$, it will stay proportional to that eigenvector forever.

    4. If we know that $\vc{x}(t)$ is proportional to $\vc{u}$ forever, we can rewrite it as $$\vc{x}(t) = b(t)\vc{u}.$$ This equation makes it explicit that the only thing that changes with time is the proportionality constant $b(t)$.

      If we differentiate this form of $\vc{x}(t)$, we just take the derivative of $b(t)$ since $\vc{u}$ is a constant vector. We can write the derivative as $$\diff{\vc{x}}{t} = b'(t)\vc{u}.$$ Above, you should had determined that $\diff{\vc{x}}{t} = b\lambda\vc{u}$. Setting these two expressions for $\diff{\vc{x}}{t}$ equal to each other, we see that $$b'(t)\vc{u} = b\lambda\vc{u}.$$ You can cancel the vector $\vc{u}$ from both sides of this equation to get an equation that the proportionality constant $b(t)$ must satisfy:
      $\diff{b}{t} =$

      This is our second important observation. If the solution $\vc{x}(t)$ is proportional to the eigenvector $\vc{u}$, then the proportionality constant $b(t)$, defined by $\vc{x}(t)=b(t)\vc{u}$ must satisfy the differential equation: $$\diff{b}{t} = \lambda b.$$

    5. It is easy to solve a single linear differential equation of the form $\diff{b}{t} = \lambda b$. The solution is an exponential function $$b(t) = ce^{\lambda t}$$ for some number $c$. You can verify that this is true by calculating the derivative of $b(t)$ and observing that, by the chain rule, a factor of $\lambda$ comes down from the exponent. You can watch a video demonstrating this fact, if you like.

      Putting this solution together with our above two solutions, we can conclude that, if at any moment, the solution $\vc{x}(t)$ is proportional to an eigenvector $\vc{u}$ of $A$, then the solution $\vc{x}(t)$ is:
      $\vc{x}(t) =$

      where $c$ is a number and $\lambda$ is the eigenvalue corresponding to $\vc{u}$.

    6. OK, that's pretty special. We'd get the solution $$\vc{x}(t) = c e^{\lambda t} \vc{u}$$ only for the special case that $\vc{x}(t)$ happened to be on the eigenvector $\vc{u}$. It would seem that this formula is pretty useless since most of the time, we wouldn't be so lucky.

      However, it turns out that for matrices that have two different real eigenvectors (we won't worry too much about special cases where it gets harder), that formula still pretty much captures the behavior of $\vc{x}(t)$. We just have to duplicate the formula, once for each eigenvector, and add the results together. (Everything works out so pretty because the system is linear, where we can always add special solutions like the above formula and the sum is a solution.)

      Here's the nice end result. If $\lambda_1$ and $\lambda_2$ are real, distinct eigenvalues of the $2 \times 2$ matrix $A$, with eigenvectors $\vc{u}_1$ and $\vc{u}_2$, then the solution to $\diff{\vc{x}}{t}=A\vc{x}$ always looks like $$\vc{x}(t) = c_1 e^{\lambda_1 t} \vc{u}_1 + c_2 e^{\lambda_2 t}\vc{u}_2$$ for two numbers $c_1$ and $c_2$. In other words, the solution is just two copies of our original formula, one for each eigenvector.

      The two number $c_1$ and $c_2$ are determined by the initial condition $\vc{x}(0)$. If you plug in $t=0$ into the above equation, you get
      $\vc{x}(0) = $
      .

      If you know what the vector $\vc{x}(0)$ is, and you've already computed the eigenvectors $\vc{u}_1$ and $\vc{u}_2$, then to use the equation to find the constants, you just have to solve a system of two linear equations for $c_1$ and $c_2$. We're not going worry about this too much, other than to recognize that we could solve for $c_1$ and $c_2$ if we wanted to.

  2. Consider a simple case for two linear differential equations \begin{align*} \diff{x}{t} &= -1.4x\\ \diff{y}{t} &= 0.3y. \end{align*} The equation for $x$ doesn't depend on $y$ and the equation for $y$ doesn't depend on $x$. We say these equations are uncoupled, so we could just immediately solve each equation to know the solution must be $x(t) = c_1 e^{ -1.4 t}$ and $y(t) = c_2 e^{ 0.3 t}$. But, let's pretend we didn't notice this fact and treat it like a two-dimensional system. Since we already know the answer, this example can help us understand how 2D linear systems work.
    1. Rewrite the system in matrix form as $$\diff{\vc{x}}{t} = A\vc{x}$$ where $\vc{x}=(x,y)$ and the matrix $A$ is



      $\displaystyle A = $





      (We call such a matrix a diagonal matrix as all entries that aren't on the diagonal are zero.)

      Calculate the eigenvalues of $A$. Enter them in increasing order.
      $\lambda_1 =$
      , $\lambda_2=$

      (It seems that the eigenvalues of a diagonal matrix are easy to compute.)

      Calculate the eigenvectors of $A$. Enter them so that they correspond with the above eigenvalues.
      $\vc{u}_1 = $
      , $\vc{u}_2=$

      Since these vectors are so simple, for full credit, enter them as unit vectors (i.e., with length 1) and non-negative entries.

      The general solution, which we calculated above, is in terms of these eigenvalues and eigenvectors:
      $\vc{x}(t) = c_1 e^{ \lambda_1 t } \vc{u}_1 + c_2 e^{\lambda_2 t} \vc{u}_2$
      $= \Biggl($
      $,$
      $\Biggr)$

      In terms of the components of $\vc{x}(t) = (x(t),y(t))$ the solution is
      $x(t) = $

      $y(t) = $

      That answer looks like the one we knew we'd get.

    2. What is the one equilibrium of the dynamical system?
      $\vc{x}(t) = $

      Let's imagine that $c_1$ and $c_2$ are small, so that the initial condition $\vc{x}(0) = (c_1,c_2)$ is close to the equilibrium. As $t$ increases, will the solution $\vc{x}(t) = (c_1e^{ -1.4 t}, c_2 e^{ 0.3 t})$ move closer or further away from the equilibrium?

      Since the solution $\vc{x}(t)$ will move away from the equilibrium for some initial conditions $\vc{x}(0) = (c_1,c_2)$ that are close to the equilibrium, we say the equilibrium is unstable.

      Since, for some special initial conditions, the solution does approach the equilibrium, we classify the equilibrium as a saddle. (The term is an analogy to a saddle you might put on a horse. There is a point in the center of a saddle where, if you set a ball carefully right at that point, the ball wouldn't move. This central point is the equilibrium. If you bumped the ball in most directions, it would fall off the side of saddle. But, you could imagine bumping the ball precisely in the direction where the saddle goes up from the center. If you made such a precise change in the ball's position, you could imagine the possibility of it rolling back to the equilibrium.)

      Notice how we got a saddle when one eigenvalue $\lambda_1=-1.4$ was negative and the other eigenvalue $\lambda_2=0.3$ is positive. This means that one term from the general solution is shrinking: the $c_1 e^{ -1.4t } \vc{u}_1$ term. The other term from the general solution is growing: the $c_2 e^{ 0.3t } \vc{u}_2$ term.

    3. Use the following applet to explore the behavior of this linear system with its saddle. The solution is shown by the thick cyan curves. (To help illustrate the behavior, the solution for negative time is also shown by the thin cyan curves.)

      The right panel shows curves that should be familiar. There, $x$ is plotted versus $t$ on the top axes (solid curve) and $y$ is plotted versus $t$ on the bottom axes (dashed curve). With the parameters from this problem (which is the default for this applet), $x(t)$ shows exponential decay (as $x(t)=c_1 e^{ -1.4 t}$) and $y(t)$ shows exponential growth (as $y(t)=c_2e^{ 0.3 t}$). You can move the slider for $t$ (or press the play bottom in the lower left of one of the panels) so that red points illustrating $x(t)$ and $y(t)$ move along the curves.

      The left panel shows the phase plane with the state variable $x$ plotted versus the state variable $y$. There is no representation of time $t$ in the phase plane. The cyan solution trajectory in the phase plane is the curve that the point $(x(t),y(t))$ traces out as $t$ increases. To help visualize time, you can change the value of $t$ and observe how the red point $(x(t),y(t))$ changes.

      You can change the initial condition $\vc{x}(0)=(x(0),y(0))$ by dragging a cyan point in either the phase plane (to change both $x(0)$ and $y(0)$ simultaneously) or in the plots versus time (to change either $x(0)$ or $y(0)$ separately).

      Control panel (Show)
      Eigenvalues and eigenvectors (Show)
      Solution (Show)

      The applet also automatically calculates the eigenvalues and eigenvectors, as well as show the formula for the solution, given the initial condition determined by the cyan points (or via the control panel).

      Click the “show eigenvectors” box to reveal how the eigenvectors $\vc{u}_1$ and $\vc{u}_2$ point in the direction of $x$-axis and the $y$-axis, respectively. Arrows on the eigenvectors point toward the origin if the corresponding eigenvalue is positive.

      Click the “show vector” box to show a vector from the origin to the point $(x(t),y(t))$. In this way, you can see the direction of the point even if it moves off the window. For most initial conditions, in what direction does the vector $(x(t),y(t))$ point after $t$ gets large? In the direction of the vector
      . (You can increase $t$ as large as 10 using the slider. If you want to try even larger values of $t$, you can change this bound in the control panel.)

      Can you find an initial condition for which $(x(t),y(t))$ tends toward the equilibrium as $t$ gets large? One such initial condition is $(x(0),y(0)) =$
      . (You can't enter the origin $(0,0)$, as that's too easy and misses the point.)

      You should have found that the solution usually ends up pointing in the direction of the eigenvector $\vc{u}_2$ with the positive eigenvalue. Only if the initial condition is exactly along the eigenvector $\vc{u}_1$ (which corresponds to $c_2=0$) does the solution head to the origin.

    4. What changes if you change the sign of the lower right entry of $A$? Then $$A = \begin{bmatrix} -1.4& 0\\0 & -0.3\end{bmatrix},$$ and the system of equations becomes \begin{align*} \diff{x}{t} &= -1.4x\\ \diff{y}{t} &= -0.3y \end{align*} with solution
      $x(t) = $

      $y(t) = $

      (Use $c_1$ and $c_2$ for the constants, as before.)

      The eigenvectors remain the same and the eigenvalues become $\lambda_1=$
      and $\lambda_2=$
      . Since both eigenvalues are negative, will the solution $\vc{x}(t)$ move closer or further away from the equilibrium at the origin as $t$ increases?

      Since for all nearby initial conditions, the solution moves toward the origin, we say that the origin is stable. Since the solution moves directly toward the origin (as opposed to spiral into the origin), we classify the equilibrium as a stable node. (Some folks call it a sink.)

      Be sure to familiarize yourself with the behavior of the stable node by changing the matrix in the above applet using the control panel.

    5. We will see yet different behavior if you make both diagonal entries of $A$ be positive. For the matrix $$A = \begin{bmatrix} 1.4& 0\\0 & 0.3\end{bmatrix},$$ the system of equations becomes \begin{align*} \diff{x}{t} &= 1.4x\\ \diff{y}{t} &= 0.3y \end{align*} with solution
      $x(t) = $

      $y(t) = $

      (Use $c_1$ and $c_2$ for the constants, as before.)

      Now the eigenvalues are $\lambda_1=$
      and $\lambda_2=$
      . Since both eigenvalues are positive, will the solution $\vc{x}(t)$ that starts near the equilibrium move closer or further away from the equilibrium at the origin as $t$ increases?

      Since for all nearby initial conditions, the solution moves away from the origin, we say that the origin is unstable. Since the solution moves directly away from the origin (as opposed to spiral away from the origin), we classify the equilibrium as an unstable node. (Some folks call it a source.)

      Be sure to familiarize yourself with the behavior of the unstable node by changing the matrix in the above applet using the control panel.

  3. Classifying a general system of two linear differential equations \begin{align*} \diff{x}{t} &= \alpha x + \beta y\\ \diff{y}{t} &= \gamma x + \delta y \end{align*} follows the same principle as for the uncoupled system. We view the system in matrix form as $\diff{\vc{x}}{t} = A\vc{x}$ where $\vc{x}=(x,y)$ and $$A=\begin{bmatrix}\alpha&\beta\\ \gamma&\delta\end{bmatrix}.$$ The behavior of the system will be determined by the eigenvalues and eigenvectors of $A$. In general, the eigenvectors, $\vc{u}_1$ and $\vc{u}_2$, will point in different directions (not just along the $x$ and $y$-axes, as happened in the uncoupled system). This means that the components $x(t)$ by itself and $y(t)$ by itself will have slightly more complicated behavior than exponential growth or decay.

    But, as long as $A$ has two real, distinct eigenvalues, $\lambda_1$ and $\lambda_2$, the general solution will look like $$\vc{x}(t) = c_1 e^{\lambda_1 t}\vc{u}_1 + c_2e^{\lambda_1 t}\vc{u}_2.$$ The characterization of the system as a stable node, an unstable node, or a saddle will depend solely on the eigenvalues. Write these conditions in terms of the eigenvalues $\lambda_1$ and $\lambda_2$.

    The system will be a stable node if
    .
    (Your answers should be two inequalities involving $\lambda_1$ and $\lambda_2$, joined by an “and” or an “or.”)
    In this case, the solution always approaches the equilibrium at the origin.

    The system will be a unstable node if
    .
    In this case, the solution always moves away from the equilibrium at the origin (assuming it didn't start exactly at the equilibrium).

    The system will be a saddle if
    .
    (To be concrete, let's assume $\lambda_1 \lt \lambda_2$, i.e., that $\vc{u}_1$ is the stable direction.)
    In this case, the solution will eventually move away from the equilibrium at the origin, unless it happen to start exactly along the stable direction parallel to $\vc{u}_1$.

    The only one of those three that is stable is the stable node. Therefore, what's the condition for the equilibrium to be stable?

    For the following linear systems, calculate the eigenvalues of the associated matrix and classify the system. (Type one of “stable node” or “unstable node” or “saddle” in the answer blank.)

    Each question also asks for the stable direction(s) of the equilibrium, i.e, the direction or directions from which a solution could approach the equilibrium. The correct answer depends on the classification as follows.

    • If the system is a stable node, enter all for the stable direction(s).
    • If the system is an unstable node, enter none for the stable direction(s).
    • If the system is a saddle, you have a little more work to do. Calculate the eigenvectors. Enter the eigenvector associated with the negative eigenvalue for the stable direction(s).

    You can calculate the eigenvalues and eigenvectors by hand, use the above applet, or any other computer program.

    1. For the linear system \begin{align*} \diff{x}{t} &= - 0.5 x + y\\ \diff{y}{t} &= 1.5 x - y, \end{align*} calculate the eigenvalues: $\lambda_1=$
      , $\lambda_2 =$

      Classify the equilibrium:

      Determine the stable direction(s):

    2. Consider the dynamical system \begin{align*} \begin{bmatrix} \diff{x}{t}\\\diff{y}{t} \end{bmatrix} = \left[\begin{matrix}1.5 & -0.5\\1 & -2\end{matrix}\right] \begin{bmatrix} x\\y \end{bmatrix} \end{align*} Calculate the eigenvalues: $\lambda_1=$
      , $\lambda_2 =$

      Classify the equilibrium:

      Determine the stable direction(s):

    3. Let $\vc{x}'(t) = A \vc{x}$ where $\vc{x}=(x,y)$ and $$A=\left[\begin{matrix}-0.3 & -1.3\\0.5 & 1.5\end{matrix}\right].$$ Calculate the eigenvalues: $\lambda_1=$
      , $\lambda_2 =$

      Classify the equilibrium:

      Determine the stable direction(s):

    4. Consider the system of linear differential equations \begin{align*} \diff{a}{t} &= - a - 0.6 b\\ \diff{b}{t} &= 0.2 a. \end{align*} Calculate the eigenvalues: $\lambda_1=$
      , $\lambda_2 =$

      Classify the equilibrium:

      Determine the stable direction(s):