Math 308 Week 10 Solutions
Here are solutions to the even-numbered suggested problems. The answers to the oddnumbered problems are in the back of your textbook, and the solutions are in the Solution
Manual, which you can purchase from the campus bookstore.
NSS 7.7
2. y ′′ + 9y = g(t);
y(0) = 1,
y ′ (0) = 0
Answer: First, we take the Laplace transform of both sides, we get:
L{y ′′ } + 9L{y} = G
where L{g} = G. We use the property of Laplace transforms that L{f ′ } = sL{f } −
f (0).
s2 L{y} − sy(0) − y ′(0) + 9L{y} = G
This becomes:
(s2 + 9)L{y} − s = G
We solve for L{y}:
L{y} =
Thus:
y=L
−1
s2
G
s
+ 2
+9 s +9
G
2
s +9
+L
−1
s
2
s +9
1
s
= cos(3t).
From the table of Laplace transforms, we can see that L
2
s +9
3
We can use convolution to take the inverse Laplace transform of the other part:
G
1
−1
−1
−1
L
= L {G} ∗ L
s2 + 9
s2 + 9
1
sin(3t)
= g∗
3
Z
1 t
=
g(t − v) sin(3v) dv
3 0
−1
Thus, we get
1
y=
3
4. y ′′ + y = g(t);
y(0) = 0,
Z
t
g(t − v) sin(3v) dv +
0
1
cos(3t)
3
y ′(0) = 1
Answer: First, we take the Laplace transform of both sides, we get:
L{y ′′} + L{y} = G
where L{g} = G. We use the property of Laplace transforms that L{f ′ } = sL{f } −
f (0).
s2 L{y} − sy(0) − y ′ (0) + L{y} = G
This becomes:
(s2 + 1)L{y} − 1 = G
We solve for L{y}:
L{y} =
Thus:
y=L
−1
s2
G
1
+ 2
+1 s +1
G
2
s +1
+L
−1
1
2
s +1
1
= sin t. We can
From the table of Laplace transforms, we can see that L
s2 + 1
use convolution to take the inverse Laplace transform of the other part:
G
1
−1
−1
−1
L
= L {G} ∗ L
s2 + 1
s2 + 1
= g ∗ sin t
Z t
=
g(t − v) sin(v) dv
−1
0
Thus, we get
y=
Z
t
g(t − v) sin(v) dv + sin t
0
6. Use the convolution theorem to find the inverse laplace transform of the given function:
1
f (s) =
(s + 1)(s + 2)
Answer: By the convolution theorem:
1
1
1
−1
−1
−1
=L
∗L
L
(s + 1)(s + 2)
s+1
s+2
From the table of Laplace transforms, we see the following:
1
−1
L
= e−t
s+1
1
−1
= e−2t
L
s+2
Thus:
L
−1
1
(s + 1)(s + 2)
= e−t ∗ e−2t
Z t
=
e−t+v e−2v dv
Z0 t
=
e−t e−v dv
0
−t −v t
= −e e 0
= −e−t e−t + e−t
= −e−2t + e−t
Thus, the answer is:
L−1 {f } = −e−2t + e−t
8. Use the convolution theorem to find the inverse laplace transform of the given function:
1
f (t) = 2
(s + 4)2
Answer: By the convolution theorem:
1
1
1
−1
−1
−1
∗L
=L
L
(s2 + 4)2
s2 + 4
s2 + 4
From the table of Laplace transforms, we see the following:
1
1
−1
= sin(2t)
L
2
s +4
2
Thus:
L
−1
1
2
(s + 4)2
1
1
=
sin(2t) ∗
sin(2t)
2
2
Z
1 t
=
sin(2t − 2v) sin(2v) dv
4 0
1
1
sin(2t)
= − t cos(2t) +
8
16
Matlab was used to evaluate the integral. Thus, the answer is:
1
1
sin(2t)
L−1 {f } = − t cos(2t) +
8
16
10. Use the convolution theorem to find the inverse laplace transform of the given function:
1
f (t) = 3 2
s (s + 1)
Answer: By the convolution theorem:
1
1
1
−1
−1
−1
L
=L
∗L
s3 (s2 + 1)
s3
s2 + 1
From the table of Laplace transforms, we see the following:
1
1
−1
= t2
L
3
s
2
1
−1
L
= sin(t)
s2 + 1
Thus:
L
−1
1
3
2
s (s + 1)
=
=
1
2
1 2
t
2
Z t
∗ sin t
(t − v)2 sin v dv
0
1
= cos t + t2 − 1
2
Matlab was used to evaluate the integral. Thus, the answer is:
1
L−1 {f } = cos t + t2 − 1
2
NSS 5.4
2. Verify that the pair x(t), y(t) is a solution to the given system. Sketch the trajectory
of the given solution in the phase plane.
dx
= 1,
dt
x(t) = t + 1,
dy
= 3x2 ;
dt
y(t) = t3 + 3t2 + 3t
Answer: We can verify that it is a solution by taking the derivatives and plugging
into the system of differential equations:
dx
=1
dt
dy
= 3t3 + 6t + 3
y(t) = t3 + 3t2 + 3t ⇒
dt
x(t) = t + 1 ⇒
We have already verified that dx/dt = 1, we just need to show that dy/dt = 3x2 . We
can do that by computing 3x2 :
3x2 = 3(t + 1)2 = 3t2 + 6t + 3
This is equal to dy/dt, so we have verified that x(t) and y(t) are a solution to the
system of differential equations.
We can sketch this solution using the following Matlab command:
>> ezplot('t+1', 't^3+3*t^2+3*t',[0,1])
The interval [0, 1] was chosen so that the resulting graph would have a smaller range.
x = t+1, y = t3+3 t2+3 t
7
6
5
y
4
3
2
1
0
−2
−1
0
1
2
x
4. Find the critical point set for the following system:
dx
= y−1
dt
dy
= x+y+5
dt
3
4
5
Answer: The critical points are the points where dx/dt and dy/dt are both zero.
y−1 = 0
x+y+5 = 0
The solutions to these two equations are y = 1 and x = −6. Thus, there is one
critical point at the point (−6, 1)
6. Find the critical point set for the following system:
dx
= y 2 − 3y + 2
dt
dy
= (x − 1)(y − 2)
dt
Answer: The critical points are the points where dx/dt and dy/dt are both zero.
y 2 − 3y + 2 = 0
(x − 1)(y − 2) = 0
The first equation has solutions y = 1 and y = 2. The second equation has solutions
x = 1 and y = 2. Thus, the point (1, 1) is a critical point, and any point of the form
(x, 2) is a critical point.
Thus, the critical points are (1, 1) and all points on the horizontal line y = 2
8. Determine the integral curves for the given system by solving the phase plane equation.
dx
= x2 − 2y −3
dt
dy
= 3x2 − 2xy
dt
Answer: We have that
dy
3x2 − 2xy
= 2
dx
x − 2y −3
Thus:
(x2 − 2y −3 ) dy = (3x2 − 2xy) dx
Thus:
(3x2 − 2xy) dx − (x2 − 2y −3) dy = 0
This differential equation is exact, because
∂M
∂y
∂N
∂x
= −2x
= −2x
Thus:
f (x, y) =
Thus:
Z
(3x2 − 2xy) dx = x3 − x2 y + g(y)
∂f
= −x2 + g ′ (y)
∂y
So, g ′ (y) = 2y −3. Thus:
g(y) =
Z
2y −3 dy = −y −2 + C
Thus:
f (x, y) = x3 − x2 y − y −2 + C
Thus, the integral curves for the system are:
x3 − x2 y − y −2 + C = 0
16. Find all critical points for the given system. Then use a software package to sketch
the direction field in the phase plane and form this describe the stability of the critical
points.
dx
= −5x + 2y
dt
dy
= x − 4y
dt
Answer: The critical points occur when −5x + 2y = 0 and x − 4y = 0. If we solve
these two equations (either by hand or with Matlab), we get x = 0 and y = 0 as the
only solution. Thus, the point (0, 0) is the only critical point. We can use Matlab
to plot the phase plane and some solution curves:
x’=−5x+2y
y’=x−4y
3
2
y
1
0
−1
−2
−3
−3
−2
−1
0
x
1
2
3
From this we see that the critical point (0, 0) is stable , because any point nearby
(0, 0) approaches the origin.
18. Find all critical points for the given system. Then use a software package to sketch
the direction field in the phase plane and form this describe the stability of the critical
points.
dx
= x(7 − x − 2y)
dt
dy
= y(5 − x − y)
dt
Answer:The critical points are the points where dx/dt and dy/dt are both zero.
x(7 − x − 2y) = 0
y(5 − x − y) = 0
From the first equation we get that either x = 0 or x + 2y = 7. From the second
equation, we get that y = 0 or x + y = 5. Thus, if x = 0, then the second equation
gives us that y = 0 or y = 5. If x + 2y = 7, then the second equation gives us that
either y = 0 and thus x = 5, or that x+y = 5, and thus x = 3 and y = 2 (from solving
x + 2y = 7 and x + y = 5). Thus, the critical points are (0, 0), (7, 0), (0, 5), (3, 2)
(It also works to just solve the two equations using Matlab.)
We can plot the phase plane and some solutions:
x ’ = x (7 − x − 2 y)
y ’ = y (5 − x − y)
8
7
6
5
y
4
3
2
1
0
−1
−2
−2
−1
0
1
2
3
x
4
5
6
7
From the phase plane, we can determine the stability of the critical points:
(a) The critical point (0, 0) is unstable.
(b) The critical point (7, 0) is stable.
(c) The critical point (0, 5) is stable.
(d) The critical point (3, 2) is unstable.
8
Matlab 7
The planar autonomous system having the form
x′ = ax + by
y ′ = cx + dy
where a, b, c, and d are arbitrary real numbers, is called a linear system of first order
differential equations. Exercises 1 - 6 each contain a solution of some linear system. Use
MATLAB to create a plot of x versus t, y versus t, and a plot of y versus x in the phase
plane. Use the subplot command, as in
subplot(221), plot(t,x), axis tight
subplot(222), plot(t,y), axis tight
subplot(212), plot(x,y), axis equal
to produce a plot containing all three plots. Use the suggested time interval.
1. x = −2e−2t + 3e−3t
y = 4e−2t − 3e−3t
[−0.5, 2]
Answer: The important thing for these problems (Exercises 1-6) is to be able to plot
the graphs. The subplot command is nice for displaying the resulting graphs, but is
not so important (in particular, there will not be any questions on the test requiring
the subplot command).
If you are curious about the subplot and axis commands, here is some information
(otherwise, feel free to skip this paragraph). The command subplot(mnp) divides
the figure window into an m by n grid. Then, it places the plot in spot p in that m
by n grid. So commands given in the instructions, divide the figure window into a 2
by 2 grid, then place the plot of x versus t in the first square, and the plot of y versus
t in the second square. Then, the third subplot command divides the figure into a
2 by 1 grid, putting the figure in the second rectangle. The axis tight command
means that axis includes all of the t values. The axis equal command means that
the vertical tick marks are the same distance apart as the horizontal tick marks.
It works to use ezplot instead of plot. To plot x versus t, the command is
>> ezplot('-2*exp(-2*t)+3*exp(-3*t)',[-0.5, 2])
To plot y versus t the command is
>>
ezplot('4*exp(-2*t)-3*exp(-3*t)',[-0.5, 2])
To plot the parametric equation (y versus x), the command is
>> ezplot('-2*exp(-2*t)+3*exp(-3*t)', '4*exp(-2*t)-3*exp(-3*t)', [-0.5, 2])
We can enter all of this along with the subplot command:
>>
>>
>>
>>
>>
>>
>>
>>
>>
subplot(221)
ezplot('-2*exp(-2*t)+3*exp(-3*t)',[-0.5, 2])
axis tight
subplot(222)
ezplot('4*exp(-2*t)-3*exp(-3*t)',[-0.5, 2])
axis tight
subplot(212)
ezplot('-2*exp(-2*t)+3*exp(-3*t)', '4*exp(-2*t)-3*exp(-3*t)',[-0.5, 2])
axis equal
Here are the resulting graphs:
4 exp(−2 t)−3 exp(−3 t)
1
6
0
4
y
x
−2 exp(−2 t)+3 exp(−3 t)
8
−1
2
−2
0
−0.5
0
0.5
1
1.5
−0.5
0
0.5
1
t
t
x = −2 exp(−2 t)+3 exp(−3 t), y = 4 exp(−2 t)−3 exp(−3 t)
1.5
1
y
0
−1
−2
−1
0
1
2
3
4
x
5
6
2. x = −4e2t + 3e3t
y = −2e2t + 3e3t
[−2, 0.5]
Answer: To plot x versus t, the command is
>> ezplot('-4*exp(2*t)+3*exp(3*t)',[-2, 0.5])
To plot y versus t the command is
7
8
9
ezplot('-2*exp(2*t)+3*exp(3*t)',[-2, 0.5])
>>
To plot the parametric equation (y versus x), the command is
>> ezplot('-4*exp(2*t)+3*exp(3*t)', '-2*exp(2*t)+3*exp(3*t)', [-2, 0.5])
Here are the resulting plots:
−4 exp(2 t)+3 exp(3 t)
−2 exp(2 t)+3 exp(3 t)
2
6
y
x
1
0
−1
−2
4
2
−1.5
−1
−0.5
0
−2
0
−1.5 −1 −0.5
t
t
x = −4 exp(2 t)+3 exp(3 t), y = −2 exp(2 t)+3 exp(3 t)
0
8
y
6
4
2
0
−10
−5
0
5
10
x
3. x = −2e−2t − e3t
y = e−2t + e3t
[−1.5, 1.0]
Answer: To plot x versus t, the command is
>> ezplot('-2*exp(-2*t)-exp(3*t)',[-1.5, 1.0])
To plot y versus t the command is
>>
ezplot('exp(-2*t)+exp(3*t)',[-1.5, 1.0])
To plot the parametric equation (y versus x), the command is
>> ezplot('-2*exp(-2*t)-exp(3*t)', 'exp(-2*t)+exp(3*t)', [-1.5, 1.0])
Here are the resulting plots:
exp(−2 t)+exp(3 t)
−2 exp(−2 t)−exp(3 t)
20
−10
−20
y
x
15
10
−30
5
−40
−1.5
−1
−0.5
0
0.5
−1.5 −1 −0.5
0
t
t
x = −2 exp(−2 t)−exp(3 t), y = exp(−2 t)+exp(3 t)
0.5
20
y
15
10
5
−50
−40
−30
−20
x
−10
0
4. x = cos(2t) − 3 sin(2t)
y = 2 sin(2t) + cos(2t)
[−2π, 4π]
Answer: To plot x versus t, the command is
>> ezplot('cos(2*t)-3*sin(2*t)',[-2*pi, 4*pi])
To plot y versus t the command is
>>
ezplot('2*sin(2*t)+cos(2*t)',[-2*pi, 4*pi])
To plot the parametric equation (y versus x), the command is
>> ezplot('cos(2*t)-3*sin(2*t)', '2*sin(2*t)+cos(2*t)', [-2*pi, 4*pi])
Here are the resulting plots:
cos(2 t)−3 sin(2 t)
2 sin(2 t)+cos(2 t)
2
2
0
y
x
1
0
−1
−2
−2
−5
0
5
10
−5
0
5
t
10
t
x = cos(2 t)−3 sin(2 t), y = 2 sin(2 t)+cos(2 t)
2
y
1
0
−1
−2
−6
−4
−2
0
x
2
4
6
5. x = et (cos t + 5 sin t)
y = et (−8 sin t + cos t)
[−π, π/2]
Answer: To plot x versus t, the command is
>> ezplot('exp(t)*(cos(t)+5*sin(t))',[-pi, pi/2])
To plot y versus t the command is
>>
ezplot('exp(t)*(-8*sin(t)+cos(t))',[-pi, pi/2])
To plot the parametric equation (y versus x), the command is
>> ezplot('exp(t)*(cos(t)+5*sin(t))', 'exp(t)*(-8*sin(t)+cos(t))', [-pi, pi/2])
Here are the resulting plots:
exp(t) (cos(t)+5 sin(t))
exp(t) (−8 sin(t)+cos(t))
0
20
−10
y
x
15
10
−20
5
0
−3
−30
−2
−1
0
1
−3
−2
−1
0
t
t
x = exp(t) (cos(t)+5 sin(t)), y = exp(t) (−8 sin(t)+cos(t))
1
0
y
−10
−20
−30
−40
−20
0
20
40
60
x
6. x = e−t (cos t + sin t)
y = e−t (cos t − sin t)
[−π, π]
Answer: To plot x versus t, the command is
>> ezplot('exp(-t)*(cos(t)+sin(t))',[-pi, pi])
To plot y versus t the command is
>>
ezplot('exp(-t)*(cos(t)-sin(t))',[-pi, pi])
To plot the parametric equation (y versus x), the command is
>> ezplot('exp(-t)*(cos(t)+sin(t))', 'exp(-t)*(cos(t)-sin(t))', [-pi, pi])
Here are the resulting plots:
exp(−t) (cos(t)+sin(t))
exp(−t) (cos(t)−sin(t))
0
0
−5
y
x
−5
−10
−15
−10
−15
−20
−20
−2
0
2
−2
0
t
t
x = exp(−t) (cos(t)+5 sin(t)), y = exp(−t) (cos(t)−sin(t))
2
0
y
−5
−10
−15
−20
−60
−50
−40
−30
−20
x
−10
0
10
20
For Exercises 7-12, select Gallery → linear system in the PPLANE6 Setup window.
Adjust the parameters to match the indicated linear system. Accept all other default
settings in the PPLANE6 Setup window. Select Solutions → Keyboard input in the
PPLANE6 Display window to start a solution trajectory with the given initial condition.
Finally, select Graph → Both and click your solution trajectory to obtain plots of x and
y versus t. For Exercise n compare your output to Exercise n − 6 above.
7. x′ = −4x − y
y ′ = 2x − y
x(0) = 1, y(0) = 1
Answer: The phase plane for this system with the solution through (1, 1) marked
is:
A=−4 B=−1
C=2
D=−1
x’=Ax+By
y’=Cx+Dy
5
4
3
2
y
1
0
−1
−2
−3
−4
−5
−5
−4
−3
−2
−1
0
x
1
2
3
4
5
The plot of x and y versus t for the marked solution is:
A=−4
C=2
x’=Ax+By
y’=Cx+Dy
B=−1
D=−1
x
y
20
15
x and y
10
5
0
−5
−10
−0.5
0
0.5
1
1.5
t
2
2.5
3
3.5
If you look back at the solution to Exercise 1, you will see that the solution indicated
in the phase plane looks like the parametric plot in Exercise 1, and the plots of x and
y versus t look like the plots for x and y versus t in Exercise 1 (they are in fact the
same, as the equations in Exercise 1 are a solution to the system in Exercise 7 with
the given initial conditions.)
8. x′ = x + 2y
y ′ = −x + 4y
x(0) = −1, y(0) = 1
Answer: The phase plane for this system with the solution through (−1, 1) marked
is:
A=1
B=2
C=−1 D=4
x’=Ax+By
y’=Cx+Dy
5
4
3
2
y
1
0
−1
−2
−3
−4
−5
−5
−4
−3
−2
−1
0
x
1
2
3
4
5
The plot of x and y versus t for the marked solution is:
A=1
C=−1
x’=Ax+By
y’=Cx+Dy
B=2
D=4
x
y
20
x and y
15
10
5
0
−3.5
−3
−2.5
−2
−1.5
t
−1
−0.5
0
0.5
If you look back at the solution to Exercise 2, you will see that the solution indicated
in the phase plane looks like the parametric plot in Exercise 2, and the plots of x and
y versus t look like the plots for x and y versus t in Exercise 2 (they are in fact the
same, as the equations in Exercise 2 are a solution to the system in Exercise 8 with
the given initial conditions.)
9. x′ = −7x − 10y
y ′ = 5x + 8y
x(0) = −3, y(0) = 2
Answer: The phase plane for this system with the solution through (−3, 2) marked
is:
A = − 7 B = − 10
C=5
D=8
x’=Ax+By
y’=Cx+Dy
5
4
3
2
y
1
0
−1
−2
−3
−4
−5
−5
−4
−3
−2
−1
0
x
1
2
3
4
5
The plot of x and y versus t for the marked solution is:
A=−7
C=5
x’=Ax+By
y’=Cx+Dy
B = − 10
D=8
30
x
y
20
x and y
10
0
−10
−20
−30
−1
−0.5
0
t
0.5
1
If you look back at the solution to Exercise 3, you will see that the solution indicated
in the phase plane looks like the parametric plot in Exercise 3, and the plots of x and
y versus t look like the plots for x and y versus t in Exercise 3 (they are in fact the
same, as the equations in Exercise 3 are a solution to the system in Exercise 9 with
the given initial conditions.)
10. x′ = −2x − 4y
y ′ = 2x + 2y
x(0) = 1, y(0) = 1
Answer: The phase plane for this system with the solution through (1, 1) marked
is:
A=−2 B=−4
C=2
D=2
x’=Ax+By
y’=Cx+Dy
5
4
3
2
y
1
0
−1
−2
−3
−4
−5
−5
−4
−3
−2
−1
0
x
1
2
3
4
5
The plot of x and y versus t for the marked solution is:
A=−2
C=2
x’=Ax+By
y’=Cx+Dy
B=−4
D=2
x
y
3
2
x and y
1
0
−1
−2
−3
−10
−5
0
5
t
If you look back at the solution to Exercise 4, you will see that the solution indicated
in the phase plane looks like the parametric plot in Exercise 4, and the plots of x and
y versus t look like the plots for x and y versus t in Exercise 4 (they are in fact the
same, as the equations in Exercise 4 are a solution to the system in Exercise 10 with
the given initial conditions.)
11. x′ = 4x + 2y
y ′ = −5x − 2y
x(0) = 1, y(0) = 1
Answer: The phase plane for this system with the solution through (1, 1) marked
is:
A=4
B=2
C=−5 D=−2
x’=Ax+By
y’=Cx+Dy
5
4
3
2
y
1
0
−1
−2
−3
−4
−5
−5
−4
−3
−2
−1
0
x
1
2
3
4
5
The plot of x and y versus t for the marked solution is:
A=4
B=2
C=−5 D=−2
x’=Ax+By
y’=Cx+Dy
20
x
y
15
10
x and y
5
0
−5
−10
−15
−20
−25
−30
−6
−5
−4
−3
−2
−1
0
1
t
If you look back at the solution to Exercise 5, you will see that the solution indicated
in the phase plane looks like the parametric plot in Exercise 5, and the plots of x and
y versus t look like the plots for x and y versus t in Exercise 5 (they are in fact the
same, as the equations in Exercise 5 are a solution to the system in Exercise 11 with
the given initial conditions.)
12. x′ = −x + y
y ′ = −x − y
x(0) = 1, y(0) = 1
Answer: The phase plane for this system with the solution through (1, 1) marked
is:
A=−1 B=1
C=−1 D=−1
x’=Ax+By
y’=Cx+Dy
5
4
3
2
y
1
0
−1
−2
−3
−4
−5
−5
−4
−3
−2
−1
0
x
1
2
3
4
5
The plot of x and y versus t for the marked solution is:
A=−1 B=1
C=−1 D=−1
x’=Ax+By
y’=Cx+Dy
5
x
y
x and y
0
−5
−10
−15
−2
−1
0
1
2
t
3
4
5
6
If you look back at the solution to Exercise 6, you will see that the solution indicated
in the phase plane looks like the parametric plot in Exercise 6, and the plots of x and
y versus t look like the plots for x and y versus t in Exercise 6 (they are in fact the
same, as the equations in Exercise 6 are a solution to the system in Exercise 12 with
the given initial conditions.)
13. In the predator-prey system
L′ = −L + LP
P ′ = P − LP
L represents a lady bug population and P represents a pest that lady bugs like to
eat. Enter the system in the PPLANE6 Setup window, set the display window so
that 0 ≤ L ≤ 2 and 0 ≤ P ≤ 3, then select Arrows for the direction field.
(a) Use the Keyboard input window to start a solution trajectory with initial condition (0.5, 1.0). Note that the lady bug-pest population is periodic. As the lady
bug population grows, their food supply dwindles and the lady bug population
begins to decay. Of course, this gives the pest population time to flourish, and
the resulting increase in the food supply means that the lady bug population
begins to grow. Pretty soon, the populations come full cycle to their initial
starting position.
(b) Suppose that the pest population is harmful to a farmer’s crop and he decides
to use a poison spray to reduce the pest population. Of course, this will also kill
the lady bugs. Question: Is this a wise idea? Adjust the system as follows:
L′ = −L + LP − HL
P ′ = P − LP − HP
Note that this model assumes that the growth rate of each population is reduced
by a fixed percentage of the population. Enter this system in the PPLANE6
Setup window, but keep the original display window settings. Create and set a
parameter H = 0.2. Start a solution trajectory with initial conditions (0.5, 1.0).
(c) Repeat part (b) with H = 0.4, 0.6, and 0.8. Is this an effective way to control
the pests? Why? Describe what happens to each population for each value of
the parameter H.
Answer:
(a) Here is the phase plane showing the solution through the point (0.5, 1.0):
L’=−L+LP
P’=P−LP
3
2.5
P
2
1.5
1
0.5
0
0
0.2
0.4
0.6
0.8
1
L
1.2
1.4
1.6
1.8
2
We see that the lady bug population (the horizontal axis) ranges from approximately 0.5 to 1.75 and the pest population (the vertical axis) ranges from approximately 0.5 to 1.75 (presumably these numbers are in thousands or millions).
(b) Here is the phase plane with H = 0.2 and showing the solution through the
point (0.5, 1.0):
H = 0.2
L’=−L+LP−HL
P’=P−LP−HP
3
2.5
P
2
1.5
1
0.5
0
0
0.2
0.4
0.6
0.8
1
L
1.2
1.4
1.6
1.8
2
In this situation, the pest and lady bug populations are again periodic. Here
the lady bug population ranges from approximately 0.47 to 1.25, and the pest
population ranges from approximately .75 to 1.75 (these figures are very approximate).
We see that the pest population has not decreased. In fact, at some times the
pest population has increased.
(c) Here is the phase plane with H = 0.4:
H = 0.4
L’=−L+LP−HL
P’=P−LP−HP
3
2.5
P
2
1.5
1
0.5
0
0
0.2
0.4
0.6
0.8
1
L
1.2
1.4
1.6
1.8
2
The pest and lady bug populations are periodic. The lady bug population
ranges from approximately 0.3 to 0.9, and the pest population ranges from
approximately 1 to 1.9.
The pest population has actually increased. They lady bug population has
decreased.
Here is the phase plane with H = 0.6:
H = 0.6
L’=−L+LP−HL
P’=P−LP−HP
3
2.5
P
2
1.5
1
0.5
0
0
0.2
0.4
0.6
0.8
1
L
1.2
1.4
1.6
1.8
2
The pest and lady bug populations are periodic. The lady bug population
ranges from approximately 0.14 to 0.9, and the pest population ranges from
approximately 1 to 2.4.
The pest population has actually increased. They lady bug population has
decreased.
Here is the phase plane with H = 0.8:
H = 0.8
L’=−L+LP−HL
P’=P−LP−HP
3
2.5
P
2
1.5
1
0.5
0
0
0.2
0.4
0.6
0.8
1
L
1.2
1.4
1.6
1.8
2
The pest and lady bug populations are periodic. The lady bug population
ranges from approximately 0.2 to 0.9, and the pest population ranges from
approximately 0.9 to 3.1.
We see that the poison spray did not effectively reduce the pest population,
because it also killed lady bugs. Fewer lady bugs allowed the pest population to
increase, since the lady bugs eat the pests.
Matlab 10
21. Use the technique of Examples 1 and 2 to verify that
x = e−t (cos 2t − sin 2t)
y = e−t (3 sin 2t − cos 2t)
is a solution to the system
x′ = −5x − 2y
y ′ = 10x + 3y
Furthermore, use the subs command to verify that the solution satisfies the initial
conditions x(0) = 1 and y(0) = −1.
Answer: First, we tell Matlab that x = e−t (cos 2t − sin 2t) and y = e−t (3 sin 2t −
cos 2t).
>> syms x y t
>> x = exp(-t)*(cos(2*t) - sin(2*t))
>> y = exp(-t)*(3*sin(2*t) - cos(2*t))
Next, we check that x and y satisfy the first equation x′ = −5x − 2y, which is
equivalent to x′ + 5x + 2y = 0.
>> diff(x) + 5*x + 2*y
>> simple(ans)
Matlab returns 0, so x and y do satisfy the first equation. Now, we check that x and
y satisfy the second equation y ′ = 10x + 3y, which is equivalent to y ′ − 10x − 3y = 0.
>> diff(y) - 10*x - 3*y
>> simple(ans)
Matlab returns 0, so the given x and y are a solution to the system of differential
equations.
Now, we check that x and y satisfy the initial conditions x(0) = 1 and y(0) = −1.
To check that x(0) = 1, we enter:
>> subs(x, t, 0)
Matlab returns 1, so the equation does satisfy x(0) = 1. Note that the t did not need
to be in quotes because we had defined it to be a symbolic variable previously (syms
x y t). To check that y(0) = −1, we enter:
>> subs(y, t, 0)
Matlab returns −1, so the equation does satisfy y(0) = −1.
22. Use dsolve to solve the initial value problem
y′ = v
v ′ = −2v − 2y + cos 2t
with y(0) = 1 and v(0) = −1, over the time interval [0, 30].
Answer: We ask Matlab to solve the system:
>> sol = dsolve('Dy=v', 'Dv=-2*v-2*y+cos(2*t)', 'y(0)=1', 'v(0)=-1', 't')
>> sol.y
>> sol.v
We get the following:
y = −
3 −t
11
1
1
e sin t + e−t cos t + sin(2t) −
cos(2t)
10
10
5
10
4
7
2
1
v = − e−t sin t − e−t cos t + cos(2t) + sin(2t)
5
5
5
5
© Copyright 2026 Paperzz