Preface


This tutorial was made solely for the purpose of education and it was designed for students taking Applied Math 0330. It is primarily for students who have very little experience or have never used Mathematica before and would like to learn more of the basics for this computer algebra system. As a friendly reminder, don't forget to clear variables in use and/or the kernel.

Finally, the commands in this tutorial are all written in bold black font, while Mathematica output is in normal font. This means that you can copy and paste all commands into Mathematica, change the parameters and run them. You, as the user, are free to use the scripts for your needs to learn the Mathematica program, and have the right to distribute this tutorial and refer to this tutorial as long as this tutorial is accredited appropriately.

Return to computing page for the first course APMA0330
Return to computing page for the second course APMA0340
Return to Mathematica tutorial for the second course APMA0330
Return to Mathematica tutorial for the first course APMA0340
Return to the main page for the course APMA0340
Return to the main page for the course APMA0330
Return to Part II of the course APMA0330

Qualitative Analysis


If we view the differential equation span \( y' = f(x,y) \) as a formula for the slope of a tangent line to a solution curve, we can approximate the graph of a solution curve. Therefore, we can use this information to obtain a geometric description of the solutions to the equation.

Example. Consider autonomous differential equation: \( y'= y^2 \) subject \( y(0) = 2. \) Separating the variables,

\[ \frac{{\text d}y}{y^2} = {\text d}x\qquad \Longrightarrow \qquad -\frac{1}{y} = x+C , \]
where C is an arbitrary constant. From the initial condition, we find C = 1/2 and the solution becomes
\[ y(x) = \frac{2}{1-2x} . \]
Therefore, a continuous solution also exists on the interval \( (-\infty , 1/2) . \) If we change initial condition \( y(0) =-1 , \) the explicit solution is
\[ y(x) = -\frac{1}{1+x} . \]
Hence, a continuous solution exists on \( (-1, \infty ) . \)

The nullclines of the differential equation y' = f(x,y) are curves of zero inclination that are defined as solutions of the equation f(x,y) = 0. Nullclines are usually not solutions of the differential equation unless they are constants. The solution curves may cross nullclines when their slope is zero.

Point equilibria (or critical point) of an autonomous differential equation \( {\text d}y / {\text d} t = f(y) \) are defined as the solutions of f(y) = 0. Solutions of this algebraic equation are the constant solutions of the given differential equation. If y* is a point equilibrium of the differential equation \( \dot{y} = f(y) , \) then we call it locally stable if the solution returns to y* after a small perturbation. Otherwise we call y* unstable. There is a graphical and an analytical way to determine stability.

For the graphical analysis, we graph f(y) as a function of y. The point equilibria are the points of intersection of the graph f(y) with the horizontal axis. To determine stability, we check how solutios behave in a neighborhood of each point equilibrium. Plotting a direction field or phase portrait would be helpful.

The analytical analysis is based on linearization of the slope funcion about the equilibrium. The linearization of f(x) about the equilibrium y* is

\[ f(y) = f \left( y^{\ast} \right) + f' \left( y^{\ast} \right) \left( y- y^{\ast} \right) + \cdots . \]
A perturbation about the equilibrium y* can be written as \( z= y - y^{\ast} . \) Now, since \( \frac{{\text d}z}{{\text d}t} = \frac{{\text d}y}{{\text d}t} , \) we find
\[ \frac{{\text d}z}{{\text d}t} = f' \left( y^{\ast} \right) z \]
for z sufficiently small. Comparing this with exponential growth, it follows that y* is locally stable if \( f' \left( y^{\ast} \right) < 0 , \) and unstable if \( f' \left( y^{\ast} \right) > 0 . \) When \( f' \left( y^{\ast} \right) = 0 , \) the linear stability analysis is inconclusive. The analytical approach agrees with the graphical analysis: At locally stable equilibria, the slope of the tangent line at the equilibrium is negative; if the equilibrium is unstable, it is positive.

Andrewartha and Birch (1954) pointed out the ecological importance of spatial structure to the maintenance of populations based on studies of insect populations. They observed that although local patches become frequently extinct, migrants from other patches subsequently recolonize extinct patches, thus allowing the population to persist globally.

Levins in 2015.

In 1969, Richard Levins introduced the concept of metapopulations. This was a very influential paper that is highly cited even today. Richard Levins was of Ukrainian Jewish heritage and was born in Brooklyn, New York. Richard "Dick" Levins (1930--2016) was an extropical farmer turned ecologist, a population geneticist, biomathematician, mathematical ecologist, and philosopher of science who had researched diversity in human populations. Until his death, Levins was a university professor at the Harvard T.H. Chan School of Public Health and a long-time political activist. He was best known for his work on evolution and complexity in changing environments and on metapopulations. A metapopulation is a collection of subpopulations. Each subpopulation occupies a patch, and different patches are linked via migration of individuals between patches. Subpopulations may go extinct, thus leaving a patch vacant. Vacant patches may be recolonized by migrants from other subpopulations. This was a major theoretical advance: The metapopulation concept provided a theoretical framework for studying spatially structured populations, such as those studied by Andrewartha and Birch.

Levins' writing and speaking is extremely condensed. He was known throughout his lengthy career for his ability to make connections between seemingly disparate topics such as biology and political theory. This, combined with his Marxism, has made his analyses less well-known than those of some other ecologists and evolutionists who were adept at popularization. His research had the goal of making the obscure obvious by finding ways to visualize complex phenomena. Recent work examined the variability of health outcomes as an indicator of vulnerability to multiple non-specific stressors in human communities. One story of his Chicago years is that, in order to understand his lectures, his graduate students each needed to attend Levins' courses three times: the first time to acclimate themselves to the speed of his delivery and the difficulty of his mathematics; the second to get the basic ideas down; and the third to pick up his subtleties and profundities.

In Levins model, we keep track of the fraction of patches that is occupied by subpopulations. Subpopulations go extinct at a constant rate and we can set the time scale so that the rate is equal to 1. Vacant patches can be colonized at a rate that is proportional to the fraction of occupied patches; the constant of proportionality is denoted by k. If we call p(t) the proportion of occupied patches at time t, then writing \( p= p(t) , \) we find

\[ \frac{{\text d}p}{{\text d}t} = k\,p \left( 1- p \right) - p . \]

The first term on the right-hand side describes the colonization process. Note that an increase in the fraction of occupied patches occurs only if a vacant patch becomes occupied (the term 1 - p). The minus sign in front of the second term shows that an extinction event decreases the fraction of occupied patches.

To find equilibria, we set \( f(p) = k\,p \left( 1-p \right) -p \) and solve the equation f(p) = 0 for p:

\[ k\,p \left( 1- p \right) - p =0 . \]
Factoring p yields
\[ p \left[ k \left( 1- p \right) - 1 \right] =0 . \]
We find as one solution \( p^{\ast} = 0 . \) The other solution satisfies
\[ k \left( 1- p \right) - 1 =0 \qquad \Longrightarrow \qquad p= 1- \frac{1}{k} . \]
That is, the second solution is \( p^{\ast} = 1- 1/k . \) To make biological sense, we require the solution to be between 0 and 1. Since k > 0, we see that p* < 1. To make sure that p* > 0, we need k > 1. Since the derivative \( f' (p) = k\left( 1-2p \right) -1 \) at critical points is
\[ f' (0) = k-1 > 0 \qquad \mbox{and} \qquad f' (1-1/k) = 1-k < 0 \quad\mbox{for }\ k > 1, \]
we conclude that p* = 0 is ustable and p* = 1 - 1/k is asymptotically stable.

We see that when 0 < k < 1, there is only one biologically relevant equilibrium, namely the trivial equilibrium p* = 0, which is locally stable. When k > 1, the trivial equilibrium becomes unstable, and a second equilibrium appears, \( p^{\ast} = 1- 1/k , \) which is locally stable.

g[x_] = Piecewise[{{0, 0 < x < 1}, {Sqrt[x - 1], 1 < x}}]
a = Plot[g[x], {x, 0, 2}, PlotStyle -> {Thick, Black}]
b = Plot[0, {x, 1, 2}, PlotStyle -> {Dashed, Thick, Blue}]
Show[a, b]
The solid lines indicate locally stable equilibria; the dashed line the unstable equilibrium.

If we graph the equilibria as a function of the parameter k, we see that there is a qualitative change in behavior at k = 1. We call this a critical value k* =1 because for k < 1, the behavior is qualitatively different from the behavior when k > 1: the stability of the trivial equilibrium changes at k* =1 and a new and nontrivial equilibrium emerges. We will discuss this phenomenon in bifurcation section.

 

Validity Intervals


 

First Order ODEs

Plotting Solutions to ODEs

Direction Fields

Separable Equations

Equations Reducible to the Separable Equations

Equations with Linear Fractions

Exact Equations

Integrating Factors

Linear Equations

RC circuits

Bernoulli Equations

Riccati Equations

Existence and Uniqueness

Qualitative Analysis

Bifurcations

Orthogonal Trajectories

Population Models

Applications

 

Return to Mathematica page

Return to the main page (APMA0330)
Return to the Part 1 (Plotting)
Return to the Part 2 (First Order ODEs)
Return to the Part 3 (Numerical Methods)
Return to the Part 4 (Second and Higher Order ODEs)
Return to the Part 5 (Series and Recurrences)
Return to the Part 6 (Laplace Transform)