You are on page 1of 24

# PARTIAL DIFFERENTIAL EQUATIONS

Mathematics Department
San Francisco State University

Contents

## 1. The Heat Equation 2

1.1. Homogeneous Boundary Conditions 2
1.1.1. Derivation of the Heat Equation 2
1.1.2. The Rayleigh Equation 4
1.1.3. Solving the Heat Equation with Homogeneous Boundary Conditions 7
1.1.4. Some Worked Examples 10
1.2. Inhomogeneous Boundary Conditions 12
1.2.1. Some Worked Examples 13
1.3. The Heat Equation in a Circular Ring 14
1.4. Orthogonality and Fourier Series 16
2. The Wave Equation 18
2.1. The Vibrating String 18
2.1.1. Solving the Wave Equation 19
2.1.2. D’Alembert’s Expression of the Solution 20
2.2. The Rectangular Membrane 23
2.3. The Circular Membrane and Bessel Functions 23
3. Laplace’s Equation 23
3.1. Laplace’s Equation on a Rectangle 23
3.2. Laplace’s Equation on a Disc 23
4. Fourier Transform 23
4.1. Introduction 23
4.2. Heat and Laplace’s Equation - Basic 23
4.3. Heat and Laplace’s Equation - Convolution Theorem 23

1
2

## 1.1. Homogeneous Boundary Conditions.

1.1.1. Derivation of the Heat Equation. Consider a thin rod, of length L, laterally insulated
with, possibly, an internal source of heat. We want to find a function u(x, t) that governs
the temperature distribution inside the rod.
Let the cross sectional area of the rod be A, the mass density be ρ and the specific heat
(the amount of heat needed to raise the temperature of one gram of substance by one degree)
be c. Then the heat density of the rod is given by ρcu. This means that the total heat energy
Q in a segment a ≤ x ≤ b is
Z b
a

## where Adx represents an infinitesimal unit of volume.

To calculate the rate of change of the heat energy, we simply take the time derivative of
the previous expression:

d b
Z
dQtotal
dt dt a
Z b
du
a dt
Z b
a

where we’ve used a subscript to indicate we are taking the derivative with respect to time.
Now consider Fourier’s Law, which gives us an expression for the thermal flux ϕ. Since
a functions increases most in the direction of its gradient, and thermal flux is a change in
temperature, ϕ is given by:

(1.3) ϕ = −K0 Ou

where K0 is a constant called thermal conductivity. If we want to find the thermal flux
along a specific direction, we need to tale the dot product of ϕ with the unit vector in that
direction.
PARTIAL DIFFERENTIAL EQUATIONS 3

In the case of our rod, if we ignore any internal sources of heat, we need to consider two
points at which heat is entering or leaving the system: x = a and x = b. At a, the unit
vector is +î, so we have, for a cross sectional area A, that:

## (ϕ · î)A = (−K0 Ou(a, t)) · îA

du
= (−K0 (a, t)î) · îA
dx
du
(1.4) = −K0 (a, t)A
dx
Similarly, at x = b we’ll have
du
(1.5) (ϕ · î)A = K0 (b, t)A
dx
The heat going into the system is the sum of 1.4 and 1.5. Thus:
 
dQin du du
= K0 A (b, t) − (a, t)
dt dx dx
Z b 2
du
= K0 A 2
(x, t)dx
a dx
Z b
(1.6) = K0 Auxx dx
a

## where we’ve made use of the Fundamental Theorem of Calculus.

The total change in the amount if heat is given by the sum of the heat going in and the
heat produced internally. Thus, combining equations 1.2 and 1.6, we have
Z b Z b Z b
a a a
Z b
A (ρcut − K0 uxx − Qsource ) dx = 0
a
Z b
(ρcut − K0 uxx − Qsource ) = 0
a
ρcut − K0 uxx − Qsource = 0
ρcut = K0 uxx + Qsource
K0 Qsource
ut = uxx +
ρc ρc
du d2 u
(1.7) = k 2 +q
dt dx
where k = K0 /ρc is called the thermal diffusivity and q = Qsource /ρc is usually set to zero.
We call this last expression the heat equation.
4 PARTIAL DIFFERENTIAL EQUATIONS

## 1.1.2. The Rayleigh Equation. The Rayleigh equation is of the form

(1.8) ϕxx + λϕ = 0

with a combination of the boundary conditions given by ϕ(0) = 0, ϕx (0) = 0, ϕ(L) = 0 and
ϕx (L) = 0. These boundary conditions are known as homogeneous, because they all equal
zero. The solution to the Rayleigh equation will be very useful is solving the heat equation,
so we’ll spend some time on it.
For a solution to exist, the value of λ must be both real and non-negative, as we shall see.
Let’s start with the differential equation −d2 /dx2 ϕ = λϕ with the appropriate boundary
conditions. Then:
Z L Z L
λ ϕϕ̄dx = (λϕ)ϕ̄dx
0 0
L
d2
Z  
= − 2 ϕ ϕ̄dx
0 dx
Z L
= − ϕxx ϕ̄dx
0
Z L
= − [ϕ̄ϕx ]L0 + ϕx ϕx dx after integration by parts
0
Z L
= ϕx ϕx dx due to any of our boundary conditions
0
Z L
= [ϕx ϕ]L0 − ϕϕxx dx after integrating by parts again
0
Z L
= − ϕϕxx dx
0
Z L
= ϕ−ϕxx dx
0
Z L
= ϕλϕdx
0
Z L
= λ̄ϕϕ̄dx
0
Z L Z L
λ ϕϕ̄dx = λ̄ ϕϕ̄dx
0 0
λ = λ̄ because ϕϕ̄ = |ϕ|2 ≥ 0
PARTIAL DIFFERENTIAL EQUATIONS 5

## therefore, λ must be real. The proof of λ ≥ 0 is left as an exercise.

In order to find a solution of the Rayleigh equation 1.8, let’s start with the λ = 0 case.
Then we’ll have ϕxx = 0, which means that ϕx is a constant. Therefore, our solution will be
of the form:

(1.9) ϕ = c1 + c2 x

## and the constants will be determined from the boundary conditions.

For the case when λ is not zero, let’s take a guess at a solution of the form ϕ = erx , so
that ϕx = rerx and ϕxx = r2 erx . Plugging this into the differential equation we find:

r2 erx + λerx = 0
(r2 + λ)erx = 0
r2 + λ = 0
r2 = −λ

r = ± λi

√ √
So we have found two solutions: e λix
and e− λix
. We know that any linear combination of
solutions is itself a solution, and since we can express sin x and cos x as linear combinations
of these solutions, the trigonometric functions are themselves solutions.
Furthermore, the Wronskian of these two solutions is never zero, so we can conclude that
every solution of the Rayleigh equation when λ > 0 is of the form
√ √
(1.10) A cos λx + B sin λx

To find the values of A and B, we need to make use of the boundary conditions. Since we
have four sets of boundary conditions, we’ll have four sets of values for the constants.
Case 1: First, let’s consider the case when ϕ(0) = 0 and ϕ(L) = 0. We had found that,
for λ = 0, the solution was given by equation 1.9, so:

ϕ(0) = c1 + c2 · 0 = 0 ⇒ c1 = 0

## and we have ϕ(x) = c2 x. We now use the second boundary condition:

ϕ(L) = c2 · L = 0 ⇒ c2 = 0

## so we conclude the case λ = 0 is not a solution with these boundary conditions.

6 PARTIAL DIFFERENTIAL EQUATIONS

Next we consider the case λ > 0 with the same boundary conditions. From the general
solution, eqn 1.10, we have:

ϕ(0) = 0
A cos 0 + B sin 0 = 0
A·1+B·0 = 0
A = 0
√ √
so now ϕ(x) = B sin λx and we can use the second boundary condition: B sin λL = 0.

Since B = 0 would give us a trivial solution (ϕ = 0), we need to require that sin λL = 0.
This means that:

λL = nπ for n ∈ N
 nπ 2
(1.11) λn =
L
which gives us a set of solutions
 nπ 
(1.12) ϕn (x) = sin x
L
Case 2: The second set of boundary conditions is ϕx (0) = 0 and ϕx (L) = 0. From
equation 1.9 and the B.C. we get:

ϕx (0) = c2 = 0 ⇒ ϕ(x) = c1

Since any multiple of a solution is itself a solution, we can choose any value for c1 . For
simplicity, we choose 1. Thus, we conclude that in this case λ = 0 is an eigenvalue with a
corresponding eigenfunction ϕ0 = 1.
The case when λ > 0 is left as an exercise. The solution is:
 nπ 2
(1.13) λn =
L
 nπ 
(1.14) ϕn (x) = cos x for n ∈ N
L
Case 3: Our third set of B.C. are ϕ(0) = 0 and ϕx (L) = 0.
The case λ = 0, using equation 1.9 and the B.C., results in

ϕ(0) = c1 + cc · 0 = 0 ⇒ c1 = 0
ϕx (L) = c2 · L = 0 ⇒ c2 = 0
PARTIAL DIFFERENTIAL EQUATIONS 7

## so λ = 0 is not an eigenvalue for these boundary conditions.

When λ > 0, equation 1.10 and the boundary conditions give us:

ϕ(0) = A cos 0 + B sin 0 = A = 0 ⇒ ϕ(x) = B sin λx
√ √ √ 2n − 1
ϕx (L) = λ cos λL = 0 ⇒ λL = π
2

## so the solution to the equation is given by:

 2
2n − 1
(1.15) λn = π
2L
 
2n − 1
(1.16) ϕn (x) = sin πx
2L

Case 4: The last boundary conditions are given by ϕx (0) = 0 and ϕ(L) = 0. This case is
left as an exercise. For these B.C., λ = 0 is not an eigenvalue and the other values of λ and
ϕ are given by:
 2
2n − 1
(1.17) λn = π
2L
2n − 1
(1.18) ϕn (x) = cos πx
2L

1.1.3. Solving the Heat Equation with Homogeneous Boundary Conditions. We are now ready
to solve equation 1.7 when there are no internal sources of heat and the boundary conditions
are homogeneous. That is, we want to solve:

## ut = kuxx with x ∈ [0, L], t > 0

(1.19) Boundary conditions: u(0, t) = 0, u(L, t) = 0
Initial condition: u(x, 0) = f (x)

In order to solve this, we will look for special, separable solutions of the form

## (1.20) un (x, t) = ϕn (x)Gn (t)

and take into account the fact that, if un and um are two solutions, then any expression of
the form cm um + cn un , where the c are constants, is also a solution (you can check that it
satisfies the PDE and the BCs).
8 PARTIAL DIFFERENTIAL EQUATIONS

Two find the separable solutions, we start by plugging equation 1.20 into the differential
equation. We find:

## (ϕn Gn )t = k (ϕn Gn )xx

ϕn (Gn )t = k(ϕn )xx Gn
(Gn )t (ϕn )xx
=
kGn ϕn
We can see that the left hand side of the equation is a function of t only, while the right
hand side is a function of x only. The only way the two sides can be equal for any values of
x and t is if they are both equal to a constant, which we will call −λn . Thus, we now have
two ordinary differential equations:

and

## (ϕn )xx = −λn ϕn

(1.22) (ϕn )xx + λn ϕn = 0

We can see right away that the solution to equation 1.21 is Gn (t) = e−λn kt and that
equation 1.22 is none other that the Rayleigh equation 1.8, for which we have already found
the solution. In this case, the boundary conditions are like in case 1, so the solutions are
like equation 1.12, with eigenvalues like in equation 1.11. Thus, the elementary solutions for
u(x, t) are:
 nπx  2
(1.23) un (x, t) = sin e−k(nπ/L) t
L
Next, we need to fit our solution to the initial condition u(x, 0) = f (x), where f (x) is
some given function. We know that any linear combination of elementary solutions is itself a
solution. Fourier’s idea was that an infinite sum of certain functions (trigonometric functions,
for example) can equal any given function:

X  nπx 
(1.24) f (x) = Bn sin
n=1
L

where we need to find the values of the Bn . To understand how to do this, let’s think about
vectors first.
If e~1 , e~2 and e~3 form an orthogonal basis of a vector space, we know that we can express
any vector in the space as ~v = B1 e~1 +B2 e~2 +B3 e~3 . To find the value of each of the coefficients,
PARTIAL DIFFERENTIAL EQUATIONS 9

## ~v  e~1 = B1 e~1  e~1 + B2 e~2  e~1 + B3 e~3  e~1

= B1 |e~1 |2 + B2 · 0 + B3 · 0
= B1 |e~1 |2
~v  e~1
B1 =
|e~1 |2
Similarly, to find the values of the Bn in equation 1.24, we need to calculate the inner product
between the function f (equivalent to the vector ~v ) and the elementary functions (equivalent
to the basis vectors e~n ). But first, we need to make sure that our elementary functions form
an orthogonal basis. Let us define the inner product between functions as:
Z L
f g = f (x)g(x)dx
0

To show that the trigonometric functions form an orthogonal basis, we need to show that
the inner product of any two of them is zero, unless both functions are the same. Indeed,
Z L  nπx   nπx  Z L  nπx 
sin sin dx = sin2
0 L L 0 L
Z L  
1 2nπx
= 1 − cos dx
0 2 L
Z L
L 2nπx
= − cos dx
2 0 L
 L
L L 2nπx
= − sin
2 2nπ L 0
L
=
2
and, for n 6= m,
Z L  nπx   mπx  Z L h 
1 nπx mπx   nπx mπx i
sin sin dx = cos − − cos + dx
0 L L 0 2 L L L L
1 L
Z  
(n − m)πx (n + m)πx
= cos − cos dx
2 0 L L
 L
1 L (n − m)πx L (n + m)πx
= sin − sin
2 (n − m)π L (n + m)π L 0
= 0

And we have also found that the norm of the elementary functions is L/2.
10 PARTIAL DIFFERENTIAL EQUATIONS

Thus, continuing with our analogy with the vectors, the value of each Bn is going to be
given by the inner product of f (x) with the corresponding elementary function, divided by
the norm, L/2. Therefore, the solution to the heat equation with homogeneous boundary
conditions and an initial temperature distribution f (x) is,

X nπx −k(nπ/L)2 t
(1.25) u(x, t) = Bn sin e
n=1
L

## where the Bn are given by

Z L
2 nπx
(1.26) Bn = f (x) sin dx
L 0 L
1.1.4. Some Worked Examples. First of all, we will show that if we had had boundary
conditions for which the solution was a cosine function rather than a sine (equation 1.18),
the inner products would still be 0 and L2 . Obviously, it is very similar to the sine case.
(m − 21 )πx (m − 21 )πx (m − 21 )πx
Z L Z L
cos cos dx = cos2 dx
0 L L 0 L
1 L 2(m − 12 )πx
Z  
= 1 + cos dx
2 0 L
 L
L 1 L (2m − 1)πx
= + sin
2 2 (2m − 1)π L 0
L
=
2
and for n 6= m we have,
(m − 12 )πx (n − 12 )πx
Z L
cos cos dx =
0 L L
(m − 12 )πx (n − 12 )πx (m − 12 )πx (n − 12 )πx
Z L     
1
cos − + cos + dx =
0 2 L L L L
1 L
Z  
(m − n)πx (m + n − 1)πx
cos + cos dx =
2 0 L L
 L
1 L (m − n)πx L (m + n − 1)πx
sin + sin =0
2 (m − n)π L (m + n − 1)π L 0
P
So we can conclude that if our initial condition is f (x) = Cn cos((n − 1/2)πx/L), we can
find the Cn by
L
(m − 21 )πx
Z
2
(1.27) Cn = f (x) cos dx
L 0 L
PARTIAL DIFFERENTIAL EQUATIONS 11

## Example 1: Let f (x) = 100. Then the Cn will be:

L
(n − 12 )πx
Z
2
Cn = 100 cos dx
L 0 L
L
(n − 12 )πx

200 L
= sin
L (n − 12 )π L 0
400 1
= sin(n − )π
(2n − 1)π 2
400
= (−1)n+1
(2n − 1)π

Example 2: Let f (x) = −13 cos( 32 πx/L) + 7 cos( 29 πx/L). We can see that these have
the same form as the elementary solution, with n = 2 and n = 5 respectively. This means
that we know what the result of the integral in equation 1.27 will be: 0 if n 6= 2 and n 6= 5,
−13L/2 if n = 2 and 7L/2 if n = 5. Thus, the values of the Cn are:

 −13 if n = 2

Cn = 7 if n = 5

0 otherwise

## Example 3: Let L = 1 and f (x) = 400x(1 − x). Then,

2 L (n − 12 )πx
Z
Cn = 400x(1 − x) cos dx
L 0 L
Z 1
(2n − 1)πx
= 2 400x(1 − x) cos dx
0 2
Z 1
(2n − 1)πx
= 800 (x − x2 ) cos dx
0 2
"  2
2 2 (2n − 1)πx 2 (2n − 1)πx
= 800 (x − x ) sin + (1 − 2x) cos
(2n − 1)π 2 (2n − 1)π 2
 3 #1
2 (2n − 1)πx
+2 sin
(2n − 1)π 2
0
" 2  3 #
2 2 (2n − 1)π
= 800 +2 sin
(2n − 1)π (2n − 1)π 2
 
−4 16
Cn = 800 2
+ 3
(−1)n+1
((2n − 1)π) ((2n − 1)π)
12 PARTIAL DIFFERENTIAL EQUATIONS

## Example 4: Let f (x) be defined as

1 when 0 ≤ x ≤ L
2
f (x) =
2 when L ≤ x ≤ L
2

## Then the Cn will be

2 L (n − 12 )πx
Z
Cn = f (x) cos dx
L 0 L
"Z #
L/2 Z L
2 (2n − 1)πx (2n − 1)πx
= cos dx + 2 cos dx
L 0 2L L/2 2L
 L/2  L
2 2L (2n − 1)πx 2 2L (2n − 1)πx
= sin + 2 sin
L (2n − 1)π 2L 0 L (2n − 1)π 2L L/2
4  π  8 h  π   π i
= sin (2n − 1) + sin (2n − 1) − sin (2n − 1)
(2n − 1)π 4 (2n − 1)π 2 4
 
4 2 n−1
= 2(−1)n+1 − √ (−1)trunc( 2 )
(2n − 1)π 2
where trunc is the function that truncates a non-integer to its nearest lower integer.

1.2. Inhomogeneous Boundary Conditions. If the boundary conditions are not all zero
(that is, they are not homogeneous), then we can’t use the solutions to the Rayleigh equation
to solve the heat equation. However, we can make use of the steady state solution to solve
it.
The steady state is the function towards which u(x, t) tends as t → ∞. Thus, we know that
wt = 0. Since w(x) is an instance of u(x, t), it should also satisfy the differential equation,
which, since the time derivative is zero, would be kwxx = 0. The solution is therefore very
simple: w is a linear funtion w(x) = Ax + B.
Next, we can define v(x, t) = u(x, t) − w(x). Since w(x) has the same boundary conditions
as u(x, t), we can see that the boundary conditions of v(x, t) would in fact be homogeneous:
v(0, t) = u(0, t) − w(0) = 0 and v(L, t) = u(L, t) − w(L) = 0. Furthermore, v satisfies the
differential equation:

## (v + w)t = k(v + w)xx

vt + wt = kvxx + kwxx
vt + 0 = kvxx + k · 0
vt = kvxx
PARTIAL DIFFERENTIAL EQUATIONS 13

so we know how to find a solution for v. Finding u would then simply consist of adding v
and w.

1.2.1. Some Worked Examples. Example1: Let’s study this with an example. Let u(0, t) =
−23, u(L, t) = 59 and u(x, 0) = 100. We know that w is of the form Ax + B and we can use
the boundary conditions to find A and B:

## w(0) = A · 0 + B = −23 ⇒ B = −23

82
w(L) = AL − 23 = 59 ⇒ A =
L
82
So now our steady state is w(x) = L
x − 23.
From our previous work, we know that the solution for v(x, t) is like equation 1.25, where
the Bn are given by equation 1.26. This means that, in order to find the Bn we need to first
find the initial condition function f (x). From the definition of v we see that:

82 82
v(x, 0) = u(x, 0) − w(x) = 100 − x + 23 = 123 − x
L L

## Thus, the Bn will be

Z L  
2 82 nπx
Bn = 123 − x sin dx
L 0 L L

## Finally, u is simply u(x, t) = v(x, t) + w(x).

Example 2: Now let ux (0, t) = 7 and u(L, t) = 137 with u(x, 0) = 100, as before.
We can use the boundary conditions to find w(x):

wx = A ⇒ A = 7
w(L) = 7L + B = 137 ⇒ B = 137 − 7L
w(x) = 7x + (137 − 7L)

In this case, our boundary conditions for v are vx (0, t) = 0 and v(L, t) = 0, so the solution
will be a combination of equation 1.18 with the corresponding time part. The initial condition
is

## v(x, 0) = u(x, 0) − w(x) = 7L − 37 − 7x

14 PARTIAL DIFFERENTIAL EQUATIONS

## Thus, the solution for v is:

X (2n − 1)πx −k( (2n−1)π 2
)t
v(x, t) = An cos e 2L

n=1
2L
2 L (2n − 1)πx
Z
An = (7L − 37 − 7x) cos dx
L 0 2L
148(−1)n 56L
= +
(2n − 1)π (2n − 1)2 π 2
and since u = v + w, our final answer is
∞ 
148(−1)n
 
X 56L (2n − 1)πx −k( (2n−1)π )
2
t
u(x, t) = + 2π2
cos e 2L + 7x + (137 − 7L)
n=1
(2n − 1)π (2n − 1) 2L

Example 3: Our boundary conditions are now ux (0) = 13 and ux (L) = 13 and the initial
condition is as before.
To determine w, we can see that A = 13, since wx = A, but there is no way to determine
the value of B. We choose to make B = 0, because, as we’ll see later, the true value of the
steady state solution will show up anyway as a constant term in the solution of v(x, t).
The initial condition for v will be v(x, 0) = u(x, 0) − w(x) = 100 − 13x, so the solution
will be, following equations 1.14 and 1.26:

X nπx −k( nπ
L )
2
t
v(x, t) = A0 + An cos e
n=1
L
Z L
1
A0 = (100 − 13x)dx
L 0
L
= 100 − 13
2
Z L
2 nπx
An = (100 − 13x) cos dx
L 0 L
26L
= (1 − (−1)n )
n2 π 2

L X 26L n nπx −k( nπ
L )
2
t
u(x, t) = 13x + 100 − 13 + 2 2
(1 − (−1) ) cos e
2 n=1 n π L

1.3. The Heat Equation in a Circular Ring. We now want to solve the same heat
equation, but with periodic boundary conditions. That is, instead of a rod, we now have a
PARTIAL DIFFERENTIAL EQUATIONS 15

circular ring, of circumference 2L, so that u(−L, t) = u(L, t) and ux (−L, t) = ux (L, t). The
initial condition is a function f (x) such that f (−L) = f (L).
We proceed in the same way as with the rod: we look for separable solutions such that we
end up with two ordinary differential equations:

Gt = −kλG
ϕxx + λϕ = 0

Naturally, the G equation has the same solution as before. The boundary conditions for
the ϕ equation, however, are different from before. Now we have:

u(−L, t) = u(L, t)
ϕ(−L)G(t) = ϕ(L)G(t) where G(t) 6= 0, so
ϕ(−L) = ϕ(L)

Likewise, ϕx (−L) = ϕx (L). Also, we can show by following the same procedure as before,
that we must have λ ≥ 0.
Let’s solve first the λ = 0 case. As we saw before, this implies that ϕ is a linear function
of x. Applying the boundary conditions, we find that:

c1 + c2 (−L) = c1 + c2 · L
−c2 · L = c2 · L
−c2 = c2
c2 = 0

Since c1 can be any constant, we might as well let it be 1. We conclude that λ is an eigenvalue,
with eigenfunction ϕ = 1.
Now we can evaluate the λ > 0 case. We know that any solution of the form of equation
1.10 is a solution of the Rayleigh equation. By evaluating the boundary conditions we can
determine the possible values of λ.

ϕ(−L) = ϕ(L)
√ √ √ √
A cos λ(−L) + B sin λ(−L) = A cos λL + B sin λL
√ √ √ √
A cos λL − B sin λL = A cos λL + B sin λL

2B sin λL = 0
16 PARTIAL DIFFERENTIAL EQUATIONS

and

ϕx (−L) = ϕx (L)
√  √ √  √  √ √ 
λ −A sin λ(−L) + B cos λ(−L) = λ −A sin λL + B cos λL
√ √ √ √
A sin λL + B cos λL = −A sin λL + B cos λL

2A sin λL = 0

We can see that the only way to avoid the A = B = 0 solution (which would imply that
here are not eigenvalues greater than zero), is to require that
√ √
sin λL = 0 ⇒ λL = nπ

## so that the possible values of λ are:

 nπ 2
(1.28) λ= , for n ∈ N
L
Since we have three types of eigenfunctions (the constant value for λ = 0 and the sine and
cosine functions), the final solution will look like:
∞ 
X nπx −k( nπ )
2
t nπx −k( nπ )
2 
t
(1.29) u(x, t) = A0 + An cos e L + Bn sin e L

n=1
L L
where the An and Bn will be determined, as usual, by
Z L
1
(1.30) A0 = f (x)dx
2L −L
1 L
Z
nπx
(1.31) An = f (x) cos dx
L −L L
1 L
Z
nπx
(1.32) Bn = f (x) sin dx
L −L L
Note that in this case we’ve used L rather than L/2 as the norm, since the interval is twice
as long as before (from −L to L rather than from 0 to L). A simple calculation of inner
products will confirm that this is correct.

1.4. Orthogonality and Fourier Series. The previous example is not unique. In fact,
any function f (x) on [−L, L] can be expressed by means of its Fourier series. That is,
∞ h
X nπx nπx i
(1.33) f (x) = A0 + An cos + Bn sin
n=1
L L
where the An and Bn are given by equations 1.30, 1.31 and 1.32.
PARTIAL DIFFERENTIAL EQUATIONS 17

More precisely, the Fourier series equals the periodic extension of a function. For example,
if f (x) = ex , on [−L, L], then the periodic extension would look like figure 1. We can see
that these extensions normally have jump discontinuities. The Fourier series expression
won’t reproduce these. Instead, if we let f¯(x) be the periodic extension of f (x), we’ll have:

## Figure 1. A periodic extension of the function f (x) = ex

∞ h
X nπx nπx i 1  ¯ +
f (x ) + f¯(x− )

(1.34) A0 + An cos + Bn sin =
n=1
L L 2

Thus, if f¯ is continuos, then f¯(x+ ) = f¯(x) and the Fourier representation is precise, but at
jump discontinuities the Fourier extension takes the value in the middle of the discontinuities.
Furthermore, the expression of equation 1.34 is simpler if f¯ is even or odd, because then
the sine or cosine parts will cancel out, respectively. Thus:

¯
X nπ x
(1.35) fodd = Bn sin
n=1
L

X nπ x
(1.36) f¯even = A0 + An cos
n=1
L
There’s also a second phenomenon, known as the Gibbs phenomenon, which presents
itself at jump discontinuities. The Fourier extension will overshoot or undershoot the actual
function, and it will have ripples that die off as the number of terms in the sum approaches
infinity.
18 PARTIAL DIFFERENTIAL EQUATIONS

## 2. The Wave Equation

2.1. The Vibrating String. In this section, we will study the waves produced in a string
of length L that is clamped down at two ends, such as a guitar string. In such a string, any
small length of it experiences two forces in opposite directions: the pull of the string to the
left of it, and the pull of the string to the right of it, like we can see in figure 2
If we assume the tension is constant throughout the string and the angle θ is small enough,
we can see that the horizontal components of the tension would cancel out, so that each small
length of string would not move horizontally. However, it will move vertically. We can see
that the vertical component of the tension force is given by T sin θ. However, if we consider
θ to be a small enough angle, we can approximate sin θ with tan θ. Thus,

T sin θ ≈ T tan θ
∂u
(2.1) = T
∂x

Newton’s Second Law relates a force, such as the tension, to the mass and acceleration of
an object. In this case, the mass of a small length of string is given by its mass density µ
and its length dx, so that dm = µdx. The acceleration is just the second derivative of the
position with respect to time. In our case, the force in question is the difference between the
tension at x and the tension at x + dx. Thus, combining equation 2.1 with Newton’s Law
we get:

## Figure 2. An element of length in a taut string experiences forces due to

tension at both ends
PARTIAL DIFFERENTIAL EQUATIONS 19

F = ma
∂u ∂u
T − T = dm · a
∂x x+dx ∂x x
∂ 2u

∂u ∂u
T − T = µ dx 2
∂x x+dx ∂x x ∂t

∂u

∂x x+dx
− ∂u
∂x x µ ∂ 2u
=
dx T ∂t2
∂ 2u µ ∂ 2u
=
∂x2 T ∂t2
∂ 2u 2
2 ∂ u
(2.2) = c
∂x2 ∂t2
where we have made use of the definition of a derivative and replaced µ/T with c2 , because
it’s always a positive value (and in fact equivalent to the reciprocal of the wave velocity).
This expression is known as the wave equation.

2.1.1. Solving the Wave Equation. In order to illustrate how to solve it, let’s first define some
boundary and initial conditions. Because we have two second derivatives, we now need four
conditions. We’ll say that the string is clamped at both ends (i.e., u(0, t) = 0 and u(L, t) = 0)
and we will let the initial conditions be some functions of x such that u(x, 0) = f (x) and
ut (x, 0) = g(x).
We will proceed as before: we’ll assume the solution is separable u(x, t) = φ(x)h(t). Then,
using the wave equation 2.2, we get

utt = c2 uxx
φ(x) htt (t) = c2 φxx (x) h(t)
htt φxx
2
=
c h φ

As before, since the left hand side is a function of t only and the right hand side is a function
of x only, the only way they can always be equal is if they are both equal to a constant,
which we will call −λ. Thus, we now have two ordinary differential equations:

(2.3) φxx + λ φ = 0
(2.4) htt + c2 λ h = 0
20 PARTIAL DIFFERENTIAL EQUATIONS

Since our boundary conditions depend on the value of x only, the boundary conditions
for φ(x) are the same. Therefore, equation 2.3 is the well-known Rayleigh equation, and the
solution is give by equation 1.12, with the values of λ given by 1.11.
We now also know that the values of λ are only positive, since they need to satisfy the
Rayleigh equation. This means that equation 2.4 is also a form of the Rayleigh equation,
albeit with other boundary conditions. The solution is very similar to equation 1.29:
cnπ t cnπ t
(2.5) h(t) = A cos + B sin
L L
Thus, the final solution for u(x, t) is given by
∞    
X nπc t  nπ x  nπc t  nπ x 
(2.6) u(x, t) = An cos sin + Bn sin sin
n=1
L L L L

## We can find the An and Bn analyzing the initial conditions:

u(x, 0) = f (x)

X nπ x
(2.7) sin = f (x)
n=1
L
2 L
Z
nπ x
(2.8) ⇒ An = f (x) sin
L 0 L
and

ut (x, 0) = g(x)

X nπc  nπ x  nπc  nπ x 
−An sin 0 · sin + Bn cos 0 · sin = g(x)
n=1
L L L L

X nπc  nπ x 
Bn sin = g(x)
n=1
L L
2 L
Z
nπc  nπ x 
Bn = g(x) sin dx
L L 0 L
Z L
2  nπ x 
(2.9) Bn = g(x) sin dx
nπc 0 L
2.1.2. D’Alembert’s Expression of the Solution. D’Alembert interpreted the solution in a
different way from what we have just seen, and one which is very useful from the physics
point of view, because it gives us a better idea of what is happening to the string at different
times. D’Alembert imagined that we had two solutions , uf and ug , instead of one, one for
each of two sets of initial conditions. The final solution would be u(x, t) = uf + ug .
PARTIAL DIFFERENTIAL EQUATIONS 21

## For uf : u(x, 0) = f (x)

ut (x, 0) = 0
For ug : u(x, 0) = 0
ut (x, 0) = g(x)

so that u(x, 0) = uf (x, 0) + ug (x, 0) = f (x) + 0 = f (x), as before, and ut (x, 0) = uft (x, 0) +
ugt (x, 0) = 0 + g(x) = g(x), again as before. We can see that the two solutions, D’Alembert’s
and our previous Fourier derived one, are equivalent. But we will see why D’Alembert’s can
be a lot more convenient at times.
Let’s find an expression for uf and ug in our previous example. The general solution, in
both cases, is the same as equation 2.6, but since the initial conditions are different, the final
solutions are going to be different. In the case of uf , we’ll have:

X nπc nπ x
uft (x, 0) = Bn sin =0
n=1
L L
We can see that this can only be the case if all of the Bn are zero. Thus, we have found an
expression for uf :
∞ 
f
X nπc t  nπ x 
u (x, t) = An cos sin
n=1
L L
∞     
X 1 nπ x nπc t nπ x nπc t
= An sin + + sin −
n=1
2 L L L L
∞ ∞
1X h nπ i 1X h nπ i
= An sin (x + ct) + An sin (x − ct)
2 n=1 L 2 n=1 L
We can see that each of the terms in the sum in this last equation looks like equation 1.35.
Since in our case u is defined on [0, L] only, we can always make it into an odd function, by
first extending it oddly to [−L, L] and then extending that odd function periodically. So it
makes sense to call each of the terms in the sum the Fourier expression of the odd extension
of f (x). Following our previous notation, we can thus write:
1 1
(2.10) uf (x, t) = f¯odd (x + ct) + f¯odd (x − ct)
2 2
This notation is very nice, because the physical interpretation of it is very straightforward.
The (x + ct) part of it represents a pulse moving to the right (c represents the velocity of
22 PARTIAL DIFFERENTIAL EQUATIONS

the pulse), while the (x − ct) part represents a pulse moving to the left. Thus, we say that
the wave is the sum of a pulse going right and a pulse going left.
Now we need an expression for ug . As before, we know the general solution and can make
use of the initial condition ug (x, 0) = 0

X nπx nπx
ug (x, 0) = An cos 0 · sin + Bn sin 0 sin =0
n=1
L L

X nπx
0 = An sin
n=1
L

which, again, implies that all of the An are zero. Thus, the solution for ug is

X  nπ   nπc 
ug (x, t) = Bn sin x sin t
n=1
L L
∞  
X 1 nπ(x − ct) nπ(x + ct)
(2.11) = Bn cos − cos
n=1
2 L L

Now, our other initial condition for ug says that ugt (x, 0) = g(x), so

X nπc  nπx 
g(x) = Bn sin
n=1
L L

although, to be more correct, we should say that it is the odd periodic extension of g that
equals this, as we’ve seen before. Now consider the following.

x+ct ∞
1 x+ct X nπc
Z Z
1  nπ 
ḡodd (s) ds = Bn sin s ds
2c x−ct 2c x−ct n=1 L L

1 x+ct X nπ
Z  nπ 
= Bn sin s ds
2 x−ct n=1 L L
∞ Z x+ct
1X nπ  nπ 
= Bn sin s ds
2 n=1 x−ct L L

1X h  nπ is=x+ct
= Bn − cos s
2 n=1 L s=x−ct

1X nπ (x + ct) nπ(x − ct)
(2.12) = −Bn cos + Bn cos
2 n=1 L L
PARTIAL DIFFERENTIAL EQUATIONS 23

If we compare equations 2.11 and 2.12 we can see that the two are equivalent. Thus, we
can write ug as
Z x+ct
g 1
(2.13) u (x, t) = ḡodd (s) ds
2c x−ct

Thus, combining equations 2.10 and 2.13, we arrive at the solution for u:

## u(x, t) = uf (x, t) + ug (x, t)

Z x+ct
1¯ 1
fodd (x + ct) + f¯odd (x − ct) +

(2.14) = ḡodd (s) ds
2 2c x−ct
We can now see why D’Alembert’s expression is so much more useful at times. If we know
f and g, calculating u is very straightforward: we just need to calculate two values of f and
integrate g over some interval. There’s no need for infinite series of any kind.

## 2.3. The Circular Membrane and Bessel Functions.

3. Laplace’s Equation

## 3.2. Laplace’s Equation on a Disc.

4. Fourier Transform

4.1. Introduction.