Вы находитесь на странице: 1из 12

PHAS2423 - Self-Study - Ordinary Differential Equations - Problems

and Solutions

(1) ODE: Laplace transform. Use the Laplace transform to


(a) find a particular solution of the non-homogeneous equation:
y 00 + 4y 0 + 4y = e2x ,
which satisfies the boundary conditions y(0) = y 0 (0) = 4.
(b) find particular solutions of the system of two homogeneous equations:
f 0 (x) + g 0 (x) 3g(x) = 0

and

f 00 (x) + g 0 (x) = 0,

and

4
g(0) = .
3

which satisfy the boundary conditions


f (0) = f 0 (0) = 0

Solution.
(a) Let us introduce a notation for the Laplace transform of the function y(x):
Z
y(x)epx dx
Y = L[y] =
0
0

00

Laplace transforms of y (x) and y (x) (see lecture notes) are:


L[y 0 ] = y(0) + pY

L[y 00 ] = y 0 (0) py(0) + p2 Y.

and

Laplace transform is a linear operator. Hence, after applying to both parts of the
differential equation, we obtain an algebraic equation
L[y 00 +4y 0 +4y] = L[y 00 ]+4L[y 0 ]+4L[y] = y 0 (0)py(0)+p2 Y +4 (y(0) + pY )+4Y = L[e2x ].
Calculate the Laplace transform in the right hand side:


Z
1
1
2x
(p+2)x
2x
L[e ] =
e
dx =
e
=
.
(p + 2)
p+2
0
0
Taking into account the boundary conditions, the algebraic equation becomes
4 4p + p2 Y 16 + 4pY + 4Y = (p2 + 4p + 4)Y 4p 20 =
1

1
.
p+2

Hence,
1
+ 4p + 20
p+2
and, after dividing both parts by (p + 2)2 ,
1
4p
20
Y =
+
+
.
3
2
(p + 2)
(p + 2)
(p + 2)2
(p + 2)2 Y =

In order to simplify the second term, notice that


p
2
p+22
p+2
2
1

=
=

=
2
2
2
2
(p + 2)
(p + 2)
(p + 2)
(p + 2)
p + 2 (p + 2)2
and substitute this into the expression for Y . Thus,
8
12
1
4
20
1
4

+
Y =
+
+
=
+
.
(p + 2)3 p + 2 (p + 2)2 (p + 2)2
(p + 2)3 p + 2 (p + 2)2
Refer to the table of Laplace transforms:
L [xn eax ] =

n!
.
(s a)n+1

Use this relation to find contributions to y(x):


L[y1 ] =

4
0!
=4
p+2
(p (2))0+1

12
1!
=
12
(p + 2)2
(p (2))1+1
1
1
2!
=
L[y3 ] =
3
(p + 2)
2 (p (2))2+1

L[y2 ] =

y1 (x) = 4e2x
y2 (x) = 12xe2x
1
y3 (x) = x2 e2x .
2

Thus,
1
y(x) = y1 (x) + y2 (x) + y3 (x) = x2 e2x + 12xe2x + 4e2x = e2x
2


x2
+ 12x + 4 .
2

To check that the solution is correct, calculate derivatives of y(x):


y 0 (x) = e2x (x2 + 24x + 8) + e2x (x + 12) = e2x (x2 23x + 4)
y 00 (x) = e2x (2x2 + 46x 8) + e2x (2x 23) = e2x (2x2 + 44x 31),
confirm that the boundary conditions are satisfied:
y(0) = y 0 (0) = 4
and that the ODE is satisfied:
2x

2x

2x

2x

x2
2

= e (2x + 44x 31) + 4e (x 23x + 4) + 4e


+ 12x + 4
2x 2
2x
2x
= e x (2 4 + 2) + e x(44 92 + 48) + e (31 + 16 + 16).

(b) Perform the Laplace transform of both equations. Use (see the lecture notes)
L[f 0 ] = f (0) + pL[f ]

L[f 00 ] = f 0 (0) pf 0 (0) + p2 L[f ]

and

Let us introduce notations for the Laplace transforms of the functions f (x) and
g(x):
Z
f (t)ept dt
F = L[f ] =
Z0
g(t)ept dt
G = L[g] =
0

In these notations, the Laplace transforms of the two given equations are:
f (0) + pF g(0) + pG 3G = 0
and
f 0 (0) pf (0) + p2 F g(0) + pG = 0.
Taking into account the boundary conditions, obtain a system of two algebraic
equations:
4
4
pF + pG 3G =
and
p2 F + pG = .
3
3
By equating the left hand sides we find
pF + pG 3G = p2 F + pG
(p2 F pF ) = 3G
G = 13 p(p 1)F
Substitute G into the 2nd algebraic equation:
4
3

= p2 F 31 p2 (p 1)F
= F (p2 31 p3 + 13 p2 ) = F ( 43 p2 31 p3 )
= 13 p2 (p 4)F.

Hence

4
4 p1
and
G=
.
4)
3 p(p 4)
Represent F as a sum of simple fractions (review PHAS1245):
F =

p2 (p

4
A
Bp + C
Ap2 + Bp2 + Cp 4Bp 4C
=
.
=
+
p2 (p 4)
p4
p2
p2 (p 4)
From this:
1
1
C=1
B=
A=
4
4
and, therefore,
4
1
1
1
F = 2
=
+
+ 2.
p (p 4)
4(p 4) 4p p

Similarly, for G
1
1
4(p 1)
=
+ .
3p(p 4)
p 4 3p
Use the table of Laplace transform to find functions f (x) and g(x):
G=

1
1
f (x) = e4x + + x
4
4

and

1
g(x) = e4x + .
3

To check the correctness of the solutions, calculate derivatives of f (x) and g(x)
f 0 (x) = e4x + 1

f 00 (x) = 4e4x

g 0 (x) = 4e4x ,

confirm that the boundary conditions are satisfied


f (0) = 0

f 0 (0) = 0

4
g(0) = ,
3

and that the system of equations is satisfied:


1
f 0 (x) + g 0 (x) 3g(x) = e4x + 1 + 4e4x 3(e4x + ) = 0
3
f 00 (x) + g 0 (x) = 4e4x + 4e4x = 0.

(2) ODE: variation of parameters method. Use the method of variation of


parameters to
(a) find the general solution of the the non-homogeneous equation
y 00 (x) + 2 y(x) = sin(x),
which satisfies the boundary conditions y(0) = y 0 (0) = 0.
(b) find the general solution of the non-homogeneous equation
x2 y 00 (x) 2xy 0 (x) + 2y = x ln(x),
given that the solutions of the corresponding homogeneous equation are x and x2 .
Solution.
(a) Since cos x and sin x are linearly independent solutions of the corresponding
homogeneous equation, the complementary function is
yc (x) = A cos x + B sin x
and we look for a particular solution in the form
yp (x) = k1 (x) cos x + k2 (x) sin x,

where the functions k1 (x) and k2 (x) are subject to the conditions (see the lecture
notes)
k10 cos x + k20 sin x = 0
(k10 sin x + k20 cos x) = sin x.
From the first condition we have
sin x
k10 = k20
.
cos x
Thus, the second condition gives:
 2

sin x
1
0
k2
+ cos x = k20
= sin x.
cos x
cos x
Hence,
k20 =

cos x sin x

and

k10 =

sin2 x
.

Integrate k10 and k20 :



Z
Z 
1
1
1
1 cos 2x
1
2
k1 (x) =
sin x dx =
dx = x + 2 sin 2x + c1

2
2
4
Z
1
1
k2 (x) =
sin x cos x dx =
sin2 x + c2 .

2 2
Thus, a particular solution of the ODE can be written as


1
1
1
yp (x) = x + 2 sin 2x cos x + 2 sin3 x.
2
4
2
This expression for yp (x) can be simplified using trigonometric relations
sin 2x = 2 sin x cos x
sin2 x + cos2 x = 1.
1
1
1
1
(x cos x + sin x) .
yp (x) = x cos x+ 2 sin x cos2 x+ 2 sin3 x =
2
2
2
2 2
Therefore, the general solution is
1
y(x) =
(x cos x + sin x) + A cos x + B sin x
2 2
and its first derivative is

1
cos x + 2 x sin x + cos x A sin x + B cos x,
y 0 (x) =
2
2
where A and B are constants to be determined using the boundary conditions.
From y(0) = 0 we find that A = 0 and from y 0 (0) = 0 we find that B = 0. Thus,
the solution is
1
y(x) =
(x cos x + sin x) .
2 2

(b) Check that y1 (x) = x and y2 (x) = x2 are solutions of the homogeneous
equation:
x2 y100 2xy10 + 2y1 = 0 2x + 2x = 0
x2 y200 2xy20 + 2y2 = 2x2 4x2 + 2x2 = 0

A particular solution of the non-homogeneous equation is represented as


yp (x) = k1 (x)x + k2 (x)x2 ,
where k1 (x) and k2 (x) need to be determined from the conditions (see lecture
notes)
i.e.,
k10 x + k20 x2 = 0
k10 y1 + k20 y2 = 0
f (x)
x ln x
ln x
k10 y10 + k20 y20 =
i.e.,
k10 + k20 2x =
.
=
a2 (x)
x2
x
From the first condition we have
k10 = k20 x
and, therefore, the second condition becomes
k20 x + k20 2x = k20 x =

ln x
.
x

Thus,
k20 =
Integrate k10 :

ln x
x2
Z

k1 =

and
ln x
dx =
x

Z
ln x d(ln x) =

k10 =

ln x
.
x

1 2
ln x + c1 .
2

Integrate k20 :
Z
Z
1
1
1
1
1
1
k2 =
ln x dx = ln x +
dx = ln x + c2 = (ln x + 1) + c2
2
2
x
x
x
x
x
x
Thus, a particular solution of the non-homogeneous ODE is
x
x
yp (x) = k1 x + k2 x2 = ln2 x x(ln x + 1) = ln2 x x ln x x
2
2
and the general solution is (use the fact that x is a solution of the homogeneous
ODE)
x
y(x) = ln2 x x ln x + Ax + Bx2 ,
2
where A and B are arbitrary constants.

(3) Properties of the function.


(a) Evaluate
Z

(5x 2)(2 x)dx.


0

(b) Generalised function (x) is equal to zero for x < a and 1 for x a, where
a > 0. Express the first derivative of the function using the Dirac function.
(c) Show that for m n (m and n are non-negative and integer), the generalised
function xm (n) (x), where (n) (x) is the nth derivative of the function satisfy
xm (n) (x) = (1)m

Solution.
(a)
Z 3
Z
(5x 2) (2 x) dx =
0

n!
(nm) (x).
(n m)!

f (x) (2 x) dx = f (2) = 5 2 2 = 8

(b) Consider integral of the first derivative of the function (x) with the test
function f (x) and integrate it by parts:
Z +
Z +
Z +
0
+
0
f 0 (x) dx = f (x)|
f (x) (x) dx = f (x)(x)|
f (x) (x) dx = (00)
a = f (a).

The right hand side is also given by


Z +
f (x) (x a) dx = f (a).

Compare the left hand side integrals and observe that


0 (x) = (x a).

(c) We need to demonstrate that for any well-behaved (see lecture notes) test
function f (x) the following relation holds
Z b
Z b
n!
m (n)
m
f (x)x (x) dx = (1)
f (x) (nm) (x) dx,
(n

m)!
a
a
where lower and upper limits a and b are such that the test function and all of its
derivatives are zero at least at these points and everywhere outside domain (a, b).

Let us first evaluate the integral in the right hand side:


Z
Z
Z
0
(nm+1)
1
(nm)
(nm+1)
b
(x) dx = (1)
f 0 (x) (nm+1) (x) dx.
f (x)
(x) dx = f (x)
(x)|a f (x)
Performing this procedure n m times gives
Z
Z
(nm)
nm
f (x)
(x) dx = (1)
[f (x)](nm) (x) dx = (1)nm f (nm) (0).
To evaluate the integral on the left, first define
g(x) = xm f (x)
and perform the integration by parts n times:
Z b
Z b
Z b
m (n)
(n)
n
f (x)x (x) dx =
g(x) (x) dx = (1)
[g(x)](n) (x) dx = (1)n g (n) (0).
a

a
th

Now let us calculate the n


(n)

[g(x)]

derivative of the function g(x):


(n)

= [x f (x)]

k=n
X
k=0

n!
[xm ](k) [f (x)](nk)
k!(n k)!

and evaluate its value at the point x = 0 for each of the terms of this sum. Consider
three cases:
1) Terms with k < m have a factor of xmk , which turns to zero when x = 0.
2) The only term with k = m is
n!
[xm ](m) [f (x)](nm) .
m!(n m)!
Since
[xm ](m) = m[xm1 ](m1) = m(m1)[xm2 ](m2) = ... = m(m1)(m2)...21 = m!,
we have

n!
n!
[xm ](m) [f (x)](nm) =
[f (x)](nm)
m!(n m)!
(n m)!
3) Terms with k > m turn to zero by the differentiation rule of xm .
Thus, at x = 0
n!
g (n) (0) =
f (nm) (0).
(n m)!
Finally, compare the LHS and RHS of the original equality:
Z b
n!
LHS =
f (x)xm (n) (x) dx = (1)n g (n) (0) = (1)n
f (nm) (0)
(n

m)!
a
Z b
n!
n!
m
RHS = (1)
f (x) (nm) (x) dx = (1)m
(1)nm f (nm) (0)
(n m)! a
(n m)!
and find LHS=RHS.

(4) ODE: Greens functions. Use the method of the Greens function to solve
(a) the non-homogeneous equation
y 00 (x) + 2 y(x) = ex

where y(0) = y 0 (0) = 0 and 0 x < ;

(b) the non-homogeneous equation


(x2 + 1)y 00 (x) 2xy 0 (x) + 2y = (x2 + 1)2 ,
for 0 x 1 and the boundary conditions y(0) = y(1) = 0, given that the solutions of the corresponding homogeneous equation are x and 1 x2 .
Solution.
(a) The ODE for the Greens function is
G00 (x, t) + 2 G(x, t) = (x t).
Find its solution in the form of f (t)y1 (x) + g(t)y2 (x), where y1 and y2 are the
solutions of the homogeneous equation y 00 + 2 y = 0. We will use y1 = cos x and
y2 = sin x.
Then, the Greens functions for x < t and x > t are
Gx<t (x, t) = A(t) cos x + B(t) sin x
Gx>t (x, t) = C(t) cos x + D(t) sin x
Use the boundary conditions and the continuity/discontinuity conditions to find
coefficients A(t), B(t), C(t), D(t). The boundary conditions
y(0) = 0

and

y 0 (0) = 0

G(0, t) = 0

and

G0 (0, t) = 0.

are satisfied if
Hence
Gx<t (0, t) = A 1 + B 0 = 0

and

G0x<t (0, t) = A 0 + B 1 = 0,

which means that A(t) = B(t) = 0.


The continuity condition at x = t is
C cos t + D sin t = 0,
which gives
C = D

sin t
.
cos t

The discontinuity condition at x = t is


 2

sin t
1
C sin t + D cos t = D
+ cos t = D
= 1.
cos t
cos t

10

Thus,
sin t
cos t
and
C=

and the only non-zero Greens function is


1
Gx>t (x, t) = (sin x cos t cos x sin t) .

Therefore, the solution of the original ODE is




Z x
Z x
1
t
t
sin t e dt
cos t e dt cos x
y(x) =
sin x

0
0
D=

To calculate the first integral, integrate it by parts twice. This gives



x 
x Z x
Z x
1 t
1 t
t
cos t e dt =
e sin t 2 e cos t
cos t et dt.

0
0
0
0
The integrals on the left and one the right are identical, hence, we can write
Z x

1
1
1
1
cos t et dt = ex sin x 2 ex cos x + 2 ,
1+ 2

0
which gives
Z

cos t et dt =


1
x
x
e
sin
x

e
cos
x
+
1
.
2 + 1

Exactly the same strategy is used to calculate the second integral:


Z x

1
sin t et dt = 2
ex cos x ex sin x + .
+1
0
Now we have everything to write y(x):
y(x) =

1 1
sin x (ex sin x ex cos x + 1)
2 +1
1 21+1 cos x (ex cos x ex sin x +

This expression is easily simplified into




1
1
x
y(x) = 2
e cos x + sin x .
+1

(b) Check that functions y1 = x and y2 = 1 x2 are solutions of the homogeneous


equation:
(x2 + 1) 0 2x + 2x = 0
(x2 + 1)(2) 2x(2x) + 2(1 x2 ) = 0
Find G(x, t) by solving inhomogeneous equation
(x2 + 1)G00 (x, t) 2xG0 (x, t) + 2G(x, t) = (x t),

11

where function G(x, t) has the form of f (t)y1 (x) + g(t)y2 (x). For this, let
Gx<t (x, t) = A(t)x + B(t)(1 x2 )
Gx>t (x, t) = C(t)x + D(t)(1 x2 )
and find coefficients A(t), B(t), C(t), D(t) using the boundary conditions and the
continuity/discontinuity conditions.
From the boundary conditions we obtain:
Gx<t (x = 0, t) = A 0 + B 1 = 0
Gx>t (x = 1, t) = C 1 + D 0 = 0.
Hence, B = C = 0.
From the continuity condition for G(x, t) at x = t:
Gx>t (x = t, t) Gx<t (x = t, t) = D(1 t2 ) At = 0.
Hence,
1 t2
.
t
From the discontinuity condition for G(x, t) at x = t:
A=D

G0x>t (x = t, t) G0x<t (x = t, t) = D2t A =

1
.
t2 + 1

After substituting for A:




 2

1 t2
1
2t + 1 t2
t2 + 1
D 2t +
= 2
,
= D
= D
t
t
t
t +1
from which we find
D=

t
(t2 + 1)2

and, therefore,
A=

t2 1
.
(t2 + 1)2

Thus, the Greens function is


t2 1
x
Gx<t (x, t) = 2
(t + 1)2
Gx>t (x, t) =

(t2

for x < t

t
(x2 1)
2
+ 1)

for x > t.

Now, find the solution y(x):


Z x
Z
y(x) =
Gx>t (x, t)f (t) dt +
0

Gx<t (x, t)f (t) dt,

12

where f (t) is the right hand side of the original non-homogeneous equation. Thus,
Z 1 2
Z x
t 1 2
t
2
2
2
(t + 1) dt + x
(t + 1)2 dt,
y(x) = (x 1)
2
2
2 + 1)2
(t
+
1)
(t
x
0
which simplifies into
x 
1

Z x
Z 1
Z 1
1 3
1 2
2
2
2
+ x t
[xt]1x ,
y(x) = (x 1)
t dt + x
t dt x
dt = (x 1) t
2
3
0
x
x
0
x
and gives
x4 x2 x x4
1
1
2
y(x) =

+
x + x2 = x4 + x2 x.
2
2
3
3
6
2
3

Вам также может понравиться