Lecture notes
Lecture notes
Intro to PDEs
Eigenfunction expansions for IBVPs
J. Wong (Fall 2020)
Topics covered
• Eigenfunction expansions for PDEs
Definition (modes) The n-th term of this series is sometimes called the n-th mode or
Fourier mode. I’ll use the word frequently to describe it (rather than, say, ‘basis function’).
1
Substitute into the PDE (1.1a) and use the fact that −φ00n = λn φ to obtain
∞
X
(c0n (t) + λn cn (t))φn (x) = 0.
n=1
By the fact the {φn } is a basis, it follows that the coefficient for each mode satisfies the ODE
Solving the ODE gives us a ‘general’ solution to the PDE with its BCs,
∞
X
u(x, t) = an e−λn t φn (x).
n=1
u(x, 0) = f (x).
u(x, 0) = f (x)
∞
X X∞
=⇒ cn (0)φn (x) = fn φn (x)
n=1 n=1
2
1.2 Long-time behavior
Note that every term in the solution (1.4) has a negative exponential (since all the eigenvalues
are positive). Furthermore, terms further down in the series decay much faster since λn grows
quadratically with n. It follows (informally) that
lim u(x, t) = 0
t→∞
independent of the initial condition f (x) (which just affects the bn ’s and not the eigenvalues).
Thus, the smallest eigenvalue of a non-zero term gives the (exponential) convergence rate.
Missing modes: However, suppose instead that f (x) = x − 1/2. Then we have
Z 1 Z 1
a1 = 2 (x − 1/2) sin πx dx = 0, a2 = 2 (x − 1/2) sin 2πx dx = −1/pi.
0 0
3
1.3 Example 2: no source, Neumann BCs
A variation - similar to Dirichlet, but with a crucial difference due to the zero eigenvalue.
Here we seek a solution u(x, t) to the IBVP
λn = n2 π 2 , φn = cos nπx, n = 0, 1, 2, · · ·
Note that λn = 0 is an eigenvalue, unlike the previous case. Regardless, the process is the
same and we end up with a solution (check this!)
∞
2 π2 t
X
u(x, t) = an e−n cos nπx
n=0
for constants an determined by the initial condition f (x). In terms of the basis,
∞
X hf, φn i
f (x) = fn φn (x), .
n=0
hφn , φn i
R1 1
f (x) cos nπx dx
Z
0
fn = R1 =2 f (x) cos nπx dx, n ≥ 1.
0
cos2 nπx dx 0
This gives the formulas for hte coefficients an in the solution since
∞
X ∞
X
u(x, 0) = f (x) =⇒ an φn = fn φ n .
n=0 n=0
4
1.4 Long-time behavior (Neumann)
The zero eigenvalue changes the t → ∞ limit. We have
∞
2 π2 t 2
X
u(x, t) = a0 + an e−n cos nπx = a0 + a1 e−π t cos πx + · · ·
n=1
or more abstractly,
u(x, t) = a0 φ0 (x) + a1 e−λ1 t φ1 (x) + · · ·
As t → ∞, every term with a negative exponential will vanish. However, the n = 0 term
does not!
Thus, the limit as t → ∞ exists (no terms grow!) and leaves only the n = 0 term:
We know the λ = 0 eigenfunction is just φ0 = 1 and we have a formula for a0 , which gives
The result here makes sense physically. The Neumann problem models heat flow in a closed
(insulated) container. Over time, the temperature will reach a (constant) equilibrium, and
that value is the average temperature.
5
2 The projection approach
We have seen that solutions to the heat equation are actually a superposition of single
mode solutions
cn (t)φn (x)
where cn (t) is governed by a (scalar) ODE. This perspective can be used to guide the solution
procedure. Let’s go through the procedure for solving the heat equation, but using the idea
of projecting onto each mode. Recall that
hf, φn i
f→ = coefficient of the φn component of f .
hφn , φn i
That is, this ‘projection’ selects the coefficient of the n-th mode.
In particular, we’ve defined cn (t) as the coefficient of the n-th mode of u. From here, we can
project, and then only have to solve one-dimensional problems (simple ODEs)!
First, project the PDE by taking the ‘projection’ onto the φn component:
h·, φn i
projφn (·) →
hφn , φn i
We calculated before, using the series, that
projφn (ut ) = c0n (t), projφn (uxx ) = −λn cn
Then for the PDE, we get
projφn (PDE) =⇒ c0n (t) = −λn cn
and for the IC,
hf, φn i
projφn (IC) =⇒ cn (0) = = φn coefficient of f .
hφn , φn i
Thus, the coefficient of the n-th mode evolves according to the IVP
c0n + λn cn = 0, cn (0) = φn coefficient of the IC.
After solving for each mode, we take the superposition to get the full solution.
6
2.1 Single mode solutions
This principle tells us that for the full problem
ut =uxx , x ∈ (0, 1), t > 0
u(0, t) = 0, u(1, t) = 0,
u(x, 0) = f (x).
each mode
un (x, t) = cn (t)φn (x)
solves a ‘projected’ IBVP
(un )t = (un )xx ,
un satisfies the BCs (IBVPn )
un (x, 0) = fn φn
i.e. it solves the heat equation where the ‘input’ (initial condition) is just the n-th mode of
the full IC.
By taking the superposition of the solutions to these projected IBVPs, we get the solu-
tion to the full one (since the ICs superimpose to give f (x)).
This principle means that if there is only one mode in the inputs, then the solution will
also have only one mode. For a simple example, consider
ut =uxx + 4 sin 2x, x ∈ (0, π), t > 0
u(0, t) = 0, u(π, t) = 0,
u(x, 0) = 2 sin 2x.
The eigenfunctions are φn = sin nx for n ≥ 1. Both the source and IC only have a φ2 term.
To be explicit, we have
(
X 2 n=2
u(x, 0) = 2φ2 = fn φn , fn = .
n≥1
0 n 6
= 2
It follows that only the n = 2 mode of the solution is non-zero (all the other projected
problems have un = 0 as their solution), so
u(x, t) = c2 (t)φ2 (x).
Indeed, plugging this into the PDE we find that
c02 (t) = −λ2 c2 (t) + 4, c2 (0) = 2 =⇒ c2 = 1 + e−4t .
No other terms need to be solved for (cn (t) = 0 for n 6= 2). The solution is simply
u(x, t) = (1 + e−4t ) sin 2x.
Just to be sure - projection onto the other modes gives
c0n (t) + λn cn (t) = 0, cn (0) = 0 for n 6= 2
whose solution is just cn (t) = 0. Thus, only the φ2 term of the solution is non-zero.
7
3 Procedure for the eigenfunction method
The procedure for the heat equation will extend nicely to a variety of other problems. For
now, consider an initial boundary value problem of the form
ut = −Lu + h(x, t), x ∈ (a, b), t > 0
hom. BCs at a and b (3.1)
u(x, 0) = f (x)
We seek a solution in terms of the eigenfunction basis
X
u(x, t) = cn (t)φn (x)
n
by finding simple ODEs to solve for the coefficients cn (t). This form of the solution is called
an eigenfunction expansion for u (or ‘eigenfunction series’) and each term cn φn (x) is a
mode (or ‘Fourier mode’ or ‘eigenmode’).
Part 1: find the eigenfunction basis. The first step is to compute the basis. The
eigenfunctions we need are the solutions to the eigenvalue problem
Lφ = λφ, φ(x) satisfies the BCs for u. (3.2)
By the theorem in ??, there is a sequence of eigenfunctions {φn } with eigenvalues {λn } that
form an orthogonal basis for L2 [a, b] (i.e. one with all the required properties).
If possible, we compute solutions explicitly via the standard procedure. Note that the BCs
imposed on the eigenvalue problem must be homogeneous.
Now at each fixed time t, the function u(x, t) is a function of x defined on [a, b]. It fol-
lows that there are coefficients cn (t) such that
X
u(x, t) = cn (t)φn (x). (3.3)
n
For each t,{cn (t)} is the set of coefficients for expressing u(x, t) in terms of the basis {φn }.
Part 2: get ODEs for the coefficients: Our objective now is to reduce the problem
to ODEs for coefficients cn (t). The order of steps can be changed here.
Step 2a (Write known functions in the basis): We express every known function
in the problem (PDE and ICs) in the eigenfunction basis using the orthogonality formula.
In this case, there are two such functions, the source term and the initial condition:
X hf, φn i
f (x) = fn φn (x), fn = , (3.4)
n
hφn , φn i
∞
X hh(x, t), φn (x)i
h(x, t) = hn (t)φn (x), hn (t) = . (3.5)
n=0
hφn , φn i
8
Rb
Here hf, gi = a f (x)g(x) dx is the L2 inner product in x. Note that in (3.5), the t-variable
is not part of the integral, which sometimes simplifies things e.g.
Z b
h(x, t) = tx =⇒ hh, φn i = t xφn (x) dx.
a
Step 2b (Plug series in to the PDE): We now ‘plug the series in’ to the PDE - which
expands the PDE in terms of the eigenfunction basis. Taking this one part at a time1 ,
!
∂ X
ut = cn (t)φn (x)
∂t n
X
0
= cn (t)φn (x), (t-derivs. only act on coeffs.)
n
X
Lu = cn (t)Lφn
n
X
= λn cn (t)φn (x) (φn is an eigenfunction)
n
ut = −Lu + h(x, t)
X X X
=⇒ c0n (t)φn (x) = − λn cn (t)φn (x) + hn (t)φn (x).
n n n
Since {φn } is a basis, the coefficients on each side are equal term-by-term. Or, write
X X
(c0n (t) + λn cn (t) − hn (t))φn (x) = 0 = 0 · φn
n n
Next, you can solve the ODE for each n. Note that sometimes, this will involve some case
work (as we saw with Fourier series).
We now have a solution to the PDE with the BCs in the form
X
u(x, t) = cn (t)φn (x)
n
9
in terms of the basis by plugging in the solution for u and the series for f to get
X X
cn (0)φn (x) = fn φn (x)
n
cn (0) = fn . (3.7)
Note: Alternately, you could wait to solve the ODE, then solve (3.6) with (3.7) together:
as an initial value problem (sometimes easier, since you don’t need to first find the general
solution to the ODE).
Finally, you need to clearly state the solution, collecting the results. A reasonable state
would be something like the following:
λn = (nπ/L)2 , φn = sin(nπx/L)
and fn is given by Z L
2
fn = x3 sin(nπx) dx.
L 0
Note that it is often best to leave expressions in terms of explicit integrals like fn above.
There’s no reason to simplify that integral, unless you really need the numbers.
10
4 Separation of variables
For homogeneous problems, we can exploit this independence to obtain solutions quickly.
Not that what follows is a useful computational trick, and is justified because of the
theoretical framework of eigenfunctions.
We know that the solution will be an infinite sum of terms (modes) of a certain form. Let
us guess a separated solution
u(x, t) = F (t)G(x).
Plug into the PDE to get
F 0 (t)G(x) = F (t)G00 (x).
Now separate variables, putting all the x’s on one side:
The left side is independent of x and the right side is independent of t. Thus, both must
equal the same constant (chosen to be −λ, knowing it will be the eigenvalue):
so we should require
G(0) = G(π) = 0.
This gives a pair of ODEs, linked by a shared constant, one of which has BCs:
The problem for G is the eigenvalue problem (for the operator Lu = −uxx ) with solutions
11
This sets the possible constants. Now for each constant λn , solve for F :
λn =⇒ Fn = bn e−λn t .
the full solution is then a superposition of the separated solutions (the theory for the eigen-
function basis is required to verify this claim is true):
∞
X
u(x, t) = un (x, t).
n=1
Finally, apply the initial conditions to get the constants bn (same as before).
Both methods seek solutions for each component/mode, e.g. cn (t)φn (x) for the heat
equation. For SoV, we solve for both cn (t) and φn (x) at once, obtaining a full solution to
the PDE/BCs for each n. Then, they are added together.
For eigenfunction expansion, We find the eigenfunctions, and write the full solu-
tion u(x, t) as a superposition of components cn (t)φn (x). The cn ’s are still unknown! Then,
we project onto each component and solve for the cn ’s.
The method works on some other homogeneous PDEs, as long as tehy can be separateed.
Consider the PDE/BCs
ut = uxx + ux + (t + 1)u
u(0, t) = 0, u(1, t) + ux (1, t) = 0
The PDE is homogeneous, so we can proceed with SoV. Plug in u = F (t)G(x) to get
F 0 (t) G00 + G0
= + (t + 1).
F (t) G
F 0 (t) G00 + G0
=⇒ − (t + 1) = = −λ.
F (t) G
12
Now plug into the BCs:
F 0 = −(λ + t + 1)F
G00 + G0 = −λG, G(0) = G(1) + G0 (1) = 0.
The Gn ’s are the eigenfunctions and the problem for G(x) is the eigenvalue problem.
To use the eigenfunction method, we first need to identify the eigenvalue problem. SoV
is still useful here! The homogeneous problem for the PDE/BCs is
13
and boundary conditions G(0) = G(π) = 0. The equation for G is
G00 = −λG, G(0) = G(π) = 0,
the eigenvalue problem. The operator here (LG = λG) is then
d2
L=−
dx2
as before (you would lose the minus sign depending on the sign in (4.1)).
Now, we go back to the full problem and use eigenfunction expansion. We now know
that the eigenfunctions/eigenvalues are
φn = sin nx, λn = n2 , n = 1, 2, 3, · · · .
so expand the solution as
∞
X
u(x, t) = cn (t)φn (x)
n=1
and expand the inhomogeneous term as
∞
x
X hex , φn i
e = hn φn , hn = .
n=1
hφn , φn i
Important note: SoV used to identify the operator L and the eigenvalue problem for use
with the eigenfunction method when this is not clear. This is because the eigenfunctions for
the homogeneous problem are also the correct ones for inhomogeneous problems!
However, when solving the full inhomogenous problem, we do need to return the
eigenfunction expansion approach.
14
5 Wave equation
The wave equation, in one dimension, has the form
utt = c2 uxx
for u(x, t), where c is a constant. This is the fundamental equation for describing propagation
of (physical) waves e.g. elecromagnetic, seismic, sonic and so on. As with the heat equation,
the wave speed may vary in space. For a vibrating string with variable density ρ(x) and
tension T (constant), the displacement u(x, t) evolves according to the PDE
ρ(x)utt = T uxx .
(see e.g. the textbook for a derivation).
15
5.2 Solution (separation of variables)
Let’s solve this homogeneous problem using the full separation of variables procedure.
u = h(t)φ(x).
utt = c2 uxx
1 h00 (t) φ00 (x)
=⇒ =
c2 h(t) φ(x)
and conclude that both sides must be a constant (neither a function of x nor t):
1 h00 (t) φ00 (x)
= = −λ. (5.2)
c2 h(t) φ(x)
Then substitute into the BCs to get
Collecting (5.2), (5.3) together, we get an ODE for h(t) and an eigenvalue problem for φ(x):
hn = an cos ωn t + bn sin ωn t.
16
2) Full solution, ICs: The IBVP solution is a superposition of the separated solutions:
∞
X
u(x, t) = (an cos ωn t + bn sin ωn t)φn (x) (5.4)
n=1
(note that the an ’s and bn ’s from above were arbitrary to begin with, so no new coefficients
have to be introduced). This expression is the general solution to the PDE + BCs.
R`
where hf, gi = 0
f (x)g(x) dx is the L2 inner product in the interval. Similarly,
∞ `
hg, φn i
Z
X 2
g= gn φn , gn = = g(x) sin(nπx/`) dx
n=1
hφn , φn i ` 0
That is, the φn compoment of the solution sees only the φn compoment of the ICs. It’s easy,
then, to solve for the unknown coefficients in (5.4) (an is just fn and bn is gn ).
ωn = cnπ/`.
17
5.3 Solution via eigenfunctions
The procedure is similar to SoV. By whatever means, identify the appropriate operator L,
which here is
L = −d2 /dx2
and we need to solve
utt = −c2 Lu, x ∈ (0, `), t ∈ R
u(0, t) = 0, u(`, t) = 0, (5.5)
∂u
u(x, 0) = f (x), (x, 0) = g(x).
∂t
(the c2 can be put inside L but it is easier to keep L simple).
Next, everything is expanded in terms of the basis (u and the initial conditions f, g):
∞ ∞ ∞
X X X hf, φn i hg, φn i
u= cn (t)φn (x), f= fn φn , g= gn φn , fn = , gn =
n=1 n=1 n=1
hφn , φn i hφn , φn i
Last, we solve the ODEs for cn (t) (with the initial conditions above), same as in SoV.
2
R`
As before, hf, gi = 0
f (x)g(x) dx is the L2 inner product on [0, `].
18
5.4 Standing waves
The separated solutions (the eigenmodes) in the (PDE+BCs) solution (5.4) have the form
The frequencies
ω1 = cπ/`
is called the fundamental frequency, and the others (ωn = nω1 ) are multiples of it.
We have thus shown that, for the wave equation, the motion is a superposition of vibra-
tions at multiples of the fundamental frequency.
Notice that if you were to observe a string following the separated solution
you would a see the string vibrate with the shape of the eigenfunction, but with an amplitude
that oscillates in time (see below). These are standing waves, which you can easily observe
in a simple physics experiment.
Where is the wave? So far, it is not clear why the full solution describes a propagating
wave. With some effort we can show that the solution to the wave equation is really a
superposition of two superimposed waves traveling in opposite directions. Using
1 1 1
cos nct sin nx = (sin n(x + ct) + sin n(x − ct)) = hn (x + ct) + hn (x − ct)
2 2 2
we can rewrite the solution in the form F (x + ct) + G(x − ct) (D’Alembert’s formula).
This hints at key structure for the wave equation (propagation along characteristics) that
is outside of the scope of the eigenfunction method; we will not pursue it here.
19
6 Example: plucking a string
A string of length ` = 1 from a guitar or harp is plucked. The initial speed ut (x, 0) = 0 and
the displacement will a triangular shape like
(
x 0 ≤ x < 1/2
f = 2A ·
1 − x 1/2 < x < 1
where A is the initial displacement at x = 1/2. Plugging this f into the solution (??) (with
initial velocity g = 0), we find that the response of the string is
∞
X
u(x, t) = fn cos(ωn t)φn (x), ωn = cnπ, φn = sin(nπx).
n=1
The string vibrates with only odd multiples of the fundamental frequency (in music
terms: the odd harmonics), and the higher frequencies have amplitudes that decay like 1/n2 .
Further, note that the solution does not look smooth - it is comprised of two waves that
move left/right, but retains the sharp corners of the initial pluck more on this later!).
t=1.150 t=0.380
1 1
0.5 0.5
0 0
-0.5 -0.5
-1 -1
0 0.5 1 0 0.5 1
Figure 1: Left: solution and initial condition (dashed). Right: solution and its two waves
hn (x ± ct) (red and blue) as defind in box on previous page.
20
6.1 With a source term (tuning the string)
Consider a string of length π, fixed at both ends at take c = 1 for simplicity. The system
starts at rest, and is then driven by some external force
Imagine that we are free to control the input frequency W . By ‘tuning’ this input, we can
see the eigenfunctions and eigenvalues by causing it to resonate! (Think like a tuning fork
used to tune a musical instrument).
First, let’s solve the IBVP using eigenfunctions. Note that there is an inhomogeneous term
(a ‘source’ or ‘forcing’ term, in other words), so separation of variabels alone cannot be used.
1) Get the eigenfunctions: To identify the eigenfunctions, drop the source term and
consider the homogeneous problem
with solutions
=⇒ φn = sin nx, λn = n2 , n ≥ 1.
Thus, the PDE should be viewed as
and the basis used is the basis of eigenfunctions for L with the given BCs.
Now, because the full problem has a forcing term, we must stop and return to the eigen-
function method (instead of continuing with SoV).
2) solving the PDE (eigenfunction method): First, write the forcing term in the
eigenfunction basis by factoring out the t part and expanding s(x):
∞ π
hs, φn i
Z
X 2
forcing = A sin ωt sn φn (x), sn = = s(x)φn (x) dx (6.3)
n=1
hφn , φn i π 0
21
Now write the solution in terms of the eigenfunction basis,
∞
X
u(x, t) = hn (t)φn (x)
n=1
Plug the series for u and the forcing into the PDE to get
∞
X ∞
X ∞
X
a00n (t)φn (x) = hn (t)φ00n (x) + Asn sin ωt φn (x)
n=1 n=1 n=1
∞
X
=⇒ (h00n (t) + λn hn − Asn sin ωt)φn (x) = 0
n=1
Now for the initial conditions, plug the series for u in (or project onto φn ) to find that
(
0 = u(x, 0) =⇒ hn (0) = 0 for all n
.
0 = ut (x, 0) =⇒ h0n (0) = 0 for all n
Putting this together, the coefficient hn (t) of the n-th eigenmode solves
h00n (t) + n2 hn (t) = Asn sin ωt, hn (0) = h0n (0) = 0. (6.4)
With a bit more effort, we can solve the ODE to get an explicit solution. However, due to
the forcing term, some care is required (case work!).
Then the forcing is a multiple of φ2 so the solution (6.5) only has one non-zero eigenmode
(n = 2):
u(x, t) = h2 (t)φ2 (x).
Explicitly, we have that
22
whose solution, of course, is just hn (t) = 0. For the n = 2 eigenmode,
There are two cases to consider for undetermined coefficients. If W 6= 2, then the usual
guess c1 sin W t + c2 cos W t works for the particular solution. After solving the IVP (left as
an exercise), we get
1 W
W 6= 2 =⇒ h2 (t) = 2
(sin W t − sin 2t).
4−W 2
However, if W = 2 then sin W t is a homogeneous solution! instead, the particular solution
must be of the form
t(c1 sin W t + c2 cos W t)
and again, after solving the IVP, we get
1
W = 2 =⇒ h2 (t) = − t| cos 2t +(homogeneous part).
8 {z }
grows!
Now the undetermined coefficients procedure can be applied to each ODE and we find that
but
hn = (· · · )t cos nt + homogeneous part if W = n.
Here · · · denotes a constant you could find, and ‘homogeneous’ part is a sum of sin nt’s and
cos nt’s that just oscillates (does not grow).
23
Now the full solution has all the (odd) eigenmodes:
∞
X
u(x, t) = hn (t)φn (x).
n=1, n odd
• If W is not an odd integer, then there are no resonant eigenmodes. All the hn (t)’s stay
bounded, and just oscillate (at frequencies W and n).
• If W is an odd integer (W = N ), then there is one resonant eigenmode (φN ) and all
others stay bounded.
In this second case, because one term grows, it eventually takes over and becomes the
dominant term in the solution:
This means, in particular, that if the string is forced at one of the resonant frequencies,
If we force the string with frequency N , then wait a bit, the string will look like the eigen-
function φN (times some oscillating amplitude).
Thus, we are able to identify the eigenvalues and eigenfunctions by adjusting W to look
for each one! An example with W = 3 is shown below (note that the amplitude is changing
in time; in the plots shown, the snaphots are at times where the amplitude is not large).
t=80
0.5 t=1 0.5
0 0
t=10
-0.5 -0.5 t=10
t=20
0 1 2 3 0 1 2 3
24