Notes 10 DEs
Notes 10 DEs
the boundary value problem is a matter of finding the coefficients C1 and C2 to satisfy the
boundary conditions. However, unlike initial value problems, boundary value problems
may not have solution.
Example (Nonhomogeneous BVP) y ′′ + 4y = 0, y(0) = 2, y(π) = 0.
The general solution of y ′′ + 4y = 0 is given by y(x) = C1 cos 2x + C2 sin 2x, but no
such function can satisfy the boundary conditions:
71
72
The examples examples above show that in general, a BVP may have: (i) no solution,
(ii) a unique solution, or (iii) infinitely solutions.
Question: Can there be 3, or 4, or a finite number of solutions for such BVPs?
The answer is no. If φ(x) and ψ(x) are two solutions of the BVP
( ′′
y + p(x)y ′ + q(x)y = g(x)
, α≤x≤β
y(α) = y0 , y(β) = y1
may have
(i) no solution;
(ii) a unique solution φ(t), if the corresponding homogeneous BVP has only the
trivial solution;
(iii) infinitely many solutions; if the corresponding homogeneous BVP has non-
trivial solutions.
In the last case, the general solution of the nonhomogeneous BVP has the form y(x) =
φ(x) + h(x), where φ(x) is one particular solution of the nonhomogeneous BVP, and h(x)
is the general solution of the corresponding homogeneous BVP.
73
d2 y
If we let L[y] = − 2 , the equation can be expressed as L[y] = λy.
dx
In analogy with eigenvalues and eigenvectors of matrices, we called λ an eigenvalue
of the boundary value problem (*) if it has a non-trivial solution y(x) 6≡ 0.
The corresponding non-trivial solutions, will then be called the eigenfunctions of
the BVP.
Example The homogeneous BVP y ′′ + 3y = 0, y(0) = 0, y(π) = 0, has only the trivial
solution, and hence 3 is not an eigenvalue of the BVP (*).
√ √
In fact, if y(x) = C1 cos 3 x + C2 sin 3 x is a solution of the differential equation
with boundary conditions
√ √
y(0) = C1 = 0 and y(π) = C1 cos 3π + C2 sin 3π = 0
then C1 = C2 = 0, and therefore the trivial solution y(x) = 0 is the only solution of the
homogeneous BVP.
Example The homogeneous BVP y ′′ + 4y = 0, y(0) = 0, y(π) = 0 has non-trivial
solutions.
Consider y(x) = C1 cos 2t + C2 sin 2t, with boundary conditions
i.e., C1 = 0, and C2 can be any constant. Here the BVP has infinitely many solutions
y(x) = C2 sin 2x
C1 + C2 x if λ = 0
√ √
y(x) = C1 e− −λ x + C2 e −λ x if λ < 0
√ √
C1 cos λ x + C2 sin λ x if λ > 0
• Case (i) λ = 0.
Then y = C1 + C2 x can not vanish at two points y(0) = 0 and y(L) = 0, unless
C1 = C2 = 0. Only trivial solution: y(x) = 0.
74
n2 π 2
λ= , where n = 0, 1, 2, . . .
L2
n2 π 2
The eigenfunctions corresponding to λ = L2
are
nπx
y(x) = C sin
L
where C 6= 0 is an arbitrary constant.
Let’s see how one could solve some nonhomogeneous BVP by the superposition of
eigenfunctions.
Example Solve the following nonhomogeneous BVP:
Note that the function on the right hand side is a linear combination of the eigenfunctions
sin x, sin 2x, sin 7x of the BVP
(−b1 + 3b1 ) sin x + (−4b2 + 3b2 ) sin 2x + (−9b3 + 3b3 ) sin 3x = 3 sin x − 2 sin 2x + 7 sin 3x
y ′′ + λy = 0, y(0) = y(π) = 0
n
X
and f (x) = bn sin nx is a linear combination of the eigenfunctions of the corresponding
n=1
homogeneous BVP.
More generally, we may even consider the case of
Z (
L
mπx nπx 0 if m 6= n
cos sin dx =
−L L L L if m = n
Z (
L
mπx nπx 0 if m 6= n
sin sin dx =
−L L L L if m = n
Now, if f (x) is a sine/cosine series (with convergence assumed),
∞
a0 X mπx mπx
f (x) = + am cos + bm sin
2 L L
m=1
using the orthogonality conditions above, we can multiply cos nπx nπx
L , or sin L , to both
sides and then integrate to find the coefficients
Z L
1 nπx
an = f (x) cos dx, n = 0, 1, 2, . . .
L −L L
Z L
1 nπx
bn = f (x) sin dx, n = 1, 2, 3, . . .
L −L L
assuming that term by term integration is okay.
In general, the trigonometric series
∞
a0 X mπx mπx
+ am cos + bm sin
2 L L
m=1
77
thus obtained from a given function f (x) defined on −L ≤ x ≤ L is called the Fourier
series of f (x).
Generally speaking, after writing down the Fourier series of a function f (x), there is
a problem of convergence: is the series going to converge back to the function f (x) on the
interval −L ≤ x ≤ L ?
is
∞
L 2L X sin
(2n−1)πx f (x) if x 6= 0, ±nL
L
+ =
2 π 2n − 1 L if x = 0, ±nL
n=1
2
A function f (x) defined on the real line is called an even function, if f (−x) = f (x)
for any x. It is called an odd function if f (−x) = −f (x). It is a straightforward
calculation that
Z L
nπx nπx
f (x) even =⇒ f (x) sin odd =⇒ f (x) sin dx = 0
L −L L
and Z L
nπx nπx
f (x) odd =⇒ f (x) cos odd =⇒ f (x) cos dx = 0
L −L L
Thus we have
(i) If f (x) is even, periodic with period 2L, then its Fourier series is a Fourier cosine
series:
∞
a0 X nπx
f (x) ∼ + an cos
2 n=1
L
where Z L
2 nπx
an = f (x) cos dx
L 0 L
78
(ii) If f (x) is odd, periodic with period 2L, then its Fourier series is a Fourier sine
series:
∞
X nπx
f (x) ∼ bn sin
n=1
L
where Z L
2 nπx
bn = f (x) sin dx
L 0 L
Starting from a function f (x) on 0 < x < L, we can get either a Fourier Cosine, or
Sine series by:
(i) Extend f (x) as an even function of period 2π, which is always continuous:
(
x 0<x<π
f (x) =
−x −π < x < 0
Then Z (
π π n=0
2
an = x cos nxdx = 2((−1)n −1)
π 0 n2 π
n = 1, 2, . . .
∞
π 4X 1
f (x) = − cos(2n − 1)x
2 π (2n − 1)2
n=1
Noting that
1 1 1 1 1 1 1 1 1 1 1
+ + + + · · · = 1 + + + + · · · + + + + · · ·
12 22 32 42 4 22 32 42 12 32 52
we have π2
1 1 1 4 1 1 1
1+ + + + · · · = + + + · · · =
22 32 42 3 12 32 52 6
79
(ii) Extending f (x) as an odd function of period 2π, we have f (x) = x. Hence
Z
2 π 2 cos nπ 2(−1)n+1
bn = x sin nxdx = − =−
π 0 n n
∞
X 2(−1)n+1
f (x) ∼ sin nx
n
n=1
π 1 1 1
= 2 1 − + − + ···
2 3 5 7
∞
X (−1)n+1 1 1 1 π
=1− + − + ··· =
n=1
2n − 1 3 5 7 4
At a point of discontinuity, say x = π, we have
∞
f (π+) + f (π−) −1 + 1 X 2(−1)n+1
= =0= sin n(0)
2 2 n=1
n
y ′′ + 2y = x, y(0) = 0 = y(π)
∂2u ∂u
α2 = , 0 < x < L, t > 0
∂x2 ∂t
u(0, t) = 0, u(L, t) = 0, ,
u(x, 0) = f (x),
where f (x) is the initial temperature distribution in the rod. The constant α2 is called
the thermal diffusivity.
The idea of the method of separation of variables is to consider u(x, t) = X(x)T (t)
as a product of a function of x and a function of t. Putting u(x, t) into the heat equation,
we have
X ′′ 1 T′
α2 X ′′ (x)T (t) = X(x)T ′ (t) ⇐⇒ = 2·
X α T
Since the left hand side is a function of x, and the right hand side is a function of t,
both must be actually a constant function. Hence there is a constant −λ so that
(
X ′′ 1 T′ X ′′ + λX = 0
= 2· = −λ ⇐⇒
X α T T ′ + α2 λT = 0
When u(x, t) is not the zero function, the boundary conditions u(0, t) = X(0)T (t) = 0
and u(L, t) = X(L)T (t) = 0 imply the boundary conditions X(0) = 0, X(L) = 0.
′′
X + λX = 0
2
X(0) = X(L) = 0 and T = Ce−α λt
(from boundary condition)
Now, the boundary value problem for X(x) has non-trivial solutions X(x) = B sin nπx L
2 2
if and only if λ = nLπ2 , n = 1, 2, 3, . . ..
2 2 2 2
Hence for each n = 1, 2, 3, . . ., we have the basic solution un (x, t) = e−n π α t/L sin nπx
L
of the heat equation
∂2u ∂u
α2 2 =
∂x ∂t
Moreover, their infinite linear combinations
∞
X
u(x, t) = cn un (x, t)
n=1
will also satisfy the heat equation and the boundary condition u(0, t) = 0 = u(L, t).
81
Now we only need to choose suitable coefficients cn ’s so that u(x, t) will satisfy also
the initial condition
∞
X nπx
u(x, 0) = cn sin = f (x)
n=1
L
Example Solve the heat equation for 0 < x < 30, t > 0, under the given conditions:
Example Solve the heat equation for 0 < x < 30, t > 0, under the given nonhomoge-
neous boundary conditions:
The trick is to consider a solution of the steady-state temperature u(x, t) = v(x) (i.e.,
independent of time) which satisfies the non-homogeneous boundary conditions:
Here the boundary conditions ux (0, t) = 0 and ux (25, t) = 0 mean that there is no
heat flow at both ends of the bar.
• Since the boundary conditions are different, the boundary value problem for X(x)
is: (
X ′′ + λX = 0
, and T (t) = Ce−λt
X ′ (0) = 0 = X ′ (25)
n2 π 2
The eigenvalues are now λn = 252
, n = 0, 1, 2, . . ., with eigenfunctions cos nπx
25 .
At t = 0, we consider
∞
c0 X nπx
u(x, 0) = + cn cos = Fourier cosine series of x
2 n=1
25
i.e., Z 25
2 nπx
cn = x cos dx
25 0 25
• The solution is
∞
25 X 50[(−1)n − 1] −n2 π2 t/625 nπx
u(x, t) = + 2 2
e cos
2 n π 25
n=1
Let u(x, t) = X(x)T (t) again, and see what sorts of boundary value problems one
has to solve.
83
• Laplace Equations
For example, the steady-state heat conduction of a rectangular plate can be modeled
by:
uxx + uyy = 0
(0 < x < a, 0 < y < b)
u(x, 0) = 0, u(x, b) = 0 (0 < x < a)
u(0, y) = 0, u(a, y) = f (y) (0 < y < b)
Let u(x, y) = X(x)Y (y), and see what sorts of boundary value problems one has.
Roughly speaking, by letting u(x, t) = X(x)T (t) or u(x, y) = X(x)Y (y) respectively
for the two equations above, one would end up with different boundary value problems for
finding the ‘eigenfunctions’ Xn , Tn or Yn . Then the solution can be found by superposition
and Fourier expansion:
X X
cn Xn (x)Tn (t) or cn Xn (x)Yn (y)
Details of heat equations and Laplace equations are treated in courses on partial
differential equations, such as MATH4052.
d2
Example L=− with more general boundary conditions.
dx2
d2 y
L[y] = λy ⇐⇒ + λy = 0
dx2
ay(0) + by ′ (0) = 0 , 0≤x≤L
cy(L) + dy ′ (L) = 0
(assuming not all a, b, c, d are zero)
Here the boundary conditions mix the boundary values of y and y ′ together.
These are considered as ‘easy’ boundary value problems, simply because we know
exactly the general solution of the equation y ′′ + λy = 0, and hence can check easily
whether there are non-trivial solutions of the BVP.
Example Find all eigenvalues and eigenfunctions of the BVP
0 = y(π) + y ′ (π) = c2 π + c2 =⇒ c2 = 0
84
y(0) = 0 =⇒ c1 = 0
√ √ √
Hence y = c2 sin λx and y ′ = λc2 cos λx. The condition y(π) + y ′ (π) = 0 is then
√ √ √
c2 sin λπ + λc2 cos λπ = 0
√ √
λ = − tan λπ
By looking at the graph of the function f (x) = x and g(x) = − tan πx, we have the
rough estimate
(2n − 1)π p
< λn < nπ
2
and
(2n − 1)2 π 2
λn ≈ for large n
4
These are called the (regular) Sturm-Liouville Boundary Value Problems, which
quite often occur when solving PDEs with the method of separation of variables. They
are ‘hard’ in the sense that there is no general way to find the general solution of the
equation [p(x)y ′ ]′ − q(x)y + λr(x)y = 0.
However, the structure of the eigenvalues and eigenfunctions of such ’harder BVPs’
d2
is the same as the easier BVPs associated to L = − dx 2.
3. For each eigenvalue λn , there is an eigenfunction φn (x) whose scalar multiples gen-
erates all eigenfunctions with λn as eigenvalue. Moreover, φn has exactly n − 1 zero
in 0 < x < L.
85
where the infinite series converges to [f (x+) − f (x−)]/2 for every x in the interval
0 < x < L.
Nonhomogeneous BVPs
Eigenfunction expansion (generalized Fourier series) can be used to solve nonhomo-
geneous BVPs,
(
L[y] = µy + f (x)/r(x) ⇐⇒ −[p(x)y ′ ]′ + q(x)y = µr(x)y + f (x)
ay(0) + by ′ (0) = 0, cy(L) + dy ′ (L) = 0
h
1 d di
where µ is not an eigenvalue of L = − p(x) − q(x) .
r(x) dx dx
Similar to the Fourier series method, we can consider superposition of eigenfunctions
P P
y = an φn , and the eigenfunction expansion of f (x)/r(x) = cn φn . It is then straight-
forward to find
cn
an =
λn − µ
i.e., the solution of such a nonhomogeneous BVP can be expressed in terms of the eigen-
functions:
∞
X cn
y= φn (x)
λ −µ
n=1 n