• Home
  • Textbooks
  • Computer Algebra Recipes
  • Phase-Plane Analysis

Computer Algebra Recipes

Richard H Enns, George C McGuire

Chapter 2

Phase-Plane Analysis - all with Video Answers

Educators


Chapter Questions

View

Problem 1

Consider the simple circuit shown in Figure 2.6, consisting of a charged capacitor $C$ connected to a coil of $N$ turns wrapped around an iron core. The current $i$
Figure 2.6: Iron core inductor circuit.
(Figure Cant Copy)
versus flux $\Phi$ relation for the iron core inductor has the form $i=N \Phi / L_0+A \Phi^3$, where $L_0$ is the self-inductance of the coil, $\Phi$ is the flux threading through one turn of the coil, and $A>0$.
(a) Using Kirchhoff's voltage rule, show that the governing ODE is given by
$$
\ddot{\Phi}+\alpha \Phi+\beta \Phi^3=0,
$$
where $\alpha$ and $\beta$ are left for you to identify.
(b) Reexpress the ODE in a dimensionless form with $\alpha$ and $\beta$ scaled out.
(c) Analytically show that the origin of the phase plane is a vortex. Confirm with a phase-plane $(\dot{\Phi}$ versus $\Phi)$ portrait containing a representative orbit.
(d) Use the scene option to plot $\Phi(t)$.

Lainey Roebuck
Lainey Roebuck
Numerade Educator
02:26

Problem 2

The armies of two warring countries are modeled by the following equations:
$$
\dot{C}_1=\alpha C_1-\beta C_1 C_2, \quad \dot{C}_2=(\alpha+1) C_2-\gamma \beta C_1 C_2,
$$
with $\alpha$ and $\beta$ both positive and $\gamma>1$. Here $C_1$ and $C_2$ are the numbers of individuals in the armies of countries 1 and 2.
(a) Discuss the model equations and how the model could be improved.
(b) Analytically locate and identify all the stationary points.
(c) Taking $\alpha=5, \gamma=1.15$, and $\beta=1 / 2500$, make a tangent field plot that includes all stationary points and some representative trajectories. Discuss possible outcomes on the basis of this plot.
(d) Using appropriate scene options, create plots of $C_1(t)$ and $C_2(t)$.

Varsha Aggarwal
Varsha Aggarwal
Numerade Educator

Problem 3

You are told that the following system has either a vortex or a focal point at the origin. Analytically determine which it is and support your conclusion by creating a suitable phase-plane portrait.
$$
\dot{x}=y+x\left(x^2+y^2\right), \quad \dot{y}=-x+y\left(x^2+y^2\right)
$$

Check back soon!
04:06

Problem 4

For a hard (soft) spring, the displacement $x$ from equilibrium is described by
$$
\ddot{x}+\omega^2\left(1 \pm \alpha^2 x^2\right) x=0, \text { with } \omega>0, \alpha>0 .
$$
The plus sign is for the hard spring, the minus sign for the soft spring. Carry out the steps listed in the preamble for each spring type. Discuss the origin and nature of the restoring force leading to each equation.

James Kiss
James Kiss
Numerade Educator
01:11

Problem 5

The displacement $x$ of an eardrum is described by the model equation
$$
\ddot{x}+x-x^2 / 2=0 .
$$
Carry out the steps listed in the preamble.

James Kiss
James Kiss
Numerade Educator
04:03

Problem 6

Carry out the steps listed in the preamble for each of the following systems:
(a) $\dot{x}=x^2-y^3, \quad \dot{y}=2 x\left(x^2-y^2\right)$;
(b) $\dot{x}=-x, \quad \dot{y}=1-x^2-y^2$;
(c) $\dot{x}=x\left(1-x^2-6 y^2\right), \quad \dot{y}=y\left(1-3 x^2-3 y^2\right)$.

Sushmit Acharya
Sushmit Acharya
Numerade Educator
04:18

Problem 7

The study of disease occurrence is called epidemiology. There are basically three types of deterministic models for infectious diseases that are spread by direct person-to-person contact. One of these models is referred to as the SIR model, the name being an acronym for the three population categories in the model. The $S$ refers to the number of susceptibles who have not yet caught the disease, the $I$ to the number of infectibles who have become infected with the disease, and $R$ to the number of removables who have had the disease and are immune to catching that disease again. The disease being considered is such that very few people die from it. The SIR model equations are given by
$$
\dot{S}=b-a I S, \quad \dot{I}=a I S-c I, \quad \dot{R}=c I,
$$
where $b=1$ is the constant birth rate, $a=0.001$ is the interaction coefficient between susceptibles and infectibles, and $c=0.1$ is the rate of increase of the removables. More generally, the model will have natural deaths in each category. The initial conditions are $S(0)=100, I(0)=1$, and $R(0)=0$.
Carry out the steps listed in the preamble. Note: To use the symbol $I$, first enter the command interface (imaginaryunit $j$ ), which assigns $j$ to stand for $\sqrt{-1}$, rather than I. Discuss problems with the SIR model.

Khoobchandra Agrawal
Khoobchandra Agrawal
Numerade Educator

Problem 8

The population densities of prey (variable $x$ ) and predators (variable $y$ ) are governed by the following nonlinear ODEs:
$$
\dot{x}=x-A x^2-B x y, \quad \dot{y}=y-C y^2+D x y,
$$
with the coefficients $A, B, C$, and $D$ all positive.
(a) What do the terms involving $A$ and $C$ represent physically?
(b) Show that the nature of the stationary points depends on whether $C>B$, $C=B$, or $C<B$.
(c) For $C>B$ and $C<B$, show that in each case four simple stationary points occur, and locate and identify them.
(d) Choosing appropriate numerical values for the parameters, make phaseplane portraits for each case in part (c), superimposing representative trajectories on the tangent field. Represent the stationary points in the plot by colored circles.
(e) For $C=B$, show that two of the four stationary points are higher-order fixed points. What are the other two stationary points?
(f) Make phase-plane portraits for part (e), superimposing representative trajectories on the tangent field. Represent the stationary points in the plot by colored circles.

Check back soon!

Problem 9

Suppose that in the preceding problem $D=-B$, so that the interaction is disadvantageous to both species. Taking $A=B=C=1$, find the stationary points of the new system and identify them. Confirm the stationary-point analysis by producing appropriate phase-plane portraits.

Check back soon!
00:44

Problem 10

Create your own complicated model of the gnus-sung interaction by modifying the last term in each of the equations. Follow the procedure in the text recipe and determine the fate of the two populations in your model. Feel free to experiment with parameter values and initial conditions.

Sana Riaz
Sana Riaz
Numerade Educator
07:03

Problem 11

Consider the coupled ODE system
$$
\dot{x}=y\left(1+x-y^2\right), \quad \dot{y}=x\left(1+y-x^2\right) .
$$
Using conditional logic statements, locate and identify all the fixed points. Make a tangent-field plot containing all these stationary points.

Linda Winkler
Linda Winkler
Numerade Educator
06:15

Problem 12

Locate and identify all the fixed points of the ODE system
$$
\dot{x}=16 x^2+9 y^2-25, \quad \dot{y}=16 x^2-16 y^2,
$$
making use of conditional logic statements. Support the identification with a tangent-field plot containing all the stationary points.

Dwijendra Rao
Dwijendra Rao
Numerade Educator
06:14

Problem 13

The major food source for squid is herring. If $S$ and $H$ are the numbers of squid and herring, respectively, per acre of seabed, the interaction between the two species can be modeled [Sco87] by the system (with time in years)
$$
\dot{H}=k_1 H-k_2 H^2-k_3 H S, \quad \dot{S}=-k_4 S-k_5 S^2+b k_3 H S,
$$
with $k_1=1.1, k_2=10^{-5}, k_3=10^{-3}, k_4=0.9, k_5=10^{-4}$, and $b=0.02$.
(a) Using conditional logic statements, locate and identify all the stationary points of the squid-herring system.
(b) Make a phase-plane portrait that shows all the stationary points and includes some representative trajectories. Discuss possible outcomes for different ranges of initial populations.
(c) Suppose that every last squid were removed from the area occupied by the herring and from all surrounding areas. Would the herring population increase indefinitely without bound or would there be an upper limit on the number of herring per unit area? If you believe the latter would occur, what is that number?
(d) If the squid-free situation just described had persisted for many years, how many squid would there be two years later if a pair of fertile squid were introduced into the area?

Khoobchandra Agrawal
Khoobchandra Agrawal
Numerade Educator

Problem 14

Use the text recipe to investigate the other two fixed points for the Lorenz system. Identify their probable nature and generate $x$ versus $t$ as well as the phase-space trajectory for an initial condition near each fixed point.

Check back soon!

Problem 15

Use the text recipe to explore the sensitivity to initial conditions for the Lorenz system.

Check back soon!

Problem 16

Consider the Oregonator system
$$
\epsilon \dot{x}=x+y-q x^2-x y, \quad \dot{y}=-y+2 h z-x y, \quad p \dot{z}=x-z,
$$
with $\epsilon=0.03, p=2, q=0.006, h=0.75$. Show analytically that the origin is an unstable fixed point.

Check back soon!
View

Problem 17

Consider the Rössler system
$$
\dot{x}=-(y+z), \quad \dot{y}=x+a y, \quad \dot{z}=b+z(x-c),
$$
with $a, b, c>0$. Analytically show that there are no stationary points for $c<\sqrt{4 a b}$ and two fixed points for $c>\sqrt{4 a b}$. Find analytic expressions for the latter points. Linearizing the system in the vicinity of these fixed points, find the cubic equation for the roots $\lambda$. Taking $a=b=0.2$ and allowing $c$ to take on the values $c=2.4,3.5,4.0,5.0,8.0$, solve the cubic equation for the roots and determine the stability in each case.
Taking $x(0)=0.1, y(0)=0.1, z(0)=0$, show by plotting the trajectories in phase space that each $c$ value leads to a qualitatively different behavior of the solution. Identify the behavior by plotting $y(t)$.

Lainey Roebuck
Lainey Roebuck
Numerade Educator
03:13

Problem 18

For the following 3-dimensional system,
$$
\begin{aligned}
& \dot{x}=(1-z)\left[\left(4-z^2\right)\left(x^2+y^2-2 x+y\right)+4(2 x-y)-4\right], \\
& \dot{y}=(1-z)\left[\left(4-z^2\right)(x y-x-z y)+4(x+z y)-2 z\right], \\
& \dot{z}=z^2\left(4-z^2\right)\left(x^2+y^2\right),
\end{aligned}
$$
locate all of the stationary points and determine the stability of each point. Explore the nature of the fixed points and the behavior of this system by making suitable 3-dimensional $x-y$ - $z$ plots.

Leslie Deeb
Leslie Deeb
Numerade Educator
01:38

Problem 19

By also Taylor expanding $y(x+2 h)$ and $y(x-2 h)$ show that
$$
y^{\prime \prime}(x)=\frac{[-y(x+2 h)+16 y(x+h)-30 y(x)+16 y(x-h)-y(x-2 h)]}{\left(12 h^2\right)}+\mathrm{O}\left(h^4\right)
$$
is an alternative finite difference approximation to the second derivative.

Lucas Finney
Lucas Finney
Numerade Educator
01:43

Problem 20

Show that
$$
y^{\prime \prime \prime \prime}(x)=\frac{[y(x+2 h)-4 y(x+h)+6 y(x)-4 y(x-h)+y(x-2 h)]}{h^4}+\mathrm{O}\left(h^2\right)
$$
is a finite difference approximation to the fourth derivative.

Adrian Co
Adrian Co
Numerade Educator
01:36

Problem 21

By setting $\dot{x}=y$, the second-order Van der Pol (VdP) equation
$$
\ddot{x}-\epsilon\left(1-x^2\right) \dot{x}+x=0
$$
may be written as a coupled system of two first-order ODEs. Choosing $\epsilon=5$ and $x(0)=\dot{x}(0)=0.1$, solve the VdP system for $h=0.01$ and $t=0$ to 15 using the first principles Euler method. Rotate your plot to produce a phase-plane portrait solution and compare the result with what would be obtained using the dial-up Euler option of the dsolve command.

Manik Pulyani
Manik Pulyani
Numerade Educator
View

Problem 22

In his theory of white dwarf stars, Chandrasekhar [Cha39] introduced the nonlinear equation
$$
x\left(d^2 y / d x^2\right)+2(d y / d x)+x\left(y^2-C\right)^{3 / 2}=0,
$$
with the boundary conditions $y(0)=1$ and $y^{\prime}(0)=0$. Write the second-order equation as two first-order equations and solve the system using the first principle's Euler method. Take $h=0.01$ and 10-digit accuracy, and numerically compute $y(x)$ over the range $0 \leq x \leq 4$ with $C=0.1$ and plot the result. (Hint: Start at $x=0.01$ to avoid any problem at the origin.)

Andrew Eddins
Andrew Eddins
Emory University

Problem 23

May [May80] has discussed the solution of the following normalized equation describing the population of sexually mature adult baleen whales:
$$
\dot{x}(t)=-a x(t)+b x(t-T)\left(1-(x(t-T))^N\right) .
$$
Here $x(t)$ is the normalized population number at time $t, a$ and $b$ are the mortality and reproduction coefficients, $T$ is the time lag necessary to achieve sexual maturity, and $N$ is a positive parameter. If the term $1-(x(t-T))^N$ is negative, then this term is to be set equal to zero. Taking $a=1, b=2, T=2$, step size $h=0.01$, and 4000 time steps, use the first principles Euler method to solve numerically for $x(t-T)$ versus $x(t)$ and for $x(t)$ for (a) $N=3.0$, and (b) $N=3.5$. Plot your results. For (a) you should observe a period-one solution,and for (b) a period-two solution. Discuss how this interpretation can be made from your plots.

Check back soon!
04:07

Problem 24

Consider the nonlinear equation
$$
d y / d x=x y(y-2),
$$
with $y(0)=1$. Taking $h=0.02$ and 10-digit accuracy, solve for $y(x)$ out to $x=3$ using the dial-up Euler's method and plot the result.

Sriram Soundarrajan
Sriram Soundarrajan
Numerade Educator
04:21

Problem 25

If the rabbits-foxes system is written for brevity as $\dot{r}=R(r, f)$ and $\dot{f}=F(r, f)$, the modified Euler algorithm for solving the equations is
$$
r_{n+1}=r_n+\frac{h}{2}\left(R_1[n]+R_2[n]\right), \quad f_{n+1}=f_n+\frac{h}{2}\left(F_1[n]+F_2[n]\right),
$$
where
$$
\begin{aligned}
& t_{n+1}=t_n+h, \quad R_1[n] \equiv R\left(r_n, f_n\right), \quad F_1[n] \equiv F\left(r_n, f_n\right), \\
& R_2[n] \equiv R\left(r_n+h R_1[n], f_n+h F_1[n]\right), \quad F_2[n] \equiv F\left(r_n+h R_1[n], f_n+h F_1[n]\right) . \\
&
\end{aligned}
$$
Taking the same parameter values as in the text recipe, but $N$ twice as large, solve the rabbits-foxes equations using the modified Euler algorithm given above. Rotate your plot to show the $r-f$ phase plane and compare the result with that for the Euler method.

Sajay Krishnan Paruthiyil
Sajay Krishnan Paruthiyil
Numerade Educator
23:18

Problem 26

Investigate the onset of numerical instability as $h$ is increased in the modified Euler algorithm of the previous problem.

Victoria Dollar
Victoria Dollar
Numerade Educator
01:52

Problem 27

In suitably normalized units, the effect of fishing on the normalized population number $x$ of a single species of fish with a limited food supply can be described by the following nonlinear ODE,
$$
\dot{x}=x(1-x)-H x /(a+x),
$$
where $H$ is the harvesting coefficient and $a$ is a parameter. For $H=0$, the remaining ODE is known as the logistic equation. Show that this equation has an analytic solution and plot the result for $a=0.2$ and $x(0)=0.1$. Discuss the behavior of the solution.
Then, using the first-principles RK4 method with step size $h=0.1$, numerically investigate this equation as the harvesting coefficient $H$ is increased from zero. Plot your results and discuss the change in behavior as $H$ increases.

Manik Pulyani
Manik Pulyani
Numerade Educator
02:31

Problem 28

Bucky the beaver attempts to swim across a river by steadily aiming at a target point directly across the river. The river is $1 \mathrm{~km}$ wide and has a speed of 1 $\mathrm{km} / \mathrm{hr}$, while Bucky's speed is $2 \mathrm{~km} / \mathrm{hr}$. In Cartesian coordinates, Bucky is initially at $(x=1, y=0)$, while the target point is at $(0,0)$. Bucky is initially swept an infinitesimal distance downstream but recovers almost instantly to continue his swimming motion. His equations of motion are
$$
\dot{x}=-\frac{2 x}{\sqrt{x^2+y^2}}, \quad \dot{y}=1-\frac{2 y}{\sqrt{x^2+y^2}} .
$$
(a) Justify the structure of the equations.
(b) Using the first-principles RK4 method with $h=0.01$, determine how long it takes Bucky to reach the target point.
(c) Determine the analytic solution $y(x)$ for Bucky's path across the river.
(d) Plot the analytic and numerical solutions together for Bucky's path.

Narayan Hari
Narayan Hari
Numerade Educator
08:22

Problem 29

Consider the irreversible chemical reaction
$$
2 \mathrm{~K}_2 \mathrm{Cr}_2 \mathrm{O}_7+2 \mathrm{H}_2 \mathrm{O}+3 \mathrm{~S} \rightarrow 4 \mathrm{KOH}+2 \mathrm{Cr}_2 \mathrm{O}_3+3 \mathrm{SO}_2,
$$
with initially $N_1=2000$ molecules of potassium dichromate $\left(\mathrm{K}_2 \mathrm{Cr}_2 \mathrm{O}_7\right), N_2=$ 2000 molecules of water $\left(\mathrm{H}_2 \mathrm{O}\right)$, and $N_3=3000$ atoms of sulphur (S). The number $X$ of potassium hydroxide $(\mathrm{KOH})$ molecules at time $t \mathrm{~s}$ is given by the rate equation
$$
\dot{X}=k\left(2 N_1-X\right)^2\left(2 N_2-X\right)^2\left(4 N_3 / 3-X\right)^3,
$$
with $k=1.64 \times 10^{-20} \mathrm{~s}^{-1}$ and $X(0)=0$. Determine $X(t)$ by using the firstprinciples RK4 method with $h=0.001$. How many KOH molecules are present at $t=0.1 \mathrm{~s} ?$ at $t=0.2 \mathrm{~s} ?$

Crystal Wang
Crystal Wang
Numerade Educator
16:17

Problem 30

Rapoport [Rap60] has proposed the following system of model equations to describe the arms race between two nations (or two groups of nations),
$$
\begin{aligned}
& \dot{x}=-m_1 x+a_1 y+b_1 y^2, \\
& \dot{y}=-m_2 y+a_2 x+b_2 x^2,
\end{aligned}
$$
where $x$ and $y$ are the defense budgets (in suitable units of currency) of the two nations and all constants are positive. Explain the terms in the model.
Apply the semi-implicit backward Euler method to Rapoport's model, taking the nominal values $m_1=0.5, a_1=1, b_1=0.02, m_2=0.4, a_2=0.1$, $b_2=0.05, x(0)=y(0)=0.5$. Try different step sizes and plot the results in $t$ vs. $x$ vs. $y$ space. Discuss the results.

Mike Gaerlan
Mike Gaerlan
Numerade Educator

Problem 31

The Van der Pol equation,
$$
\ddot{x}-\epsilon\left(1-\dot{x}^2\right)+x=0,
$$
with $\epsilon=5.03, x(0)=0.1$, and $\dot{x}(0)=0$ was the subject of recipe 01-1-3. Choosing a suitable step size, numerically solve this ODE using the semi-implicit backward Euler method and compare with the results obtained in 01-1-3.

Check back soon!
06:44

Problem 32

Given a system of first-order nonlinear ODEs with a representative equation of the structure $\dot{x}=X(x, \ldots)$, one can create a second-order-accurate semiimplicit numerical scheme by using the backward-difference approximation for the derivative and replacing the Euler approximation $X_n$ on the rhs with the average $\left(X_n+X_{n+1}\right) / 2$.
Derive a second-order-accurate semi-implicit algorithm for the Rössler system of Section 1.2.3. Taking $a=b=0.2, c=5.0, x(0)=4.0, y(0)=z(0)=0$, and $h=0.05$, determine the behavior of the system up to $t=100$ and plot the trajectory in $x-y-z$ space. How do your results compare with those obtained with recipe $\mathbf{0 1 - 2 - 3}$ for the same parameter values?

Ryan Conley
Ryan Conley
Numerade Educator
01:37

Problem 33

A stiff ODE system is one for which there are two or more very different time or spatial scales of the independent variable. Numerical instability can occur for stiff systems solved with fixed-step explicit schemes unless the step size is taken to be shorter than (about) the shortest time scale for the system. Consider the following set of coupled linear ODEs,
$$
\dot{x}=998 x+1998 y, \quad \dot{y}=-999 x-1999 y,
$$
subject to the initial conditions $x(0)=1$ and $y(0)=0$.
(a) Analytically solve the system for $x(t)$ and $y(t)$.
(b) Determine the two characteristic times in the solutions and confirm that they are very different from each other.
(c) Using the dial-up RK4 algorithm, confirm the statement on numerical instability and the characteristic time scales.
(d) Using the backward-difference approximation for the time derivatives and the Euler approximation on the right-hand side, show that the numerical instability can be "cured." Choose a step size such that when plotted using a point style, the numerical points lie on the analytic curves for $x(t)$ and $y(t)$.

Manik Pulyani
Manik Pulyani
Numerade Educator
01:31

Problem 34

Repeat the steps of the previous problem for the forced system
$$
\dot{x}=9 x+24 y+5 \cos t-\frac{1}{3} \sin t, \quad \dot{y}=-24 x-51 y-9 \cos t+\frac{1}{3} \sin t,
$$
subject to the initial conditions $x(0)=4 / 3$ and $y(0)=2 / 3$.

Ernest Castorena
Ernest Castorena
Numerade Educator