21
Math 211 Homework #9 March 16, 2001 8.3.3. x = x y x 3 y = x (i) Plot the nullclines for each equation in the given system of differential equa- tions. Use different colors for the x -nullcline and the y -nullcline. (ii) Calculate the coordinates of the equilibrium points. Plot each equilibrium point in your sketch from part (i) and label it with its coordinates. Answer: Set the right hand side of x = x y x 3 equal to zero. x y x 3 = 0 y = x x 3 Thus, y = x x 3 is the x -nullcline. It appears in a solid line style in the figure. Set the right hand side of y = x equal to zero. x = 0 Thus, x = 0 is the y -nullcline. It appears in a dashed line style in the figure. -3 -2 -1 0 1 2 3 -3 -2 -1 0 1 2 3 x y The equilibrium point appears where the x -nullcline intersects the y -nullcline. This is easily seen to be (0, 0).

Math 211 Homework #9polking/homework/hw09.pdf · Math 211 Homework #9 March 16, 2001 8.3.3. x = x −y −x3 y = x (i) Plot the nullclines for each equation in the given system of

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Math 211 Homework #9polking/homework/hw09.pdf · Math 211 Homework #9 March 16, 2001 8.3.3. x = x −y −x3 y = x (i) Plot the nullclines for each equation in the given system of

Math 211

Homework #9

March 16, 2001

8.3.3. x ′ = x − y − x3

y ′ = x

(i) Plot the nullclines for each equation in the given system of differential equa-tions. Use different colors for the x-nullcline and the y-nullcline.

(ii) Calculate the coordinates of the equilibrium points. Plot each equilibriumpoint in your sketch from part (i) and label it with its coordinates.

Answer: Set the right hand side of x ′ = x − y − x3 equal to zero.

x − y − x3 = 0

y = x − x3

Thus, y = x − x3 is the x-nullcline. It appears in a solid line style in the figure. Setthe right hand side of y ′ = x equal to zero.

x = 0

Thus, x = 0 is the y-nullcline. It appears in a dashed line style in the figure.

−3 −2 −1 0 1 2 3

−3

−2

−1

0

1

2

3

x

y

The equilibrium point appears where the x-nullcline intersects the y-nullcline.This is easily seen to be (0, 0).

Page 2: Math 211 Homework #9polking/homework/hw09.pdf · Math 211 Homework #9 March 16, 2001 8.3.3. x = x −y −x3 y = x (i) Plot the nullclines for each equation in the given system of

8.3.4. x ′ = 2x − y

y ′ = −4x + 2y

Answer: The x-nullcline is the line defined by 2x − y = 0. It is shown below as thesolid line. The y-nullcine is the line defined by −4x + 2y = 0. It is the dashed linein the following figure.

−4 −2 0 2 4

−4

−2

0

2

4

x

y

8.3.7. Consider the systemx ′ = 1 − (y − sin x) cos x

y ′ = cos x − y + sin x

(a) Show that x(t) = t , y(t) = sin t is a solution.

Answer: If x(t) = t and y(t) = sin t , then

x ′ = (t)′ = 1,

and1 − (y − sin x) cos x = 1 − (sin t − sin t) cos t = 1,

so the first equation is satisfied. Further,

y ′ = (sin t)′ = cos t,

andcos x − y + sin x = cos t − sin t + sin t = cos t,

so the second equation is satisfied.

(b) Plot the solution found in part (i) in the phase-plane.

Answer: See the figure in part (c).

(c) Consider the solution to the system with the initial conditions x(0) = π/2 andy(0) = 0. Show that y(t) < sin x(t) for all t .

Answer: Because of uniqueness, the solution with initial condition x(0) = π/2,y(0) = 0, cannot cross the solution x = t , y = sin t found in part (a). Thus, it mustremain below the solution in part (a) for all time. Therefore, if (x(t), y(t)) denotesthe second solution, we must have y(t) < sin x(t) for all time, as shown in the figure.

Page 3: Math 211 Homework #9polking/homework/hw09.pdf · Math 211 Homework #9 March 16, 2001 8.3.3. x = x −y −x3 y = x (i) Plot the nullclines for each equation in the given system of

0 2 4 6 8 10 12

−1

−0.8

−0.6

−0.4

−0.2

0

0.2

0.4

0.6

0.8

(π/2,0)

(x(t),y(t))

(x(t),sin x(t))

8.3.10. Consider the systemx ′ = y − x(x2 + y2 − 1)

y ′ = −x − y(x2 + y2 − 1)

(a) Show that x(t) = sin t , y(t) = cos t is a solution.

Answer: Notice that if x(t) = sin t and y(t) = cos t , then x2 + y2 = 1. Thereforewe have

x ′ = cos t and

y − x(x2 + y2 − 1) = y = cos t.

Nexty ′ = − sin t and

−x − y(x2 + y2 − 1) = −x = − sin t.

(b) Plot the solution found in part (a) in the phase-plane.

Answer: The solution curve in part (a) is the unit circle and is plotted below.

−1 1

−1

1

x

y

Page 4: Math 211 Homework #9polking/homework/hw09.pdf · Math 211 Homework #9 March 16, 2001 8.3.3. x = x −y −x3 y = x (i) Plot the nullclines for each equation in the given system of

(c) Consider the solution to the system with the initial conditions x(0) = 0.5 and y(0) =0. Show that x2(t) + y2(t) < 1 for all t .

Answer: The point (x(0), y(0)) = (0.5, 0) is inside the unit circle, which is thesolution curve from part (a). By the uniqueness theorem the solution curve startingat (0.5, 0) cannot cross the unit circle. It must therefore stay inside the unit circle forall time. Hence x2(t) + y2(t) < 1 for all t .

8.4.3. Place the differential systemx ′

1 = −2x1 + x22

x ′2 = 3x1 − x2

in the form x′ = A(t)x + f(t) if possible. If it is not possible, explain why.

Answer: The systemx ′

1 = −2x1 + x22

x ′2 = 3x1 − x2

is nonlinear. Note the term x22 . It cannot be written in the form x′ = A(t)x + f(t).

8.4.4. Place the differential system

x ′1 = −2x1 + 3tx2 + cos t

tx ′2 = x1 − 4tx2 + sin t

in the form x′ = A(t)x + f(t) if possible. If it is not possible, explain why.

Answer: We can writex ′

1 = −2x1 + 3tx2 + cos t

x ′2 = 1

tx1 − 4x2 + sin t

t.

If we set

x(t) =(

x1(t)

x2(t)

), A =

(−2 3t

1/t −4

), and f(t) =

(cos t

(sin t)/t

),

the system is x′ = A(t)x + f(t).

8.4.7. Which of the systems in Exercises 1–6 are linear? Which are linear and homogeneous?

Answer: Exercises 1, 2, 4, and 6 are linear; 3 and 5 are nonlinear. Of the linearsystems, only 1 and 2 are homogeneous.

8.4.11. Rewrite the systemx ′

1 = −x2

x ′2 = x1

using matrix notation.

Answer: The system can be written(x1

x2

)′=(

0 −11 0

)(x1

x2

).

Page 5: Math 211 Homework #9polking/homework/hw09.pdf · Math 211 Homework #9 March 16, 2001 8.3.3. x = x −y −x3 y = x (i) Plot the nullclines for each equation in the given system of

8.4.13. Rewrite the systemx ′

1 = −x2 + sin t

x ′2 = x1

using matrix notation.

Answer: The system can be written(x1

x2

)′=(

0 −11 0

)(x1

x2

)+(

sin t

0

).

8.4.17. Show that

x1(t) =(

cos t

sin t

)and x2(t) =

(sin t

− cos t

)are solutions to the system in Exercise11. Verify that any linear combination is alsoa solution.

Answer: We saw that the system in Exercise 11 can be written

x′ =(

0 −11 0

)x.

If x1(t) = (cos t, sin t)T , then

x′1(t) =

(cos t

sin t

)′=(− sin t

cos t

).

But,

Ax1(t) =(

0 −11 0

)(cos t

sin t

)=(− sin t

cos t

),

so x1 is a solution of the system in Exercise 11. Next, if x2(t) = (sin t, − cos t)T ,then

x′2(t) =

(sin t

− cos t

)′=(

cos t

sin t

),

and

Ax2(t) =(

0 −11 0

)(sin t

− cos t

)=(

cos t

sin t

).

Thus, x2 is a solution of the system in Exercise 11. Now,

C1x1(t) + C2x2(t) =(

C1 cos t + C2 sin t

C1 sin t − C2 cos t

),

and

(C1x1(t) + C2x2(t))′ =

(−C1 sin t + C2 cos t

C1 cos t + C2 sin t

).

But,

A(C1x1(t) + C2x2(t)) =(

0 −11 0

)(C1 cos t + C2 sin t

C1 sin t − C2 cos t

)

=(−C1 sin t + C2 cos t

C1 cos t + C2 sin t

)so C1x1(t) + C2x2(t) is a solution of the system in Exercise 11.

Page 6: Math 211 Homework #9polking/homework/hw09.pdf · Math 211 Homework #9 March 16, 2001 8.3.3. x = x −y −x3 y = x (i) Plot the nullclines for each equation in the given system of

8.4.19. Show that

xp(t) = 1

2

(t sin t − cos t

−t cos t

)is a solution to the system in Exercise 13. Show that any function of the formx(t) = xp(t)+C1x1(t)+C2x2(t) is also a solution, where x1 and x2 are the functionsdefined in Exercise 17.

Answer: We saw in Exercise 17 that the system can be written

x′ =(

0 −11 0

)x +

(sin t

0

).

If xp(t) = (1/2)(t sin t − cos t, −t cos t)T , then

x′p(t) = 1

2

(t sin t − cos t

−t cos t

)′

= 1

2

(t cos t + 2 sin t

t sin t − cos t

).

But, (0 −11 0

)xp +

(sin t

0

)= 1

2

(0 −11 0

)(t sin t − cos t

−t cos t

)+(

sin t

0

)

= 1

2

(t cos t + 2 sin t

t sin t − cos t

).

Therefore, xp is a solution of the system in Exercise 17. Next, if x(t) = xp(t) +C1x1(t) + C2x2(t), then

x(t) =(

(1/2)t sin t − (1/2) cos t + C1 cos t + C2 sin t

−(1/2)t cos t + C1 sin t − C2 cos t

)and

x′ =(

sin t + (1/2)t cos t − C1 sin t + C2 cos t

(1/2)t sin t − (1/2) cos t + C1 cos t + C2 sin t

).

But,(0 −11 0

)x +

(sin t

0

)

=(

0 −11 0

)((1/2)t sin t − (1/2) cos t + C1 cos t + C2 sin t

−(1/2)t cos t + C1 sin t − C2 cos t

)+(

sin t

0

)

=(

sin t + (1/2)t cos t − C1 sin t + C2 cos t

(1/2)t sin t − (1/2) cos t + C1 cos t + C2 sin t

).

Thus, x is a solution of the system in Exercise 17.

8.4.23. In Exercise 17 you found solutions x1 and x2 to the system in Exercise 11. Showthat these solutions are linearly independent. Find the solution x(t) to the system inExercise 11 that satisfies the initial condition x(0) = (3, 2)T .

Answer: In Exercise 17, we saw that

x1(t) =(

cos t

sin t

)and x2(t) =

(sin t

− cos t

)

Page 7: Math 211 Homework #9polking/homework/hw09.pdf · Math 211 Homework #9 March 16, 2001 8.3.3. x = x −y −x3 y = x (i) Plot the nullclines for each equation in the given system of

were solutions of

x′ =(

0 −11 0

)x.

If we evaluate the solutions at t = 0, then

x1(0) =(

10

)and x2(0) =

(0

−1

).

Because

det([x1(0), x2(0)]) = det

(1 00 −1

)= −1 �= 0,

the vectors are independent and form a fundamental solution set for the system.Hence, the general solution of the system is

x(t) = C1

(cos t

sin t

)+ C2

(sin t

− cos t

).

To find the solution with initial condition x(0) = (3, 2)T , substitute t = 0 in thegeneral solution to get (

32

)= C1

(10

)+ C2

(0

−1

)(

32

)=(

1 00 −1

)(C1

C2

).

This system has solutions C1 = 3 and C2 = −2. Thus, the solution is

x(t) = 3

(cos t

sin t

)− 2

(sin t

− cos t

)

x(t) =(

3 cos t − 2 sin t

3 sin t + 2 cos t

).

8.4.31. Verify by direct substitution that

y1(t) =(

e−2t

0

)and y2(t) =

(e−4t

e−4t

)are solutions of the homogeneous equation

y′ =(−2 −2

0 −4

)y.

Show also that the solutions y1(t) and y2(t) are linearly independent. Find the solution

of the given homogeneous equation with the initial condition y(0) = y0 =(

31

).

Answer: If y1(t) = (e−2t , 0)T , then

y′1 =

(e−2t

0

)′=(−2e−2t

0

),

and (−2 −20 −4

)y1 =

(−2 −20 −4

)(e−2t

0

)=(−2e−2t

0

).

Page 8: Math 211 Homework #9polking/homework/hw09.pdf · Math 211 Homework #9 March 16, 2001 8.3.3. x = x −y −x3 y = x (i) Plot the nullclines for each equation in the given system of

Therefore, y1 is a solution. If y2(t) = (e−4t , e−4t )T , then

y′2 =

(e−4t

e−4t

)′=(−4e−4t

−4e−4t

),

and (−2 −20 −4

)y2 =

(−2 −20 −4

)(e−4t

e−4t

)=(−4e−4t

−4e−4t

).

Therefore, y2 is a solution. Further, evaluating each solution at t = 0,

y1(0) =(

10

)and y2(0) =

(11

).

These vectors are clearly independent (y1 is not a multiple of y2), so the solutions y1

and y2 are independent for all t and form a fundamental set of solutions. Thus, thegeneral solution is

y = C1

(e−2t

0

)+ C2

(e−4t

e−4t

).

Substitute the initial condition y(0) = (3, 1)T .(31

)= C1

(10

)+ C2

(11

)(

31

)=(

1 10 1

)(C1

C2

)This system has solution C1 = 2 and C2 = 1, so the final solution is

y(t) = 2

(e−2t

0

)+(

e−4t

e−4t

)=(

2e−2t + e−4t

e−4t

).

8.4.33. Verify by direct substitution that

y1(t) =(

12 cos t − 1

2 sin t

cos t

)and y2(t) =

(12 sin t + 1

2 cos t

sin t

)are solutions of the homogeneous equation

y′ =(−2 −2

0 −4

)y.

Show also that the solutions y1 and y2 are linearly independent. Find the solution of

the given homogeneous equation with the initial condition y(0) = y0 =(

31

).

Answer: If y1(t) = ((1/2) cos t − (1/2) sin t, cos t)T , then

y′1 =

((1/2) cos t − (1/2) sin t

cos t

)′=(−(1/2) sin t − (1/2) cos t

− sin t

),

and (1 −12 −1

)y1 =

(1 −12 −1

)((1/2) cos t − (1/2) sin t

cos t

)

=(−(1/2) sin t − (1/2) cos t

− sin t

).

Page 9: Math 211 Homework #9polking/homework/hw09.pdf · Math 211 Homework #9 March 16, 2001 8.3.3. x = x −y −x3 y = x (i) Plot the nullclines for each equation in the given system of

Therefore, y1 is a solution. If y2((1/2) sin t + (1/2) cos t, sin t)T , then

y′2 =

((1/2) sin t + (1/2) cos t

sin t

)′=(

(1/2) cos t − (1/2) sin t

cos t

),

and (1 −12 −1

)y2 =

(1 −12 −1

)((1/2) sin t + (1/2) cos t

sin t

)

=(

(1/2) cos t − (1/2) sin t

cos t

).

Therefore, y2 is a solution. Further, evaluating each solution at t = 0,

y1(0) =(

1/21

)and y2(0) =

(1/20

).

These vectors are clearly independent (y1 is not a multiple of y2), so the solutions y1

and y2 are independent for all t and form a fundamental set of solutions. Thus, thegeneral solution is

y(t) = C1

((1/2) cos t − (1/2) sin t

cos t

)+ C2

((1/2) sin t + (1/2) cos t

sin t

).

Substitute the initial condition y(0) = (1, 0)T .(10

)= C1

(1/21

)+ C2

(1/20

)(

10

)=(

1/2 1/21 0

)(C1

C2

)This system has solution C1 = 0 and C2 = 2, so the final solution is

y(t) = 2

(((1/2) sin t + (1/2) cos t

sin t

)=(

sin t + cos t

2 sin t

).

8.4.34. Two tanks each hold 3 liters of salt water and are connected by two pipes (see thefigure below). The salt water in each tank is kept well stirred. Pure water flows intotank A at the rate of 5 liters per minute and the salt water mixture exits tank B at thesame rate. Salt water flows from tank A to tank B at the rate of 9 liters per minuteand it flows from tank B to tank A at the rate of 4 liters per minute. If tank A initiallycontains 1 kilogram of salt and tank B contains no salt, then set up the system ofdifferential equations that govern the mass of the salt in each tank t ≥ 0 minutes later.

Tank A Tank B

9 L/min

4 L/min

5 L/min

5 L/min

The two tanks in Exercise 8.4.34.

Page 10: Math 211 Homework #9polking/homework/hw09.pdf · Math 211 Homework #9 March 16, 2001 8.3.3. x = x −y −x3 y = x (i) Plot the nullclines for each equation in the given system of

Answer: Let x(t) denote the amount of salt in tank A, and let y(t) denote the amountin tank B. Salt enters tank A only from tank B, and at the rate of 5y/3 kg/m. Saltleave tank A to go to tank B at the rate of 9x/3 kg/m. Hence the differential equationfor x is

dx

dt= 5y

3− 9x

3.

Salt enters tank B at the rate of 9x/3 kg/m. It leaves tank B either to go to tank A orto leave the system. The total rate is 9y/3 kg/m. Hence the differential equation fory is

dy

dt= 9x

3− 9y

3.

The system is

dx

dt= 5y

3− 9x

3dy

dt= 9x

3− 9y

3

with initial conditions x(0) = 1 and y(0) = 0.

9.1.3. Use hand calculations to find the characteristic polynomial and eigenvalues for

A =(−2 3

0 −5

).

Answer: If

A =(−2 3

0 −5

),

then the characteristic polynomial is

p(λ) = det(A − λI)

= det A =(−2 − λ 3

0 −5 − λ

)= (−2 − λ)(−5 − λ)

= (λ + 2)(λ + 5).

Thus, the eigenvalues are λ1 = −2 and λ2 = −5.

9.1.5. Use hand calculations to find the characteristic polynomial and eigenvalues for

A =(

5 3−6 −4

).

Answer: If

A =(

5 3−6 −4

),

Page 11: Math 211 Homework #9polking/homework/hw09.pdf · Math 211 Homework #9 March 16, 2001 8.3.3. x = x −y −x3 y = x (i) Plot the nullclines for each equation in the given system of

then the characteristic polynomial is

p(λ) = det(A − λI)

= det A =(

5 − λ 3−6 −4 − λ

)= (5 − λ)(−4 − λ) + 18

= λ2 − λ − 2

= (λ − 2)(λ + 1)

Thus, the eigenvalues are λ1 = 2 and λ2 = −1.

9.1.9. Use hand calculations to find the characteristic polynomial and eigenvalues for

A =( 1 2 3

0 0 20 3 1

).

Answer: If

A =( 1 2 3

0 0 20 3 1

),

then

p(λ) = det

( 1 − λ 2 30 0 − λ 20 3 1 − λ

).

Expanding down the first column,

p(λ) = (1 − λ)

(0 − λ 2

3 1 − λ

)= (1 − λ)(−λ(1 − λ) − 6)

= (1 − λ)(λ2 − λ − 6)

= (1 − λ)(λ − 3)(λ + 2).

Thus, the eigenvalues are λ1 = 1, λ2 = 3, and λ3 = −2.

9.1.16. Use hand calculations to find a fundamental set of solutions for the system y′ = Ay,where

A =(

2 0−4 −2

).

Answer: The characteristic polynomial is p(λ) = (2−λ)(−2−λ) = (λ−2)(λ+2).

Hence the eigenvalues are λ1 = −2 and λ2 = 2.For the eigenvalue λ1 = −2, we have

A − λ1I =(

4 04 0

).

The eigenspace is generated by v1 = (0, 1)T . The corresponding solution is

y1(t) = eλ1tv1 = e−2t

(01

).

Page 12: Math 211 Homework #9polking/homework/hw09.pdf · Math 211 Homework #9 March 16, 2001 8.3.3. x = x −y −x3 y = x (i) Plot the nullclines for each equation in the given system of

For the eigenvalue λ2 = 2 we have

A − λ2I =(

0 04 −4

).

The eigenspace is generated by v2 = (1, 1)T . The corresponding solution is

y2(t) = eλ2tv2 = e2t

(11

).

Since y1(0) = v1 and y2(0) = v2 are not multiples of each other, they are linearlyindependent. Hence y1 and y2 form a fundamental set of solutions.

9.1.25. Use hand calculations to find a fundamental set of solutions for the system y′ = Ay,where

A =(−1 0 0

2 −5 −6−2 3 4

).

Answer: If

A =(−1 0 0

2 −5 −6−2 3 4

),

then

p(λ) = det

(−1 − λ 0 02 −5 − λ −6

−2 3 4 − λ

)

= (−1 − λ) det

(−5 − λ −63 4 − λ

)= (−1 − λ)(−20 + 5λ − 4λ + λ2 + 18)

= −(λ + 1)(λ2 + λ − 2)

= −(λ + 1)(λ + 2)(λ − 1)

Thus, λ1 = −1, λ2 = −2, and λ3 = 1 are eigenvalues. For λ1 = −1,

A + I =( 0 0 0

2 −4 −6−2 3 5

),

which has reduced row echelon form( 1 0 −10 1 10 0 0

).

It is easily seen that the nullspace of A + I is generated (1, −1, 1)T . Thus,

y1(t) = e−t

( 1−11

)

is a solution. For λ = −2,

A + 2I =( 1 0 0

2 −3 −6−2 3 6

),

Page 13: Math 211 Homework #9polking/homework/hw09.pdf · Math 211 Homework #9 March 16, 2001 8.3.3. x = x −y −x3 y = x (i) Plot the nullclines for each equation in the given system of

which has reduced row echelon form

( 1 0 00 1 20 0 0

).

It is easily seen that the nullspace of A + 2I is generated by (0, −2, 1)T . Thus,

y2(t) = e−2t

( 0−21

)

is a solution. For λ3 = 1,

A − I =(−2 0 0

2 −6 −6−2 3 3

),

which has reduced row echelon form

( 1 0 00 1 10 0 0

).

It is easily seen that the nullspace of A − I is generated by (0, −1, 1). Thus,

y3(t) = et

( 0−11

)

is a solution. Because

det[y1(0), y2(0), y3(0)] =( 1 0 0

−1 −2 −11 1 1

)= −1,

the solutions y1(t), y2(t), and y3(t) are independent for all t and form a fundamentalset of solutions.

9.1.35. Use a computer to find the eigenvalues and eigenvectors for

A =

−4 −7 0 72 −5 2 1

−1 −11 1 82 −8 2 4

.

Page 14: Math 211 Homework #9polking/homework/hw09.pdf · Math 211 Homework #9 March 16, 2001 8.3.3. x = x −y −x3 y = x (i) Plot the nullclines for each equation in the given system of

Answer: In MATLAB this can be done with the following commands from a diary file.

A=[-4 -7 0 7;2 -5 2 1;-1 -11 1 8; 2 -8 2 4]A =

-4 -7 0 72 -5 2 1

-1 -11 1 82 -8 2 4

format ratll = eig(A)ll =

-4-2-13

These are the eigenvalues.

I = eye(4);null(A-ll(1)*I,’r’)ans =

-1/21

1/21

v1 = ans*2v1 =

-1212

We get the eigenvalue λ1 = −4 and eigenvector v1 = (−1, 2, 1, 2)T .

v2 = null(A-ll(2)*I,’r’)v2 =

-1/500399958596722111

v2(1)=0v2 =

0111

Page 15: Math 211 Homework #9polking/homework/hw09.pdf · Math 211 Homework #9 March 16, 2001 8.3.3. x = x −y −x3 y = x (i) Plot the nullclines for each equation in the given system of

We get the eigenvalue λ2 = −2 and eigenvector v2 = (0, 1, 1, 1)T .

v3 = null(A-ll(3)*I,’r’)v3 =

-1/5298352502788821

3/21

v3(1) = 0;v3=2*v3v3 =

0232

We get the eigenvalue λ3 = −1 and the eigenvector v3 = (0, 2, 3, 2)T .

v4 = null(A-ll(4)*I,’r’)v4 =

1/21/211

v4=2*v4v4 =

1122

We get the eigenvector λ4 = 3 and the eigenvector v4 = (1, 1, 2, 2)T .

9.1.43. Use a computer to find a fundamental set of solutions for the system y′ = Ay, where

A =( 7 7 4

−6 −10 −86 7 5

).

Answer: In MATLAB we can do this using the following commands from a diary file.

A = [7 7 4;-6 -10 -8; 6 7 5];ll = eig(A)ll =

41

-3

Page 16: Math 211 Homework #9polking/homework/hw09.pdf · Math 211 Homework #9 March 16, 2001 8.3.3. x = x −y −x3 y = x (i) Plot the nullclines for each equation in the given system of

These are the eigenvalues.

I = eye(3);v1 = null(A - ll(1)*I,’r’)v1 =

1-11

Thus we have eigenvalue λ1 = 4 and eigenvector v1 = (1, −1, 1)T . The correspond-ing solution is

y1(t) = eλ1tv1 = e4t

( 1−11

).

v2 = null(A - ll(2)*I,’r’)v2 =

1/2-11

v2=2*v2v2 =

1-22

Thus we have eigenvalue λ2 = 1 and eigenvector v2 = (1, −2, 2)T . The correspond-ing solution is

y2(t) = eλ2tv2 = et

( 1−22

).

v3 = null(A-ll(3)*I,’r’)v3 =

1-21

Thus we have eigenvalue λ3 = −3 and eigenvector v3 = (1, −2, 1)T . The corre-sponding solution is

y3(t) = eλ3tv3 = e−3t

( 1−21

).

Page 17: Math 211 Homework #9polking/homework/hw09.pdf · Math 211 Homework #9 March 16, 2001 8.3.3. x = x −y −x3 y = x (i) Plot the nullclines for each equation in the given system of

To show that y1, y2, and y3 are a fundamental set of solutions we need to showthat they are linearly independent. For this we compute using MATLAB that

det([v1 v2 v3])ans =

1

9.1.47. Use a computer to find a fundamental set of solutions for the system y′ = Ay, where

A =

6 4 −8 014 2 22 −1811 4 5 −922 8 2 −14

Answer: In MATLAB we compute as follows:

A=[6 4 -8 0;14 2 22 -18;11 4 5 -9;22 8 2 -14];ll = eig(A)ll =

2-2-54

These are the eigenvalues.

I = eye(4);v1 = null(A - ll(1)*I,’r’)v1 =

1/21/21/21

v1=2*v1v1 =

1112

Thus we have eigenvalue λ1 = 2 and eigenvector v1 = (1, 1, 1, 2)T . The correspond-ing solution is

y1(t) = eλ1tv1 = e2t

1112

.

Page 18: Math 211 Homework #9polking/homework/hw09.pdf · Math 211 Homework #9 March 16, 2001 8.3.3. x = x −y −x3 y = x (i) Plot the nullclines for each equation in the given system of

v2 = null(A - ll(2)*I,’r’)v2 =

1/2-1/5629499534213121/21

v2(2)=0;v2=2*v2v2 =

1012

Thus we have eigenvalue λ2 = −2 and eigenvector v2 = (1, 0, 1, 2)T . The corre-sponding solution is

y2(t) = eλ2tv2 = e−2t

1012

.

v3 = null(A-ll(3)*I,’r’)v3 =

-1/22517998136852481

1/21

v3(1) = 0;v3=2*v3v3 =

0212

Thus we have the eigenvalue λ3 = −5 and the the eigenvector v3 = (0, 2, 1, 2)T .The corresponding solution is

y3(t) = eλ3tv3 = e−5t

0212

.

Page 19: Math 211 Homework #9polking/homework/hw09.pdf · Math 211 Homework #9 March 16, 2001 8.3.3. x = x −y −x3 y = x (i) Plot the nullclines for each equation in the given system of

v4 = null(A-ll(4)*I,’r’)v4 =

-1/2251799813685248211

v4(1) =0v4 =

0211

Thus we have the eigenvalue λ4 = 4 and the eigenvector v4 = (0, 2, 1, 1)T . Theassociated solution is

y(t) = eλ4tv4 = e4t

0211

.

To show that y1, y2, y3, and y4 are a fundamental set of solutions we need toshow that they are linearly independent. For this we compute using MATLAB that

det([v1 v2 v3 v4])ans =

1

M7.17. We must compute with the predator-prey model

x ′ = ax − bxy − ex,

y ′ = −cy + dxy − ey,

where a = 0.4, b = 0.01, c = 0.3, d = 0.005, and e has different values.

(a) Start with initial conditions x(0) = 50 and y(0) = 30 and compute the solution withe = 0 over the interval [0, 100]. Prepare a time plot and a phase plane plot.

Answer: We will prepare one derivative m-file that we can use for all parts of theexercise. We call it ppreypr.m.

function upr = ppreypr(t,u)

global A B C D E

x = u(1); % The prey population.y = u(2); % The predator population.xpr = A*x - B*x*y -E*x;ypr = -C*y + D*x*y - E*y;upr = [xpr;ypr];

Page 20: Math 211 Homework #9polking/homework/hw09.pdf · Math 211 Homework #9 March 16, 2001 8.3.3. x = x −y −x3 y = x (i) Plot the nullclines for each equation in the given system of

To prepare the two plots we use the following MATLAB commands.

global A B C D EA=0.4;B=0.01;C=0.3;D=0.005;E=0;u0 = [50;30];tspan = [0,100];[t,u] = ode45(’ppreypr’,tspan,u0);plot(t,u) % This gives the time plot.plot(u(:,1),u(:,2)) % This gives the phase plane plot.

The results follow.

0 50 10020

40

60

80

100

x &

y

t40 60 80

30

40

50

yx

The time plot is on the left and the phase plane on the right.

(b) Compute and plot the solutions with e = 0, 0.01, 0.02, 0.03, and 0.04 on the samephase plane.

Answer: In preparing this plot, it is important to keep the data for the different valuesof e separate. We will use different labels to do this. Remember that we have alreadycomputed the data with e = 0. For other values of e we need only change the globalvariable. To prepare the plot we used the following MATLAB commands.

E = 0.01; [t1,u1] = ode45(’ppreypr’,tspan,u0);E = 0.02; [t2,u2] = ode45(’ppreypr’,tspan,u0);E = 0.03; [t3,u3] = ode45(’ppreypr’,tspan,u0);E = 0.04; [t4,u4] = ode45(’ppreypr’,tspan,u0);plot(u(:,1),u(:,2)) % e = 0 data.hold on % We want to add plots.plot(u1(:,1),u1(:,2))plot(u2(:,1),u2(:,2))plot(u3(:,1),u3(:,2))plot(u4(:,1),u4(:,2))xlabel(’x’); ylabel(’y’)legend(’e = 0’,’e = 0.01’,’e = 0.02’,’e = 0.03’,’e = 0.04’)

Page 21: Math 211 Homework #9polking/homework/hw09.pdf · Math 211 Homework #9 March 16, 2001 8.3.3. x = x −y −x3 y = x (i) Plot the nullclines for each equation in the given system of

hold off % Stop adding plots.

We then use the MATLAB Toolbar to choose different colors for the various plots.Notice that changing the color of the curve on the plot results in a change in thelegend as well. The result follows.

40 50 60 70 80 90 10025

30

35

40

45

50

55

x

y

e = 0e = 0.01e = 0.02e = 0.03e = 0.04

The effect of fishing on the predator-prey model.

(c) Explain.

Answer: It appears that with more fishing the curve moves lower and to the right. Thismeans that the number of prey increases with fishing, while the number of predatorsdecreases. This is exactly what the Italian fishermen experienced.