Solutions_to_Exercises MA 282

advertisement
Exercise MA 282-1
Consider the initial value problem:
𝑡𝑦 ′ + 3𝑦 = 5𝑡 2 , 𝑦(2) = 5
a. Solve using dsolve
b. b. Plot the solution 𝑦(𝑡) on the intervals 0.5 ≤ 𝑡 ≤ 5 and 0.2 ≤ 𝑡 ≤ 20. Determine the behavior of
𝑦(𝑡) as 𝑡 approaches 0 from the right and as 𝑡 becomes large.
c. Change the initial condition to 𝑦(2) = 3 and determine the behaviour of this solution, again by
plotting on intervals such as 0.2 ≤ 𝑡 ≤ 20 and 0.5 ≤ 𝑡 ≤ 5.
Partial Solution
a. In the command window, type:
b. Plot of the solution on the interval 0.2 ≤ 𝑡 ≤ 20
c. Plot of the solution on the interval 0.2 ≤ 𝑡 ≤ 20
Exercise MA 282-2
a. Solve the initial value problem:
𝑦 ′ − 2𝑦 = 𝑠𝑖𝑛2𝑡, 𝑦(0) = 𝑐
b. Use MATLAB to graph solutions for 𝑐 = −0.5, −0.45, … , −0.05, 0 on the interval [0, 1]. Use axis
tight.
c. Use MATLAB to graph solutions for 𝑐 = −0.5, −0.45, … , −0.05, 0 on the interval [0, 2.5]
d. What happens to the solution curves as t increases?
e. What effect small changes in initial data can have on the global behavior of solutions curves?
Partial Solution
a. In the command window type:
b. Make sure you use "axis tight"
Exercise MA282-3
Consider the critical threshold model for population growth
𝑦 ′ = −(2 − 𝑦)𝑦.
a. Find the equilibrium solutions of the differential equation.
b. Draw the slop field and use it to decide which equilibrium solutions are stable and which are
unstable (𝑦(𝑡) is stable if solutions that start near 𝑦(𝑡) converge to 𝑦(𝑡)). Hint: modify
[T,Y]=meshgrid(-4:0.2:4, -4:0.2:4)until you obtain a desirable slope field.
c. What is the limiting behavior of the solution if the initial population is between 0 and 2? Greater
than 2?
d. Use dsolve to find the solutions with initial values 1.5, 0.3, and 2.1.
e. Plot the three solutions of part (d) together with the slop field on the same graph. Do the solutions
follow the slope field as you expect it to?
Partial solution
Part (b)
Part (d)
Exercise MA282-4
Consider 𝑦 ′ = (𝛼 − 1)𝑦 − 𝑦 3 .
a. Use solve to find the roots of (𝛼 − 1)𝑦 − 𝑦 3. Explain why 𝑦 = 0 is the only real root when 𝛼 ≤ 1,
and why there are three distinct roots when 𝛼 > 1.
b. For 𝛼 = −2, −1, 𝑎𝑛𝑑 2, draw a direction field for the differential equation and deduce there is only
one equilibrium solution. Is it stable?
c. Do the same for 𝛼 = 1.
d. For 𝛼 = 1.5, 2, draw the direction field . Identify the equilibrium solutions and explain their
stability.
e. Explain: "As 𝛼 increase through 1, the stable solution 𝑥 = 0 bifurcates into two stable solutions"
Exercise MA282-5
𝑡
Consider the differential equation 𝑦 ′ = 𝑦 .
a. Use ode45 to calculate and plot an approximate solution to the initial value problem: 𝑦 ′ =
𝑡
𝑦
, 𝑦(0) = 1 for 0 ≤ 𝑡 ≤ 2
b. Use dsolve to find an exact solution of the IVP
c. Plot the exact and the approximate solution on the same graph. can yo distinguish between the
two curves?
d. Plot a family of solutions with initial values 𝑦(0) = 1.2, 1.4, 1.6, 1.8 over the interval [-1, 2]
Partial Solution
a. For details, see the notes
b.
c.
Exercise MA282-6
𝑑𝑅
Consider the predator-prey system {
𝑑𝑡
𝑑𝐹
𝑑𝑡
𝑅
= 2 (1 − 3 ) 𝑅 − 𝑅𝐹
. (See Blanchard section 2.1)
= −2𝐹 + 4𝑅𝐹
a. Use solve to find all the equilibrium solutions
b. Plot the solution curve corresponding to the initial conditions 𝑅(1) = 1, 𝑎𝑛𝑑 𝐹(1) = 3.7 over the
interval 0 ≤ 𝑡 ≤ 30. For axis, use [0, 2, 0, 6].
c. Describe the fate of the prey and predator populations based on the solution curve.
d. Display graphs of the solutions 𝑅(𝑡) and 𝐹(𝑡) corresponding to the initial conditions 𝑅(1) =
1, 𝑎𝑛𝑑 𝐹(1) = 3.7 over the interval 0 ≤ 𝑡 ≤ 30. Compare with part (c).
Solution
a. There are three equilibrium solutions:
b. Make sure you solve forwards and backwards:
c. Describe the fate of the prey and predator populations based on the solution curve.
d. A loop reduces the amount of typing:
Exercise MA282-7 (Blanchard)
𝑑2 𝑥
𝑑𝑥
a. Convert the second-order differential equation 𝑑𝑡 2 + 2 𝑑𝑡 − 3𝑥 + 𝑥 3 = 0 into a first-order system
in terms of 𝑥 and 𝑣, where 𝑣 =
𝑑𝑥
𝑑𝑡
b. Find all equilibrium points
c. Use MATLAB to sketch the associated direction field. Hint: use meshgrid(-5:.4:5,5:.4:5)and axis tight
d. The following script plots several solution curves over the interval −3 ≤ 𝑡 ≤ 3
f=@(t,P) [P(2);3*P(1)-P(1)^3-2*P(2)];
a=-2:0.2:2;
b=-2:0.2:2;
for k=1:length(a)
[t,Pap]=ode45(f, [0,3],[a(k),b(k)]);
plot(Pap(:,1),Pap(:,2),'linewidth',2)
hold on
[t,Pap]=ode45(f, [0,-3],[a(k),b(k)]);
plot(Pap(:,1),Pap(:,2),'linewidth',2)
end
hold off
axis([-5,5,-5,5])
What are the initial conditions?
e. Use the above script to plot a phase portrait together with the direction field of part c.
f. Describe the behavior of the solutions?
Solution
𝑑𝑥
𝑑𝑡
a. The first-order system is {𝑑𝑣
𝑑𝑡
=𝑣
= 3𝑥 − 𝑥 3 − 2𝑣
b. We use the command solve to find the equilibrium points:
c. Be careful how to use the V
d. (𝑥(0), 𝑣(0)) = (𝑎(𝑘), 𝑏(𝑘))
e.
Exercise MA282-8
Let 𝑎 be a real number different from 0 and consider the system
𝑑𝑥
= 𝑎𝑥 + 4𝑦
𝑑𝑡
𝑑𝑦
= 𝑎𝑦
𝑑𝑡
a.
b.
c.
d.
Use MATLAB to verify that the system has a double eigenvalue 𝜆
Use MATLAB to verify that there is only one eigenvector associated with 𝜆
Write a program that calculates the general solution of the system
Verify your program by using dsolve to solve the system
Solution
Exercise MA282-9 (Blanchard Ex 19, 3.3)
Consider the initial value problem
𝑑𝑥
1
= −2𝑥 + 𝑦
𝑑𝑡
2 , 𝑥(0) = 𝑚, 𝑦(0) = 𝑛.
𝑑𝑦
= −𝑦
𝑑𝑡
1.
2.
3.
4.
5.
Draw a direction field for the system.
Determine the type of the equilibrium point at the origin.
Use dsolve to solve the IVP in terms of m and n
Find all straight-line solutions
Plot the straight-line solutions together with the solutions with initial conditions (𝑚, 𝑛) =
(2, 1), (1, −2), (−2, 2), (−2, 0)
Download