Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

Differential Equations 2020/21

MA 209

Solutions to homework for week 2


Lecture Notes – Section 1.2: Questions 1 and 2;
Section 1.5, page 12: Question 1;
Section 1.5, page 15: Questions 1 and 3(a).

Lecture Notes – Section 1.2

1 (a) The following Maple commands will try to solve this initial value problem:
> ode1 := diff(x(t),t) = x(t)+x(t)^3;
> dsolve( { ode1, x(0) = 1 } );
And it will give the output
1
x(t) = p .
2e(−2t) − 1
First note that indeed for this x(t) we have x(0) = 1.
Next we observe that this x(t) is only defined if 2e−2t − 1 > 0, hence if e−2t > 1/2. This
is equivalent to −2t > ln(1/2) = − ln(2). And this gives t < 21 ln(2). So if x(t) satisfies
the differential equation, then it is a solution on the interval I = (−∞, 12 ln(2)).
−1/2
So let’s look at the derivative of x(t). Rewrite x(t) = 2e−2t − 1 . For the derivative
we find, using the chain rule:
−3/2 −3/2 2e−2t
x0 (t) = − 12 2e−2t − 1 · 2 · (−2)e−2t = 2e−2t 2e−2t − 1 = √ 3 .
2e−2t − 1
And for the right hand side we find
−1/2 −3/2
x(t) + x(t)3 = 2e−2t − 1 + 2e−2t − 1
√ 2
1 1 2e−2t − 1 1
= √ + √ 3 = √ 3 + √ 3
2e−2t
−1 2e−2t − 1 2e−2t − 1 2e−2t − 1
2e−2t − 1 + 1

2e−2t
= √ 3 = √ 3 .
2e−2t − 1 2e−2t − 1
Hence indeed this x(t) satisfies both x0 (t) = x(t) + x(t)3 and x(0) = 1.

c London School of Economics, 2019
MA 209 Differential Equations Solutions to homework for week 2 — Page 2

(b) The following Maple commands will try to solve this initial value problem:
> ode2 := diff(x(t),t,t) + x(t) = cos(t)/2;
> dsolve( { ode2, x(0) = 1, D(x)(0) = 1 } );
And it gives the reaction:

x(t) = sin(t) + cos(t) + 14 sin(t)t.

This x(t) is well-defined for all t, hence if it satisfies the differential equation and the
initial values, then it does so on the interval I = R. Next note that x(0) = 1. And for
the derivative we find

x0 (t) = cos(t) − sin(t) + 14 cos(t)t + 14 sin(t) = cos(t) − 43 sin(t) + 14 cos(t)t.

So x0 (0) = 1, and hence the initial values are satisfied.


For the second derivative we find

x00 (t) = − sin(t) − 34 cos(t) − 14 sin(t)t + 14 cos(t)


= − sin(t) − 12 cos(t) − 14 sin(t)t.

It is straightforward to check that indeed we have x00 (t) + x(t) = 1


2 cos(t).
(c) The following Maple commands will make Maple have a go at this 2-dimensional initial
value problem:
> ode3a := diff(x(t),t) = -x(t) + y(t);
> ode3b := diff(y(t),t) = x(t) + y(t) + t;
> dsolve( { ode3a, ode3b, x(0) = 0, y(0) = 0 } );
And it gives the reaction:
n √ √ √ √
x(t) = 81 2e 2t − 81 2e− 2t − 12 t,
√ √ √ √ √ √ o
y(t) = 1
4 e 2t
+ 14 e− 2t
− 1
2 + 1
8 2e 2t
− 1
8 2e− 2t
− 12 t .

These x(t) and y(t) are well-defined for all t. So if the differential equations and initial
values are satisfied, they will provide a solution on the interval I = R.
Since the solutions give x(0) = 0 and y(0) = 0, the initial values are satisfied. And for
the derivatives we find
√ √ √ √ √ √ √ √
x0 (t) = 14 e 2t + 14 e− 2t − 21 , y 0 (t) = 14 2e 2t − 14 2e− 2t + 14 e 2t + 14 e− 2t − 12 .

It is straightforward to check that these x(t), y(t), x0 (t), y 0 (t) indeed satisfy the two equa-
tions in the ODE.
MA 209 Differential Equations Solutions to homework for week 2 — Page 3

2 (a) The following Maple commands produce a plot of the solution of the differential equation
with the one initial value x(0) = 1:
> with(DEtools):
> ode3 := diff(x(t),t) = x(t) * ( 2 - x(t)/5 - (5*x(t)) / (2+x(t)^2) );
> DEplot(ode3, x(t), t=0..10, [[x(0)=1]] );
To make the picture somewhat easier to look at when we introduce more than one initial
value, we remove the arrows of the direction field and change the linecolour to something
else than the default yellow:
> DEplot(ode3, x(t), t=0..10, [[x(0)=1]], arrows=NONE, linecolor=red );
Next we want to be able to plot several initial values in the same picture; say from
x(0) = 0, x(0) = 1/2 to x(0) = 10. A convenient way to do this is by using the seq
command of Maple:
> DEplot(ode3, x(t), t=0..10, arrows=NONE, linecolor=red,
[ seq( [x(0)=n/2], n=0..20 ) ] );
This gives the picture below:

10

6
x(t)
4

0 2 4 6 8 10
t
(b) So it appears that there is a value α, somewhere between 2 and 3, so that we have the
following behaviour depending on the initial value x(0) = x0 : If x0 = 0, then the solution
stays zero, x(t) = 0. If 0 < x0 < α, the solution x(t) goes to a constant value roughly
equal to 3/2 as t gets large. And for x0 > α the solution goes to a different value, this
time roughly 6, for large t.
It is possible to get a better idea what the magic value of α is by carefully selecting initial
values between 2 and 3. For instance, the following sequence of plots will give a good
approximation:
> DEplot(ode3, x(t), t=0..10, [[x(0)=2.0]], arrows=NONE, linecolor=red);
> DEplot(ode3, x(t), t=0..10, [[x(0)=2.1]], arrows=NONE, linecolor=red);
MA 209 Differential Equations Solutions to homework for week 2 — Page 4

> DEplot(ode3, x(t), t=0..10, [[x(0)=2.2]], arrows=NONE, linecolor=red);


> DEplot(ode3, x(t), t=0..10, [[x(0)=2.3]], arrows=NONE, linecolor=red);
> DEplot(ode3, x(t), t=0..10, [[x(0)=2.4]], arrows=NONE, linecolor=red);
> DEplot(ode3, x(t), t=0..10, [[x(0)=2.5]], arrows=NONE, linecolor=red);
> DEplot(ode3, x(t), t=0..10, [[x(0)=2.6]], arrows=NONE, linecolor=red);
> DEplot(ode3, x(t), t=0..10, [[x(0)=2.7]], arrows=NONE, linecolor=red);
> DEplot(ode3, x(t), t=0..10, [[x(0)=2.8]], arrows=NONE, linecolor=red);
> DEplot(ode3, x(t), t=0..10, [[x(0)=2.9]], arrows=NONE, linecolor=red);
> DEplot(ode3, x(t), t=0..10, [[x(0)=3.0]], arrows=NONE, linecolor=red);
In fact, you will find that the change happens between x(0) = 2.6 and x(0) = 2.7:
> DEplot(ode3, x(t), t=0..10, [[x(0)=2.6], [x(0)=2.7]],
arrows=NONE, linecolor=red);
which produces the next picture:

3.8
3.6
3.4
3.2

x(t) 3
2.8
2.6
2.4
2.2
0 2 4 6 8 10
t

If you want, you can go further and figure out that the change in behaviour happens
somewhere between x(0) = 2.636 and x(0) = 2.637:
> DEplot(ode3, x(t), t=0..10, [[x(0)=2.636], [x(0)=2.637]],
arrows=NONE, linecolor=red);
1 5x 
(c) We can plot the function f (x) = x 2 − x − , in the range x ∈ [0, 10] using the
5 2 + x2
Maple command:
> plot( x*( 2 - (1/5)*x - (5*x)/(2+x^2)), x=0..10 );
This produces the picture on the next page.
From the plot we observe that the function has zeros at (approximately) x = 0, x ≈ 1.24,
x ≈ 2.64, and x ≈ 6.12. Moreover, we see that

if x∈ (0, 1.24), then f (x) > 0;


if x ∈ (1.25, 2.63), then f (x) < 0;
if x ∈ (2.64, 6.12), then f (x) > 0;
if x ∈ (6.13, ∞), then f (x) < 0.
MA 209 Differential Equations Solutions to homework for week 2 — Page 5

x
2 4 6 8 10
0

–1

–2

–3

–4

–5

Thus, for instance, if x(t) is in one of the regions above, say in the region (1.25, 2.63),
then x0 (t) = f (x(t)) < 0, and so the function t 7→ x(t) is decreasing in this region. This
explains the behaviour of the curve that starts with an initial condition in this region;
see the figure in part (a). On the other hand, in some regions the rate of change of x(t)
is positive; for example for initial conditions in the region (2.64, 6.12). This demarcation
between the regions is highlighted in the figure, and we summarise the behaviour below:

if x(0) = 0, then x(t) = 0 for all t ∈ [0, ∞);


if x(0) ∈ (0, 1.24, then x(t) is increasing and x(t) → 1.24 as t → ∞;
if x(0) ≈ 1.24, then x(t) ≈ 1.24 for all t ∈ [0, ∞);
if x(0) ∈ (1.25, 2.63), then x(t) is decreasing and x(t) → 1.24 as t → ∞;
if x(0) ≈ 1.23, then x(t) ≈ 1.63 for all t ∈ [0, ∞);
if x(0) ∈ (2.63, 6.12), then x(t) is increasing and x(t) → 6.12 as t → ∞;
if x(0) ≈ 6.12, then x(t) ≈ 6.12 for all t ∈ [0, ∞);
if x(0) ∈ (6.13, ∞), then x(t) is decreasing and x(t) → 6.13 as t → ∞.

Lecture Notes – Section 1.5, page 12

1 Since for commuting matrices A and B, we know that eA+B = eA eB , we must choose non-
commuting A and B. A little bit of trial and error, making sure to try to find easy matrices
(“easy” in as far as taking exponential is concerned), leads us to choose the following two:
" # " #
0 1 0 0
A = and B = .
0 0 1 0

Then for the products we get


" #" # " # " # " #" #
0 1 0 0 1 0 0 0 0 0 0 1
AB = = 6= = = BA,
0 0 1 0 0 0 0 1 1 0 0 0

and hence A and B do not commute.


MA 209 Differential Equations Solutions to homework for week 2 — Page 6

It is easy to check that A2 = 0, which means that Ak = 0 for all k ≥ 2. Similarly, B 2 = 0,


for all k ≥ 2. So we obtain
" #
A 1 2 1 1
e = I + A + A + ... = I + A = , and
2! 0 1
" #
1 1 0
eB = I + B + B 2 + . . . = I + B = ,
2! 1 1
" #" # " #
1 1 1 0 2 1
and so eA eB = = .
0 1 1 1 1 1
" #
0 1
On the other hand we have A + B = , and we need to find eA+B . It is easy to see that
1 0
" # " #
1 0 0 1
for even k we have (A + B)k = , while for odd k we get (A + B)k = . This leads
0 1 1 0
to
∞ ∞ ∞
" # " #
X 1 X 1 1 0 X 1 0 1
eA+B = (A + B)k = +
k! k! 0 1 k! 1 0
k=0 k=0, k even k=0, k odd
∞ ∞
 
P P
 1/(k!) 1/(k!) 
k=0, k even k=0, k odd
=  .

∞ ∞
 P P
1/(k!) 1/(k!)

k=0, k odd k=0, k even

∞ ∞
X 1 X 1
To calculate and we use the observations that
k! k!
k=0, k even k=0, k odd

∞ ∞ ∞
X 1 X 1 X 1 k
+ = 1 = e1 = e, and
k! k! k!
k=0, k even k=0, k odd k=0
∞ ∞ ∞
X 1 X 1 X 1
− = (−1)k = e−1 .
k! k! k!
k=0, k even k=0, k odd k=0

∞ ∞
X 1 X 1
We can see this as two equations for the unknowns and . Solving for
k! k!
k=0, k even k=0, k odd
these unknowns gives
∞ ∞
X 1 1 X 1 1
= (e + e−1 ) and = (e − e−1 ).
k! 2 k! 2
k=0, k even k=0, k odd

And hence we can conclude that


" #
1 −1 1 −1
A+B 2 (e + e ) 2 (e − e )
e = 1 −1 1 −1
,
2 (e − e ) 2 (e + e )
" #
2 1
which is clearly different from eA eB = .
1 1
MA 209 Differential Equations Solutions to homework for week 2 — Page 7

Lecture Notes – Section 1.5, page 15

1 Since keA k = max |(eA )ij |, the lazy way to do this would be to argue as follows, for any
i,j
i, j = 1, . . . , n,
1 1 1
|(eA )ij | = (I)ij + (A)ij + (A2 )ij + (A3 )ij + . . .

1! 2! 3!
1 1 1
≤ |(I)ij | + |(A)ij | + |(A )ij | + |(A3 )ij | + . . .
2
1! 2! 3!
1 1 1
≤ kIk + kAk + kA2 k + kA3 k + . . . (definition of k · k)
1! 2! 3!
1 1 1
≤ 1 + kAk + nkAk2 + n2 kAk3 + . . . (Lemma 1.5.6)
1! 2! 3!
1 1 1
≤ 1 + nkAk + n2 kAk2 + n3 kAk3 + . . . = enkAk .
1! 2! 3!
The problem with that reasoning is that most steps need to be justified in terms of convergence
of the infinite series and so. And as long as you don’t do that, the above is not really a complete
answer to the question.
1 1 1
So let’s try to do it properly. For k = 0, 1, 2, . . ., define Sk (A) = I + A + A2 + · · · + Ak
1! 2! k!
(the k-term partial series). Then for the any ij-entry of Sk (A) we have
1 1 2 1 k
|(Sk (A))ij | = (I)ij + (A)ij + (A )ij + · · · + (A )ij

1! 2! k!
1 1 1
≤ |(I)ij | + |(A)ij | + |(A2 )ij | + · · · + |(Ak )ij |
1! 2! k!
1 1 2 1 k
≤ kIk + kAk + kA k + · · · + kA k (definition of k · k)
1! 2! k!
1 1 1
≤ 1 + kAk + nkAk2 + · · · + nk−1 kAkk (Lemma 1.5.6)
1! 2! k!
1 1 1
≤ 1 + nkAk + n2 kAk2 + · · · + nk kAkk
1! 2! k!
1 1 1
≤ 1 + (nkAk) + (nkAk)2 + · · · + (nkAk)k
1! 2! k!
1 1 1
≤ 1 + (nkAk) + (nkAk) + · · · + (nkAk)k + . . . = enkAk .
2
1! 2! k!
All the above is now justified, since we are dealing with finite sums only, except in the final
line. But there we know we are just looking at the infinite series that defines ex for some real
number x (in this case x = nkAk). And we know that series converges for all x.
So we have proved that for all k, |(Sk (A))ij | ≤ enkAk . Passing the limit as k → ∞, we obtain
that |(eA )ij | ≤ enkAk for all i, j. It follows that keA k = max |(eA )ij | ≤ enkAk .
i,j
MA 209 Differential Equations Solutions to homework for week 2 — Page 8

1 1 1
3 (a) Also this time, define, for k = 0, 1, 2, . . ., Sk (A) = I + A + A2 + · · · + Ak . Since
1! 2! k!
Av = λv, it is easy to show by induction that An v = λn v for all n = 0, 1, 2, . . .. Then we
have
 1 1 1 
Sk (A)v = I + A + A2 + · · · + Ak v
1! 2! k!
1 1 2 1
= v + Av + A v + · · · + Ak v
1! 2! k!
1 1 2 1 k
= v + λv + λ v + · · · + λ v
1! 2! k!
 1 1 2 1 k
= 1 + λ + λ + · · · + λ v.
1! 2! k!
1 1 1
Writing sk (λ) = 1 + λ + λ2 + · · · + λk we have found that Sk (A)v = sk (λ)v (where
1! 2! k!
we should be aware that Sk (A) is a matrix while sk (λ) is a real number). For a coordinate
i ∈ {1, . . . , n} we can write
n
X
sk (λ)vi = (sk (λ)v)i = (Sk (A)v)i = (Sk (A))ij vj .
j=1

Since lim (Sk (A))ij = (eA )ij and lim sk (λ) = eλ , by passing the limit as k → ∞ in the
k→∞ k→∞
above, we obtain that
n
X
(eλ v)i = eλ vi = (eA )ij vj = (eA v)i .
j=1

Since this holds for each coordinate, it follows that eA v = eλ v.

You might also like