Math 5110/6830 Homework 2.1 Solutions

advertisement
Math 5110/6830
Homework 2.1 Solutions
1. In order to find the solution using iteration, use the following matlab script:
x0 = .5 ;
nmax = 20;
x = zeros(1,nmax+1);
x(1) = xo;
for i = 1:20
x(i + 1) = 3.7x(i)(1 − x(i));
end
plot(0:20, x,’-*’)
axis([0 20 0 1])
xlabel(’n’)
ylabel(’x’)
title(’Hw 2.1 Problem 1’)
Hw 2.1 Problem 1
1
0.9
0.8
0.7
x
0.6
0.5
0.4
0.3
0.2
0.1
0
0
2
4
6
8
10
n
12
14
16
18
20
2. To solve the following equations, we can use the following procedure. Guess a solution of the form
xn = cλn , determine the characteristic equation, and solve to find the eigenvalues. Then write
the form for the general solution, and use the specified values to solve for the constants.
(a) Given xn − 5xn−1 + 6xn−2 = 0, assume xn = cλn . Then cλn − 5cλn−1 + 6cλn−2 = 0, and
so the characteristic equation is λ2 − 5λ + 6 = 0. Solving this for λ yields the eigenvalues
λ1 = 2 and λ2 = 3. The general solution therefore has the form
xn = A · 2n + B · 3n .
Use the initial conditions to solve for A and B:
)
x0 = A + B = 2
⇒
x1 = 2A + 3B = 5
A = 1 and B = 1
The solution is xn = 2n + 3n . Since both eigenvalues satisfy λ > 1, the solution increases
1
to +∞ as n increases.
7000
6000
5000
xn
4000
3000
2000
1000
0
0
1
2
3
4
n
5
6
7
8
(b) Repeating the procedure above, and assuming that xn = cλn , the characteristic equation
becomes λ2 + .3λ − .1. The eigenvalues satisying this equation are λ1 = .2 and λ2 = −.5.
To find this solution, we construct a general solution of the form
xn = A(.2)n + B(−.5)n
and solve for A and B using the specified conditions. We end up with
xn =
2.5
(.2)n + 5.1429(−.5)n .
.14
The largest eigenvalue is -.5, therefore, the solution will exhibit oscillatory behavior towards
0.
2.5
2
1.5
xn
1
0.5
0
−0.5
−1
1
2
3
4
5
6
7
8
9
10
n
3. (a) There are two ways to do this problem: using matrices or reducing the system to a single
equation.
2
Matrices: Rewrite the system in the form vn+1
xn+1
3
=
yn+1
1
= Mvn :
2 xn
.
4 yn
Find the eigenvalues of the matrix M by solving the equation det(M − λI) = 0 for λ, where
I is the identity matrix. Here, λ1 = 2 and λ2 = 5. Solutions to the system of difference
equations have the general form
vn = c1 w1 λn1 + c2 w2 λn2
= c1 w1 · 2n + c2 w2 · 5n ,
Ai
where wi =
is an eigenvector associated with λi , which satsifies the equation Mwi =
Bi
A1
−2
A2
1
λi wi . Eigenvectors satisfying this equation are
=
and
=
. This gives
B1
1
B2
1
the following for the general solution:
xn
n 1
n −2
.
vn =
+ c2 · 5
= c1 · 2
1
yn
1
Using the given initial conditions, solve for c1 and c2 to get
4
7
xn = − · 2n + · 5n
3
3
2 n 7 n
yn = · 2 + · 5
3
3
Reduction to a single equation: To reduce to a single equation, use the first equation to
solve for yn , determine yn+1 , and equate it to the second equation:
yn
⇒
yn+1
1
= (xn+1 − 3xn )
2
1
= (xn+2 − 3xn+1 )
2
= xn + 4yn
= xn + 2xn+1 − 6xn
⇒
xn+2 − 3xn+1
⇒
xn+2 − 7xn+1 + 10xn = 0
= −10xn + 4xn+1
Assuming a form of xn = cλn , the characteristic equation follows immediately, from which a
solution for xn can be found in the standard way. Once xn is obtained, substitute this back
into yn = 21 (xn+1 − 3xn ) and solve for the constants using the initial conditions to get the
above solution.
3
1500
xn
yn
1000
500
0
0
0.5
1
1.5
2
n
2.5
3
3.5
4
(b) Reduction to a single equation: Using the same method as in part (a), we obtain the
following equation:
2
1
xn+2 + xn+1 − xn = 0.
3
3
Solving the characteristic equation λ2 + 23 λ − 31 = 0 for the eigenvalues gives λ1 = 13 and
λ2 = −1. Constructing the general solution for xn , substituting into yn = 31 (xn+1 + xn )
and solving for the constants using the initial conditions leads to the following solution:
27 1 n 19
xn =
− (−1)n
4 3
4
n
.
1
yn = 3
3
8
xn
yn
6
4
2
0
−2
−4
−6
0
1
2
3
4
n
5
6
7
8
4. (a) We’re given that each pair of rabbits produces exactly 1 new pair of rabbits and that only
1-month-olds and 2-month-olds can reproduce. Then Rn0 is composed of the number of pairs
4
of rabbits produced by 1-month-olds and the number produced by 2-month-olds: Rn0 = Rn1 +
0
0
0
1
2
0
Rn2 . Since Rn1 = Rn−1
and Rn2 = Rn−2
, we have that Rn+1
= Rn+1
+ Rn+1
= Rn0 + Rn−1
.
(b) From the equation in part (a), the corresponding characteristic equation is λ2 − λ − 1 = 0,
which yields the following eigenvalues:
√
√
1− 5
1+ 5
, λ2 =
.
λ1 =
2
2
The general solution is therefore given by
Rn0
=A
√ !n
1+ 5
+B
2
√ !n
1− 5
,
2
which, after applying the conditions R00 = 1 and R10 = 1, becomes
Rn0
=
√ !
5+ 5
10
√ !n
1+ 5
+
2
√ !
5− 5
10
√ !n
1− 5
.
2
This is the total number of newborn pairs there will be after n generations.
5
Homework 2.2 Solutions
1. (a) To reduce this system to a single equation, first note that since bn+1 = an , this implies that
bn = an−1 . Plugging this into the equation for an+1 and using the fact the p + q = 1 gives
an+1 = pan + 2qan + ran−1
= (p + 2q)an + ran−1
= (1 − q + 2q)an + ran−1
= (1 + q)an + ran−1
⇒
an+1 − (1 + q)an − ran−1 = 0
(b) If initially there is 1 segment, the number of terminal segments after 1 day will be the frequency with which a terminal segment produces daughter segments times the initial number
of terminal segments. So a1 = (1 + q)a0 = 1 + q.
To find the general solution for anh, solve the characteristiciequation λ2 − (1 + q)λ − r = 0
p
for eigenvalues λ to get λ1,2 = 21 1 + q ± (1 + q)2 + 4r . Then
an = A
η+∆
2
n
+B
η−∆
2
n
,
p
where η = 1 + q and ∆ = (1 + q)2 + 4r. Using the fact that a0 = 1 and a1 = η, the
solution becomes
η+∆
η+∆ n
−η + ∆
η−∆ n
an =
+
.
2∆
2
2∆
2
10 10
η+∆
η−∆
−η+∆
After 10 days, there will be a10 = η+∆
+
terminal segments.
2∆
2
2∆
2
(c) The total number of segments after 10 days will be equal to the sum of the number of new
terminal segments created each day over 10 days plus the terminal segment we started with:
"
#
10
10 X
X
η+∆
η+∆ i
−η + ∆
η−∆ i
s10 =
ai =
+
.
2∆
2
2∆
2
i=0
i=0
2. (a) Let xn and yn be the number of juveniles and adults in the population in year n, respectively.
Then a system that models the dynamics of the number of adults and juveniles over the years
using the information given is
xn+1 = γxn + myn
xn+1
γ m xn
or
=
yn+1
σ p yn
yn+1 = σxn + pyn .
Also, note that based on the definitions of the parameters, it must be the case that σ+γ < 1.
(b) The eigenvalues λ satsify λ2 − (γ + p)λ + (γp − σm) = 0. So
p
p
γ + p − (γ + p)2 − 4(γp − σm)
γ + p + (γ + p)2 − 4(γp − σm)
, λ2 =
.
λ1 =
2
2
In the first year: m = 0.5, p = 0.5 and σ = 0.9. For any choice of γ, λ1 is the leading
eigenvalue (i.e. |λ1 | > |λ2 |). Recall that the population will grow provided that |λ1 | > 1
6
and will decay to 0 if |λ1 | < 1. This corresponds to a shrinking population when γ < 0.1.
Note that γ must be less than 0.1 in order for the condition σ + γ < 1 to hold. So, this
population will always decay to 0.
In the second year: m = 2, p = 0.5 and σ = 0.2. For any choice of γ, λ1 is again the leading
eigenvalue. The condition γ < 0.2 corresponds to |λ1 | < 1 and a shrinking population. The
condition 0.2 < γ < 0.8 corresponds to |λ1 | > 1 and a growing population. Note that
γ < 0.8 must be true in order for the condition σ + γ < 1 to hold.
(c) For the two types of years to alternate, take M = M2 M1 , where M1 and M2 are the two
matrices generated by plugging in the given numbers distinguishing the years:
xn+2
γ2
2
γ1 0.5 xn
γ2 γ1 + 1.8 0.5γ2 + 1 xn
=
=
yn+2
0.2 0.5 0.9 0.5 yn
0.2γ1 + 0.45
0.35
yn
Or, equivalently, let the following be the systems for years 1 and 2, respectively:
xn+1 = γ1 xn + 0.5yn
and
yn+1 = 0.9xn + 0.5yn
xn+2 = γ2 xn+1 + 2yn+1
yn+2 = 0.2xn+1 + 0.5yn+1 .
Then plugging the year 1 system into that of year 2 gives
xn+2 = γ2 γ1 xn + 0.5γ2 yn + 1.8xn + yn
= (γ2 γ1 + 1.8)xn + (0.5γ2 + 1)yn
yn+2 = 0.2γ1 xn + 0.1yn + 0.45xn + 0.25yn
= (0.2γ1 + 0.45)xn + 0.35yn ,
which is the same as the matrix system.
3. (a) To reduce the red blood cells model to one equation for Rn , first we must increment the Rn
equation by one to obtain:
Rn+2 = (1 − f )Rn+1 + Mn+1
Next, substitute γf Rn for Mn+1 to obtain:
Rn+2 = (1 − f )Rn+1 + γf Rn
(b) To find the general solution for the equation guess a solution of the form Rn = cλn . The
characteristic equation is therefore,
λ2 − (1 − f )λ − γf = 0
p
The eigenvalues of this system are λ1,2 = 21 ((1 − f ) ± (1 + (4γ − 2)f + f 2 ) The general
solution is Rn = Aλn1 + Bλn2 .
(c) In order for the number of red blood cells to remain constant, the leading eigenvalue must
be 1. Therefore,
p
1
((1 − f ) + 1 + (4γ − 2)f + f 2 )
2
= (1 + (4γ − 2)f + f 2
λ1 = 1 =
(1 + f )2
γ = 1
7
When γ = 1, λ2 = f . f is the fraction of red blood cells removed so f ≤ 1. Therefore,
λ2 ≤ λ1 for all f . Because γ represents the number of red blood cells produced per lost cell,
in order for the population of red blood cells to remain constant there must be one red blood
cell produced for every red blood cell that is lost. Therefore, γ = 1 producing a constant
population makes sense.
Note: If we let λ2 = 1, then
p
(1 + f ) = − 1 + 4γf − 2f + f 2
However, (1 + f ) is always positive. γ = 1 is the only way to maintain a constant population
greater than zero.
8
Download