Math3i3 Lectures
-
Upload
kafung-lee -
Category
Documents
-
view
37 -
download
0
Transcript of Math3i3 Lectures
Math 3I03 – Fall 2009Lecture Notes
September 10th
Name: Bernardo Galvao-Sousa
Office: Hamilton Hall 204
Phone: x23419
Email: [email protected]
Office Hours: Tuesday 13:30-15:00 or by appointment
Course Website: http://www.math.mcmaster.ca/bsousa/math3i3
I’ll post the announcements on the website.
No Homework, but some Practice Problems. To pass the course you’ll have to practice a lot, there’s no real
trick to pass the course other than practice.
Practice Problems are only a suggestion, you can try to do all the problems in the sections we cover.
If you have questions about the lectures or the problems, contact me.
2.2 Review
Definition. An equation relating an unknown function of several variables with some of its partial derivatives
is called a partial differential equation (PDE).
Example (Heat Equation). u = u(t, x)∂u
∂t= k
∂2u
∂x2
Proposition 2.1. A linear operator L satisfies
L(c1u1 + c2u2) = c1L(u1) + c2L(u2),
for any two functions u1, u2 and constants c1, c2.
Example.
• L = ∂∂t is linear;
• L = ∂2
∂x2 is linear;
1
Definition. A linear partial differential equation is an equation of the form:
L(u) = f,
where L is a linear operator and f a known function.
Example.
• The heat equation is linear: ∂u∂t = k ∂
2u∂x2 + f(x, t) with L = ∂
∂t − k ∂2
∂x2 ;
• ∂u∂t = k ∂
2u∂x2 + α(x, t)u+ f(x, t) is linear;
• ∂2u∂x2 + ∂2u
∂y2 = 0 is linear;
• ∂u∂t = k ∂
2u∂x2 + α(x, t)u4 is nonlinear;
• ∂u∂t + u∂u∂x = ∂3u
∂x3 is nonlinear.
Definition. A PDE is called linear homogeneous if f = 0, that is of the form L(u) = 0.
A simpler definition of a linear homogeneous PDE, is a linear PDE which admits u ≡ 0 as a solution.
A very important property of linear homogeneous PDEs is:
Proposition 2.2 (Principle of Superposition). If u1 and u2 solve a linear homogeneous PDE, then a linear
combination of them c1u1 + c2u2 for arbitrary constants c1, c2, also solves the same PDE.
Proof. Let the linear homogeneous PDE be written as L(u) = 0 for some linear operator L. Then we know that
L(u1) = 0 and L(u2) = 0. By the linearity of L, we then have
L(c1u1 + c2u2) = c1 L(u1)︸ ︷︷ ︸=0
+c2 L(u2)︸ ︷︷ ︸=0
= 0.
A PDE may have many solutions: the PDE
∂u
∂t+∂u
∂x= 0, t > 0, x ∈ R, (Transport Equation)
is solved by u(x, t) = f(x− t) for any differentiable function f of 1-variable.
We need boundary/initial conditions to be able to solve the PDE uniquely: by adding the initial condition
u(x, 0) = g(x), now there is only one solution: u(x, t) = g(x− t) where g is given by the initial condition.
Remark. Linearity and homogeneity also applies to boundary and initial conditions:
• u(0, x) = f(x) is a linear, but nonhomogeneous initial condition;
• ∂u∂x (L, t) = g(t) is a linear but nonhomogeneous boundary condition;
• ∂u∂x (0, t) = 0 is a linear and homogeneous boundary condition;
• −∂u∂x (L, t) = u(L, t)− g(t) is a linear but nonhomogeneous boundary condition;
• ∂u∂x (0, t) = u2(0, t) is a nonlinear, homogeneous boundary condition.
2
September 14th
1 Heat Equation
1.2 Derivation of the conduction of heat in a one-dimensional rod
First, we consider a rod of constant cross-sectional area A oriented in the x direction from x = 0 to x = L.
x
x = 0 x = L
We assume that all quantities are constant across a section, so that for all practical reason the rod is one-
dimensional. The simplest way to do this is by insulating perfectly the lateral surface of the rod.
Heat energy. Now we introduce the thermal energy density:
e(x, t) = thermal energy density at point x and time t.
The rod is not uniformly heated, so the thermal energy density varies from one cross section to another. Consider
∆x infinitesimally small. Then we approximate e(x, t) as a constant throughout the volume in the figure below.
x
x = 0 x = Lx x + !x
The heat energy is then
heat energy = e(x, t)A∆x,
because the volume of the shaded section is A∆x.
Conservation of heat energy. The heat energy between x and x+ ∆x changes in time only due to the heat
energy flowing through the edges and to the heat energy generated inside:
rate of change heat energy flowing
of heat energy = across boundaries +
in time per unit time
heat energy generated
inside per unit time(#)
Because inside the shaded section, we consider the heat energy constant in x, we know that
∂
∂t
[e(x, t)A∆x
]=
rate of change of heat
energy in time.(#t)
3
Heat flux. Since the rod is one-dimensional, the thermal energy flows to the right or left only. We now
introduce the heat flux:
φ(x, t) =
amount of thermal energy
per unit time flowing to
the right per unit surface area
If φ(x, t) < 0, then the heat energy is flowing to the left. We now know that[φ(x, t)− φ(x+ ∆x, t)
]A =
heat energy flowing across
the boundaries per unit time.(#φ)
Heat sources. We also consider internal sources of heat energy:
Q(x, t) = heat energy generated per unit volume per unit time.
Q(x, t)A∆x = heat energy generated inside per unit time. (#Q)
Conservation of heat energy (thin slice). We put the (#), (#t), (#φ) and (#Q) together to deduce
∂
∂t
[e(x, t)A∆x
]≈[φ(x, t)− φ(x+ ∆x, t)
]A+Q(x, t)A∆x.
We don’t get equality because we are approximating these quantities by constants in the thin slice. Divide by
A∆x and take the limit as ∆x→ 0+ to obtain an exact equation:
∂e
∂t= lim
∆x→0+
φ(x, t)− φ(x+ ∆x, t)
∆x+Q(x, t)
which can be simplified to∂e
∂t= −∂φ
∂x+Q. (?)
This equation now is exact because when taking the limit ∆x → 0+ we are evaluating these quantities at a
point x, so there is no approximation now.
Conservation of heat energy (exact). Another way to derive , which avoids the approximations above
involves using integrals. Consider a finite segment of the rod, between x = a and x = b. Then (#) becomes∫ b
a
∂e
∂t(x, t) dx =
d
dt
∫ b
a
e(x, t) dx = φ(a, t)− φ(b, t) +
∫ b
a
Q(x, t) dx (∫ ba
)
We can write every term as an integral in (a, b):∫ b
a
∂e
∂t(x, t) dx =
∫ b
a
[−∂φ∂x
(x, t) +Q(x, t)
]dx,
so we deduce the equation ∫ b
a
(∂e
∂t+∂φ
∂x−Q
)dx = 0.
Since this is valid for arbitrary a and b, then the integrand itself must be 0 and we recover
∂e
∂t= −∂φ
∂x+Q. (?)
4
Remark. The negative sign in front of ∂φ∂x can be explained with an example: if ∂φ
∂x > 0, then φ is higher on
the right than on the left, which means that more heat is flowing (to the right) at x = b than at x = a, so more
heat is escaping than coming in. This means that the heat energy should decrease, hence the negative sign.
x
x = a x = b0 L
!(a, t) !(b, t)
Temperature and specific heat. Here we introduce the temperature:
u(x, t) = temperature.
Temperature and thermal energy density are different concepts. This can be understood by the fact that for
different materials, it takes different amounts of thermal energy to raise the temperature from one value to
another. So we introduce the notion of specific heat:
c = heat energy necessary to raise the temperature of a unit mass by one unit.
Remark.
• The specific heat depends on the temperature of the rod itself: c = c(u). However, this assumption
complicates the problems considerably. If we restrict the model to a narrow range of temperatures, then
it is reasonable to assume that the specific heat is independent of the temperature.
• Different materials have different specific heat, so to allow for changes in composition of the rod, we must
allow the specific heat to depend on x: c = c(x).
5
September 15th
Thermal energy. The thermal energy can also be defined as the energy it takes to raise the temperature of
a unit of volume from a reference temperature 0oC to its actual temperature u(x, t). We know that the heat
energy per unit mass is c(x)u(x, t), so we introduce the mass density:
ρ(x) = mass per unit volume.
Then, the thermal energy per unit volume is given by:
e(x, t) = ρ(x)c(x)u(x, t).
The conservation of heat energy (1.2) becomes
c(x)ρ(x)∂u
∂t= −∂φ
∂x+Q. (?)
Fourier law. In the previous equation, we still have two unknowns: u(x, t) and φ(x, t). What is the heat flux
φ(x, t)? How does energy flow?
What we are looking for is the dependence of the heat flux φ(x, t) on the temperature u(x, t). We know the
following properties about heat flux:
1. Heat flows from hotter to colder;
2. The greater the temperature difference, the greater the flow;
3. The flow of heat energy varies depending on the material, even with the same temperature differences.
Fourier summarized these properties in the simplest possible way with the equation:
φ = −K0∂u
∂x(Fourier law of heat conduction)
The term K0 is called the thermal conductivity, which depends on the material, thus K0 = K0(x). Also, the
conductivity changes with the temperature, so we should have K0 = K0(x, u), but as before, this complicates
the equations, and as long as we restrict the model to narrow band of temperatures, we can assume that
K0 = K0(x) doesn’t depend on the temperature u(x, t).
Heat Equation. Putting all this together, we end up with the equation
cρ∂u
∂t=
∂
∂x
(K0
∂u
∂x
)+Q, (?)
where the source of internal heat energy Q is given, and c, ρ,K0 depend on x. In the special case of a uniform
rod, these are constants and we have:
cρ∂u
∂t= K0
∂2u
∂x2+Q.
Moreover, if there are no sources Q = 0, then the PDE becomes
∂u
∂t= k
∂2u
∂x2, (Diffusion Equation)
where k = K0
cρ is the thermal diffusivity.
6
Initial/boundary conditions. To solve these equations, that is to make sure there is a unique solution, we
need extra conditions. As is expected, to predict the temperature distribution of a rod, we need to know what
is the initial temperature distribution, so we must be given
u(x, 0) = f(x) (InitialCondition)
Moreover, we also need to know what is happening at the edges of the rod x = 0 and x = L, how the temperature
is flowing in/out through the edges.
Remark. If the rod is infinite, then the initial condition is sufficient.
1.3 Boundary conditions
There are several kinds of boundary conditions, depending on the mechanism that affects each edge. It may
depend on the conditions immediately inside and outside the rod. We always assume that the environment
outside the rod is known and not altered by the rod.
Prescribed temperature. Sometimes the temperature at the end of the rod is fixed:
u(0, t) = uB(t), (BCD)
where uB(t) is given. This kind of condition is also known as a Dirichlet Boundary Condition.
Insulated boundary. We may also prescribe the heat flux across the edge:
−K0(0)∂u
∂x(0, t) = φ(t), (BCN)
where φ(t) is given. This kind of condition is also known as a Neumann Boundary Condition.
The simplest of this kind of boundary condition is when the rod is perfectly insulated:
∂u
∂x(0, t) = 0.
Newton’s Law of cooling. When the rod is in contact at the boundary with a moving fluid (e.g., air), then
the movement of the fluid will carry the heat into/away from the rod. This process is called convection. And
the boundary condition is
−K0(0)∂u
∂x(0, t) = −H
(u(0, t)− uB(t)
), (BCR)
where H (the heat transfer coefficient) and uB(t) are given. This kind of condition is known as Newton’s law
of cooling or a Robin Boundary Condition.
Remark. The minus sign on the right-hand side is explained through a simple example. On one hand, the left-
hand side is the heat flux (flowing to the right when positive and to the left when negative). If the temperature
of the rod is hotter than the fluid outside, u(0, t) > uB(t), then heat should flow to the outside, which is to the
left. In fact, because of the minus sign, the heat flux −K0(0)∂u∂x (0, t) < 0, which means that heat is flowing to
the left.
Analogously, for the right edge we have
−K0(L)∂u
∂x(L, t) = H
(u(L, t)− uB(t)
).
7
2 Method of Separation of Variables
2.3 Heat Equation with frozen ends
2.3.1 Introduction
First, we assume that all the coefficients in (1.2) are constant, i.e., that the rod is made of a uniform material.
The heat equation becomes:∂u
∂t= k
∂2u
∂x2+Q(x, t)
cρ.
This equation is linear if Q(x, t) = 0, so we will assume this too:
∂u
∂t= k
∂2u
∂x2. (PDE)
The rod has frozen ends, so the temperature at the ends is prescribed as 0, so we have the boundary conditions:
u(0, t) = u(L, T ) = 0, (BC)
and we have an initial condition
u(x, 0) = f(x), (IC)
for a known function f(x).
8
September 17th
2.3.2 Separation of Variables
In this method, we attempt to find solutions where the dependence in time t and space x are separable:
u(x, t) = φ(x)G(t),
where φ(x) is a function only of x and G(t) is only a function of t.
Because u satisfies (PDE) with the conditions (BC) and (IC). At first, we will ignore the initial condition (IC).
Later we will see how to satisfy the initial conditions.
With this assumption on u(x, t), we compute its partial derivatives:
∂u
∂t= φ(x)G′(t),
∂2u
∂x2= φ′′(x)G(t),
so (PDE) becomes
φ(x)G′(t) = kφ′′(x)G(t).
Notice that we can separate the variables t and x by dividing both sides by kφ(X)G(t):
G′(t)
kG(t)=φ′′(x)
φ(x).
Now the left-hand side depends only on t and the right-hand side depends only on x. How can a function of time
equal a function of space for all time and space?The only possible way is if both sides are equal and constant:
G′(t)
kG(t)=φ′′(x)
φ(x)= −λ,
for some constant λ (the minus sign is just for convenience). So this equation now splits into two separate
equations of one-variable:
φ′′(x) = −λφ(x), (ODEx)
G′(t) = −λkG(t). (ODEt)
The product solution must also satisfy the boundary conditions:
u(0, t) = φ(0)G(t) = 0,
u(L, t) = φ(L)G(t) = 0.
If G(t) ≡ 0, then the solution is u(x, t) ≡ 0 which is called the trivial solution that we knew existed because
the problem is homogeneous. To obtain more interesting solutions, we assume instead that
φ(0) = φ(L) = 0. (BCx)
9
2.3.3 Time-dependent function
Here we solve the differential equation (ODEt). This is a first-order linear homogeneous differential equation
with constant coefficients, so we can easily solve it with an exponential solution:
G(t) = Ce−kλt,
for some constant C.
Remark.
1. If λ > 0, then the solution will decay exponentially;
2. If λ = 0, then the solution is constant;
3. If λ < 0, then the solution will grow exponentially. This case means that the temperature of the rod will
increase (decrease) exponentially, which is not an expected behavior for the heat distribution of a rod;
4. As we will find out, only some values of λ are allowed, so that in fact λ > 0;
5. This is the reason why we introduced the minus sign with λ.
2.3.4 Boundary-value problem
We now solve (ODEx) with the boundary conditions (BCx). We will see, that for most values of λ, only trivial
solutions exist, so the values of λ for which we can find nontrivial solutions are called eigenvalues of the
boundary-value problem and the nontrivial solutions are called eigenfunctions.
This is a second-order linear homogeneous differential equation, so we look for exponential solutions φ(x) = erx
and we deduce that r is a root of the characteristic polynomial:
r2 = −λ.
We now have 3 cases:
Case 1: λ > 0
In this case, r = ±i√λ, which is complex, so the solution takes the form
φ(x) = C1 cos(√λx)
+ C2 sin(√λx).
Applying the boundary conditions, we have:
0 = φ(0) = C1,
0 = φ(L) = C2 sin(√λL).
So either C2 = 0 or sin(√λL)
= 0. If C2 = 0, then we obtain a trivial solution, so the nontrivial solution
must satisfy:
sin(√λL)
= 0
10
which implies that√λL = nπ for some positive integer n. We then deduce that we have
λ =(nπL
)2
, (Eigenvalues)
φ(x) = sin(nπxL
), (Eigenfunctions)
for n = 1, 2, 3, . . .. We put C2 = 1, because we are only looking for one eigenfunction – since it is a solution
of a linear homogeneous differential equation, it can always be multiplied by a constant.
Case 2: λ = 0
In this case, r = 0 is a double root, so the solution is
φ(x) = C1 + C2x,
which using the boundary conditions becomes
φ(x) ≡ 0.
This means that there is only the trivial solution, thus λ = 0 is not an eigenvalue.
11
September 21st
Case 3: λ < 0
In this case, let µ = −λ > 0, and we have r = ±√−λ = ±√µ, so the solution is
φ(x) = C1e−√µx + C2e
õx
Using the boundary conditions we obtain0 = φ(0) = C1 + C2
0 = φ(L) = C1e−√µL + C2e
õL
→
C1 = −C2
−C2e−√µL = −C2e
õL
→
C1 = −C2
C2 = 0 or e−√µL = e
õL
Because µ,L > 0, we know that e−√µL 6= e
õL, so we conclude that C1 = C2 = 0 and we only obtain the
trivial solution. So again, λ < 0 is not an eigenvalue.
Summary. The nontrivial solutions of (ODEx) and (BCx):
φ′′(x) = −λφ(x)
φ(0) = 0
φ(L) = 0
are found for the eigenvalues and eigenfunction:
λn =(nπL
)2
, (Eigenvalues)
φn(x) = sin(nπxL
), (Eigenfunctions)
for n = 1, 2, 3, . . ..
2.3.5 Principle of superposition
From 2.3.3 and 2.3.4, we deduced an infinite number of product solutions of the heat equation (PDE) satisfying
the boundary conditions (BC) corresponding to specific values of λ > 0. The solutions are:
un(x, t) = Bn sinnπx
Le−k(
nπL )
2t
for n = 1, 2, 3, . . .
Using the superposition principle, we obtain we may add all these solutions to obtain a general solution of the
heat equation satisfying the boundary conditions:
u(x, t) =
∞∑n=1
Bn sinnπx
Le−k(
nπL )
2t.
We now see that this solution satisfies the initial condition:
u(x, 0) = f(x) =
∞∑n=1
Bn sinnπx
L.
12
Example. We can already solve some simple problems. Solve the problem:
∂u
∂t= k
∂2u
∂x2, (PDE)
u(0, t) = u(L, t) = 0, (BC)
u(x, 0) = 2 sin3πx
L− sin
5πx
L. (IC)
Solution. Using the formula above, we know that the solution can be written as
u(x, t) =
∞∑n=1
Bn sinnπx
Le−k(
nπL )
2t,
and we know that the initial condition is
2 sin3πx
L− sin
5πx
L=
∞∑n=1
Bn sinnπx
L
with Bn = 0 for n 6= 3, 5 and B3 = 2, B5 = −1.
We conclude that the solution is:
u(x, t) = 2 sin3πx
Le−k(
3πL )
2t − sin
5πx
Le−k(
5πL )
2t.
In fact, we can find solution of the heat equation for any initial condition that can be written as:
f(x) =
∞∑n=1
Bn sinnπx
L.
This expansion of the function f(x) is called a Fourier series expansion.
Then, the initial condition determines the values of the constants Bn which we use to find the corresponding
solution:
u(x, t) =
∞∑n=1
Bn sinnπx
Le−k(
nπL )
2t.
2.3.6 Orthogonality of Sines
Given an initial condition
u(x, 0) = f(x).
How do we find the coefficients Bn such that
f(x) =
∞∑n=1
Bn sinnπx
Lfor 0 6 x 6 L ?
Recall that
1. We can define an inner product
(f, g) =
∫ L
0
f(x)g(x) dx;
13
2. And a norm:
‖f‖ =√
(f, f) =
(∫ L
0
f2(x) dx
) 12
;
3. Two functions f, g are orthogonal if (f, g) = 0, i.e.∫ L
0
f(x)g(x) dx = 0;
4. A set of functions {φn(x)}n=1,2,... is orthogonal if
(φn, φm) = 0 for all n 6= m;
5. An orthogonal set of functions {φn(x)}n=1,2,... is complete if for any f piecewise smooth,
(f, φn) = 0 for all n = 1, 2, . . . ⇒ f ≡ 0;
6. If {φn(x)}n=1,2,... is complete, then any piecewise smooth function f(x) can be written as
f(x) =
∞∑n=1
bnφn(x) with bn =(f, φn)
‖φn‖2;
Now we apply this theory to our case. First note that
{sin nπxL }n=1,2,... is complete in [0, L]
and ‖ sin nπxL ‖ =
√L2 .
So, from 6, we know that any piecewise smooth function f(x) can be written as
f(x) =
∞∑n=1
Bn sinnπx
Lwith Bn =
2
L
∫ L
0
f(x) sinnπx
Ldx.
14
September 22nd
2.3.7 Example
In this example, immerse a rod perfectly insulated on the lateral surface in a bath of boiling water (100oC) and
let it sit for a long time. We expect the temperature on the whole rod to be at 100oC. Then suddenly immerse
the rod in a bath of ice water (0oC). Follow the temperature distribution after the second immersion.
The mathematical problem is
∂u
∂t= k
∂2u
∂x2t > 0, 0 < x < L (PDE)
u(0, t) = u(L, t) = 0 t > 0 (BC)
u(x, 0) = 100 0 < x < L (IC)
According to what was done before, the solution is
u(x, t) =
∞∑n=1
Bn sinnπx
Le−k(
nπL )
2t,
where
Bn =2
L
∫ L
0
f(x) sinnπx
Ldx,
and f(x) = 100.
We now compute the coefficients Bn:
Bn =200
L
∫ L
0
sinnπx
Ldx =
200
L
(− L
nπcos
nπx
L
) ∣∣∣∣L0
=200
nπ(1− cosnπ) =
200
nπ(1− (−1)n) =
0 n even
400nπ n odd
Notice that f(x) = 100 for 0 < x < L and f(0) = f(L) = 0. This is due to the boundary conditions and to the
fact that the series∞∑n=1
Bn sinnπx
L
is actually equal to
100
L 2L!L!2L
!100
15
The “wiggly” graph is an approximation of the series up to n = 15. That’s why the whole series can be 100
inside the interval (0, L) and 0 at the endpoints.
The graph of the solution is:
2.4 Worked Examples with the Heat Equation
2.4.1 Heat conduction in a rod with insulated ends
We will now work out the following mathematical problem:
∂u
∂t= k
∂2u
∂x2(PDE)
∂u
∂x(0, t) = 0 (BC1)
∂u
∂x(L, t) = 0 (BC2)
u(x, 0) = f(x) (IC)
for t > 0 and 0 6 x 6 L.
Apply the method of separation of variables: u(x, t) = φ(x)G(t), which implies the ODEs:
G′(t) = −kλG(t) (ODEt)
φ′′(x) = −λφ(x) (ODEx)
where λ = separation constant. Then,
G(t) = e−λkt
and the boundary conditions imply
φ′(0) = φ′(L) = 0 (BCx)
16
September 24th
We now solve the problem in x. The characteristic polynomial is the same: r2 = −λ, so once again we have 3
cases:
λ > 0: The general solution is:
φ(x) = C1 cos√λx+ C2 sin
√λx
so
φ′(x) = −C1
√λ sin
√λx+ C2
√λ cos
√λx
and the boundary conditions imply
0 = φ′(0) = C2
√λ
0 = φ′(L) = −C1
√λ sin
√λL
So the eigenvalues are the same:
λn =(nπL
)2
(Eigenvalues)
φn(x) = cosnπx
L(Eigenfunctions)
for n = 1, 2, 3, . . .
λ = 0: The general solution is:
φ(x) = C1 + C2x
so
φ′(x) = C2
and the boundary conditions imply C2 = 0. So we have another eigenvalue are the same:
λ0 = 0 (Eigenvalue)
φ0(x) = 1 (Eigenfunction)
λ < 0: The general solution is
φ(x) = C1e−√µx + C2e
õx
where µ = −λ > 0, so
φ′(x) = −C1√µe−
õx + C2
õeõx
and the boundary conditions imply0 = φ′(0) = −C1√µ+ C2
õ
0 = φ′(L) = −C1√µe−
õL + C2
õeõL
→
C1 = C2
C2 = 0 or e−√µL = e
õL
In this case we only obtain trivial solutions, so there are no eigenvalues λ < 0.
17
Using the superposition principle, we conclude that the solution is:
u(x, t) = A0 +
∞∑n=1
An cosnπx
Le−k(
nπL )
2t.
The initial condition is now:
f(x) = u(x, 0) = A0 +
∞∑n=1
An cosnπx
L.
As we did in 2.3.6, but applying to cosines, we note that
{1, cos nπxL }n=1,2,... is complete in [0, L]
and ‖ cos nπxL ‖ =√
L2 if n = 1, 2, . . . and ‖1‖ =
√L.
So, from 6 in 2.3.6, we know that any piecewise smooth function f(x) can be written as
f(x) =A0
2+
∞∑n=1
An cosnπx
Lwith An =
2
L
∫ L
0
f(x) cosnπx
Ldx.
Note. We divide A0 by 2 so that it follows the same formula.
2.4.2 Heat conduction in a thin circular ring
Now we have a circular ring of length 2L as in the figure on the right. The
trick in this example is to formulate the boundary conditions correctly. First,
since the circumference of a circle is 2πr = 2L, the radius of the ring is r = Lπ .
The edges of the ring x = −L and x = L should be touching, so the tempera-
tures should match:
u(−L, t) = u(L, t). (BC1)
Moreover, heat flows freely between x = −L and x = L, so the heat flux should
also match:∂u
∂x(−L, t) =
∂u
∂x(L, t). (BC2)
x = 0x = L
x = !L
The rest of the problem is known:
∂u
∂t= k
∂2u
∂x2(PDE)
u(x, 0) = f(x) (IC)
18
September 28th
Apply the method of separation of variables: u(x, t) = φ(x)G(t), which implies the ODEs:
G′(t) = −kλG(t) (ODEt)
φ′′(x) = −λφ(x) (ODEx)
where λ = separation constant. Then,
G(t) = e−λkt
and the boundary conditions imply
φ(0) = φ(L) and φ′(0) = φ′(L). (BCx)
We now solve the problem in x. The characteristic polynomial is the same: r2 = −λ, so once again we have 3
cases:
λ > 0: The general solution is:
φ(x) = C1 cos√λx+ C2 sin
√λx
so
φ′(x) = −C1
√λ sin
√λx+ C2
√λ cos
√λx
and the boundary conditions imply
C1 cos√λ(−L) + C2 sin
√λ(−L) = φ(−L) = φ(L) = C1 cos
√λL+ C2 sin
√λL
−C1
√λ sin
√λ(−L) + C2
√λ cos
√λ(−L) = φ′(−L) = φ′(L) = −C1
√λ sin
√λL+ C2
√λ cos
√λL
which is equivalent to
C2 sin√λL = 0
C1
√λ sin
√λL = 0
And we have the eigenvalues:
λn =(nπL
)2
, n = 1, 2, . . . (Eigenvalues)
For each eigenvalue λn, we have two (linearly independent) eigenfunctions:
φn(x) = cosnπx
L, sin
nπx
L(Eigenfunctions)
λ = 0: The general solution is:
φ(x) = C1 + C2x
so the boundary conditions imply that C1 = C1 + C2L, which means that C2 = 0 and we have one more
eigenvalue:
λ0 = 0 (Eigenvalue)
with the eigenfunction:
φ0(x) = 1 (Eigenfunction)
As before, the case λ < 0 doesn’t admit nontrivial solutions.
19
Using the superposition principle, we conclude that the solution is:
u(x, t) = a0 +
∞∑n=1
an cosnπx
Le−k(
nπL )
2t +
∞∑n=1
bn sinnπx
Le−k(
nπL )
2t.
The initial condition is now:
f(x) = u(x, 0) = a0 +
∞∑n=1
an cosnπx
L+
∞∑n=1
bn sinnπx
L.
As we did in 2.3.6, but applying to sines and cosines in the interval [−L,L], we note that
{1, sin nπxL , cos nπxL }n=1,2,... is complete.
So, from 6 in 2.3.6, we know that any piecewise smooth function f(x) can be written as
f(x) =a0
2+
∞∑n=1
an cosnπx
L+
∞∑n=1
bn sinnπx
L.
with
an =1
L
∫ L
−Lf(x) cos
nπx
Ldx,
bn =1
L
∫ L
−Lf(x) sin
nπx
Ldx.
2.5 Laplace’s Equation
We didn’t see it, but the heat equation in two dimensions is:
∂u
∂t= k
(∂2u
∂x2+∂2u
∂y2
)= k∇2u = k∆u.
So if we are looking for the equilibrium distribution of heat, that’s when the temperatures don’t change with
time, thus ∂u∂t = 0 and we have the Laplace equation:
∂2u
∂x2+∂2u
∂y2= 0 (PDE)
20
September 29th
2.5.1 Laplace’s equation in a rectangle
In a rectangle 0 6 x 6 L, 0 6 y 6 H, we have the following boundary conditions:
u(0, y) = g0(y) (BC1)
u(L, y) = gL(y) (BC2)
u(x, 0) = f0(x) (BC3)
u(x,H) = fH(x) (BC4)
where f0(x), fH(x), g0(y), gL(y) are given functions.
Note. Although the PDE is linear and homogeneous, the boundary conditions are nonhomogeneous, so we
can’t apply the method of separation of variables in the usual form.
So we break the problem into 4 easier problems that can be solved using the method of separation of variables.
We break the solution in the following form:
u(x, y) = u1(x, y) + u2(x, y) + u3(x, y) + u4(x, y)
where∆u1 = 0
u1(0, y) = g0(y)
u1(L, y) = 0
u1(x, 0) = 0
u1(x,H) = 0
∆u2 = 0
u2(0, y) = 0
u2(L, y) = gL(y)
u2(x, 0) = 0
u2(x,H) = 0
∆u3 = 0
u3(0, y) = 0
u3(L, y) = 0
u3(x, 0) = f0(x)
u3(x,H) = 0
∆u4 = 0
u4(0, y) = 0
u4(L, y) = 0
u4(x, 0) = 0
u4(x,H) = fH(x)
We will work out the problem for u3 using the method of separation of variables:
u3(x, y) = φ(x)g(y).
As before, we first ignore the nonhomogeneous boundary condition (before we ignored the initial condition) and
the other three homogeneous conditions yield:
φ(0) = φ(L) = 0 g(H) = 0.
We substitute the new form of u3 into the PDE:
φ′′(x)g(y) + φ(x)g′′(y) = 0,
so we separate the variables by dividing everything by φ(x)g(y):
−φ′′(x)
φ(x)=g′′(y)
g(y).
21
Now the right-hand side depends only on y while the left-hand side depends only on x. Then both must equal
a separation constant
−φ′′(x)
φ(x)=g′′(y)
g(y)= λ.
We now use λ because the term with both boundary conditions is going to give us the eigenvalues, and like
before, the exponentials won’t work, since you can’t have an exponential equal 0 at both endpoints, so we want
a separation constant λ < 0 to generate the exponentials. If we choose λ instead of −λ we can do that, although
we don’t assume that λ > 0.
We now have two problems to solve:
φ′′(x) = −λφ(x)
φ(0) = φ(L) = 0and
g′′(y) = λg(y)
g(H) = 0
The problem in x is a boundary problem, so we can use it to determine the eigenvalues λ. The characteristic
polynomial is: r2 = −λ, so once again we have 3 cases:
λ > 0: The general solution is:
φ(x) = C1 cos√λx+ C2 sin
√λx
so
φ′(x) = −C1
√λ sin
√λx+ C2
√λ cos
√λx
and the boundary conditions imply
0 = φ(0) = C1
0 = φ(L) = C1 cos√λL+ C2 sin
√λL
which is equivalent to
C1 = 0
C2 sin√λL = 0
And we have the eigenvalues:
λn =(nπL
)2
, n = 1, 2, . . . (Eigenvalues)
For each eigenvalue λn, we have the eigenfunction:
φn(x) = sinnπx
L(Eigenfunctions)
As before, the cases λ = 0 and λ < 0 don’t admit nontrivial solutions.
Now we solve the problem in y for each eigenvalue λn. The characteristic polynomial is r2 = λn > 0, so we
obtain the solution:
g(y) = Ae−√λny +Be
√λny
22
Using the condition g(H) = 0 we obtain:
0 = g(H) = Ae−√λnH +Be
√λnH → Ae−
√λnH = −Be
√λnH =
C
2
so the solution is
gn(y) = Ce−√λn(y−H) − e
√λn(y−H)
2= C sinh(
√λn(y −H))
By the superposition principle, we conclude that the solution is:
u3(x, y) =
∞∑n=1
an sinnπx
Lsinh
nπ
L(y −H).
Now we introduce the “initial” condition into u3:
f0(x) = u3(x, 0) = −∞∑n=1
an sinnπx
Lsinh
nπH
L=
∞∑n=1
(−an sinh
nπH
L
)sin
nπx
L.
We know the formula for the coefficients:
−an sinhnπH
L=
2
L
∫ L
0
f0(x) sinnπx
Ldx,
so the coefficients are:
an = − 2
L sinh nπHL
∫ L
0
f0(x) sinnπx
Ldx.
We obtain the solution u(x, y) of the original problem by adding all the four simplified solutions.
23
October 1st
2.5.2 Laplace equation for a circular disk
Now we have a circular disk of radius a as in the figure on the right. Assume
that thermal properties are constant and there are no heat sources. The trick
in this example is to formulate the problem in polar coordinates.
In polar coordinates (r, θ), we have
x = r cos θ, y = r sin θ,
r =√x2 + y2, θ = arctan
y
x,
so
∂u
∂x=∂u
∂r
∂r
∂x+∂u
∂θ
∂θ
∂x=∂u
∂rcos(θ)− ∂u
∂θ
sin θ
r∂u
∂y=∂u
∂r
∂r
∂y+∂u
∂θ
∂θ
∂y=∂u
∂rsin(θ) +
∂u
∂θ
cos θ
r,
∆u = 0
a
u(a, θ) = f(θ)
θ = ±π
so continuing, we can deduce that
∆u =1
r
∂
∂r
(r∂u
∂r
)+
1
r2
∂2u
∂θ2= 0 (PDE)
with boundary condition
u(a, θ) = f(θ). (BCr=a)
The domain of the problem is
0 6 r 6 a, −π 6 θ 6 π,
so we need boundary conditions on all edges of the domain, and we only have conditions on one edge: r = a.
We find the missing boundary conditions starting with r = 0. This “edge” reduces to the center point of the
domain, where we have no condition, so we just assume that the solution u(r, θ) is bounded there:
|u(0, θ)| <∞ (BCr=0)
The “edge” θ = ±π is also in the interior of the domain, but in this case, we observe that both edges are the
same line, so the solution and its flux across the line θ = ±π must be the same:
u(r,−π) = u(r, π)
∂u
∂θ(r,−π) =
∂u
∂θ(r, π).
(BCθ)
These kind of conditions are called periodicity conditions.
Now we have 4 boundary conditions, and only one of these conditions is nonhomogeneous, so we don’t even
have to split our solution in different parts as before. Using the method of separation of variables, we assume
u(r, θ) = φ(θ)G(r),
and solve the (PDE) with the 3 homogeneous boundary conditions. As before, we only introduce the nonho-
mogeneous condition in the end.
24
From (BCθ), we deduce that
φ(−π) = φ(π) and φ′(−π) = φ′(π)
The (PDE) becomes:1
r
[rG′(r)
]′φ(θ) +
1
r2G(r)φ′′(θ) = 0.
We want to separate the terms in r from the terms in θ, so we divide by G(r)φ(θ)r2 and we obtain
r
G(r)
[rG′(r)
]′= − 1
φ(θ)φ′′(θ) = λ.
We obtain two problems:
φ′′ = −λφφ(−π) = φ(π)
φ′(−π) = φ′(π).
(BVPθ)
andr[rG′(r)
]′= λG(r)
|G(0)| <∞.(IVPr)
The first problem in θ is the same problem solved in 2.4.2 with L = π, and the eigenvalues are
λn =(nπL
)2
= n2, n = 0, 1, 2, . . . (Eigenvalues)
with the corresponding eigenfunctions
φ0(θ) = 1
φn(θ) = cosnθ and sinnθ.(Eigenfunctions)
For the problem in r, we expand the derivative on the LHS:
r2G′′ + rG′ − n2G = 0 (DEr)
This is a Cauchy-Euler equation. For n = 1, 2, . . ., the characteristic equation is
p(p− 1) + p− n2 = 0
p2 = n2,
so the solutions are
Gn(r) = C1r−n + C2r
n
The initial condition, implies that C1 = 0, so we obtain
Gn(r) = rn.
For the eigenvalue λ0 = 0, we have the solution
G0(r) = C1 + C2 ln r
and the initial condition implies that C2 = 0, so we have
G0(r) = 1.
25
Using the superposition principle, we obtain the solution
u(r, θ) =A0
2+
∞∑n=1
Anrn cosnθ +
∞∑n=1
Bnrn sinnθ.
Now we are ready to introduce the condition (BCr=a):
f(θ) = u(a, θ) =A0
2+
∞∑n=1
Anan cosnθ +
∞∑n=1
Bnan sinnθ,
and we already know the form of the coefficients:
Anan =
1
π
∫ π
−πf(θ) cosnθ dθ
Bnan =
1
π
∫ π
−πf(θ) sinnθ dθ.
26
October 5th
2.5.4 Qualitative properties of the Laplace’s equation
We now study some properties of the solutions.
Mean Value Theorem. In the previous example, we deduced that
u(0, θ) =A0
2=
1
2π
∫ π
−πf(θ) dθ =
1
2π
∫ π
−πu(a, θ) dθ,
i.e., the temperature at the center of the circle is the average of the temperatures at the perimeter of the circle.
Now, assume a domain where we want to solve the Laplace equation. Take any
point P inside that domain, as in the figure. Take a radius a > 0 such that the
circle centered at P with radius a is still inside the domain.
Then we can solve the same problem in 2.5.2 in polar coordinates centered at
P with f(θ) = u(a, θ). We deduce that
u(P ) =1
2π
∫ π
−πu(a, θ) dθ,
and so the same property holds for any P and a in the conditions above.
a
u(a, θ) = f(θ)
P
Maximum Principle. The previous property allows us to easily prove a maximum principle:
In steady state, the temperature cannot attain its maximum (and minimum) in the interior.
Proof. To prove this property, assume by contradiction that the maximum
temperature is attained at a point P in the interior. Then, the mean value
theorem states that this temperature is the average of the temperatures on any
circle still in the inside of the domain. Since the temperature on the circle can’t
be higher than the temperature at P , the only way that the average can be
the maximum is if the temperature on the whole circle is constant and equal
to the maximum. Then we can use the points in the circle to get more circles
until we cover the whole domain.
This proves that if the maximum is attained in the interior, then the temper-
ature is constant throughout the domain.
P
Wellposedness and Uniqueness. Using the maximum principle, we can prove that the Laplace equation is
wellposed, i.e.,
small changes in data → small changes in the solution.
Proof. Suppose that we have the Laplace equation with boundary data f(x, y)∆u = 0
u = f(x, y) on the boundary.
27
Assume also that we have the same problem with boundary data g(x, y) where g is very close to f on the
boundary: ∆v = 0
v = g(x, y) on the boundary.
We want to prove that u and v are very similar.
Take w = u− v, so that w solves ∆w = 0
w = f(x, y)− g(x, y) on the boundary.
The maximum (and minimum) principles state that the maximum (and minimum) of w occur on the boundary:
min(f − g) 6 w 6 max(f − g).
This proves that the result.
We can also use the maximum principle to prove uniqueness of solution.
Proof. Let u be solve the Laplace equation with boundary data f(x, y):∆u = 0
u = f(x, y) on the boundary,
and let v be another solution of the same problem:∆v = 0
v = f(x, y) on the boundary.
Then as before, let w = u− v, which satisfies∆w = 0
w = 0 on the boundary,
so by the maximum principle:
0 = min on boundary 6 w 6 max on boundary = 0,
so w = 0 which means that u = v.
28
October 6th
Solvability condition. When we prescribe the heat flow on the boundary instead of the temperature, the
equation might have no solutions. The reason is that the prescribed heat flow must satisfy a solvability con-
dition.
To find this condition, integrate ∆u = 0 in the domain:
0 =
∫∫∆u dx dy =
∫∫∇ · (∇u) dx dy.
Apply the divergence theorem to deduce
0 =
∮∇u · nds. (SolvabilityCondition)
This last term ∇u · n is proportional to the heat flow, so it implies that the net heat flow must be 000.
Note. n is the vector normal to the boundary pointing outwards, called the outwards unit normal.
3 Fourier Series
3.1 Introduction
Definition. A function f(x) is called piecewise smooth if it is possible to divide the domain in a finite number
of pieces where both f(x) and its derivative f ′(x) are continuous.
All functions in this chapter are assumed to be piecewise smooth unless noted otherwise.
Definition. Given a function f(x), its Fourier series expansion in the interval [−L,L] is
FS(f)(x) =a0
2+
∞∑n=1
an cosnπx
L+
∞∑n=1
bn sinnπx
L
where the Fourier coefficients are
an =1
L
∫ L
−Lf(x) cos
nπx
Ldx,
bn =1
L
∫ L
−Lf(x) sin
nπx
Ldx,
and we write
f(x) ∼ a0
2+
∞∑n=1
an cosnπx
L+
∞∑n=1
bn sinnπx
L,
meaning f(x) has the Fourier series on the right-hand side in [−L,L].
29
3.2 Convergence
Theorem 3.1 (Fourier’s Theorem). If f(x) is piecewise smooth in [−L,L], then the Fourier series of f(x)
converges
1. to the periodic extension of f(x) where it is periodic;
2. to the average of the jump:
FS(f)(x) =f(x−) + f(x+)
2
where the periodic extension is discontinuous.
This means that
f(x) =a0
2+
∞∑n=1
an cosnπx
L+
∞∑n=1
bn sinnπx
L,
for all −L < x < L where the function f(x) is continuous.
To sketch the Fourier series of a function, follow the steps:
1. Sketch f(x) for−L < x < L where f(x) is continuous;
2. Sketch its 2L-periodic extension;
3. Mark the average of all the points where there are
jumps.-10 -7.5 -5 -2.5 0 2.5 5 7.5 10
-2.5
2.5
5
7.5
Continuous Fourier Series. The Fourier series is continuous and converges to f(x) if and only if f(x) is
continuous and f(−L) = f(L).
30
October 8th
3.3 Cosine and Sine Series
3.3.1 Fourier Sine Series
Odd functions. An odd function is a function that satisfies the property: f(−x) = −f(x) for all x.
The Fourier series of an odd function in [−L,L] is
FS(f)(x) =a0
2+
∞∑n=1
an cosnπx
L+
∞∑n=1
bn sinnπx
L
with
an =1
L
∫ L
−Lf(x) cos
nπx
Ldx = 0,
bn =1
L
∫ L
−Lf(x) sin
nπx
Ldx =
2
L
∫ L
0
f(x) sinnπx
Ldx,
so we can simplify to:
FS(f)(x) =
∞∑n=1
bn sinnπx
Lwith bn =
2
L
∫ L
0
f(x) sinnπx
Ldx.
Note. For odd functions, we only need to know the function in [0, L].
Fourier sine series. If the domain is only [0, L], like in the case of the heat conduction in a one-dimensional
rod with frozen ends, it might be convenient to obtain a sine series expansion. In that same example, the
method of separation of variables forced us to use a sine expansion for the initial condition f(x), which was
likely not odd. Because we don’t care about the value of the initial condition outside the rod, we can extend
f(x) to −L 6 x 6 L as an odd function f(x) and use Fourier’s Theorem to write
FS(f)(x) =
∞∑n=1
bn sinnπx
L
But for 0 6 x 6 L, the functions f = f(x), so
FS(f)(x) =
∞∑n=1
bn sinnπx
Lfor 0 6 x 6 L. (Fourier sine series)
To sketch the Fourier sine series of a function, follow the
steps:
1. Sketch f(x) for 0 < x < L where f(x) is continuous;
2. Sketch the odd extension f(x) for −L < x < 0;
3. Sketch its 2L-periodic extension;
4. Mark the average of all the points where there are
jumps.
p 2p!p
31
3.3.2 Fourier Cosine Series
Even functions. An even function is a function that satisfies the property: f(−x) = f(x) for all x.
The Fourier series of an even function in [−L,L] is
FS(f)(x) =a0
2+
∞∑n=1
an cosnπx
L+
∞∑n=1
bn sinnπx
L
with
an =1
L
∫ L
−Lf(x) cos
nπx
Ldx =
2
L
∫ L
0
f(x) cosnπx
Ldx,
bn =1
L
∫ L
−Lf(x) sin
nπx
Ldx = 0,
so we can simplify to:
FS(f)(x) =a0
2+
∞∑n=1
an cosnπx
Lwith an =
2
L
∫ L
0
f(x) cosnπx
Ldx.
Note. For even functions, we only need to know the function in [0, L].
Fourier cosine series. If the domain is only [0, L], like in the case of the heat conduction in a one-dimensional
rod with insulated ends, it might be convenient to obtain a cosine series expansion. In that same example, the
method of separation of variables forced us to use a cosine expansion for the initial condition f(x), which was
likely not even. Because we don’t care about the value of the initial condition outside the rod, we can extend
f(x) to −L 6 x 6 L as an even function f(x) and use Fourier’s Theorem to write
FS(f)(x) =a0
2+
∞∑n=1
an cosnπx
L
But for 0 6 x 6 L, the functions f = f(x), so
FS(f)(x) =a0
2+
∞∑n=1
an cosnπx
Lfor 0 6 x 6 L. (Fourier cosine series)
To sketch the Fourier cosine series of a function, follow the
steps:
1. Sketch f(x) for 0 < x < L where f(x) is continuous;
2. Sketch the even extension f(x) for −L < x < 0;
3. Sketch its 2L-periodic extension;
4. Mark the average of all the points where there are
jumps.
p 2p!p
Note. Read sections 3.3.4 and 3.3.5.
32
October 13th
Review
October 15th
Midterm #1
33
October 19th
Computations using Fourier series
Example. Find the Fourier series for the function f(x) = x in [0, π] and use it to compute
∞∑n=1n odd
1
n2.
Solution. Because we only want the Fourier series in the interval [0, π], we can choose to extend the function
as an even function or an odd function. If we choose the even extension, then we obtain:
FS(f)(x) =a0
2+
∞∑n=1
an cosnx (L = π)
with
an =2
π
∫ π
0
x cosnx dx.
We compute the coefficients:
a0 =2
π
∫ π
0
x dx = π
an =2
π
∫ π
0
x cosnx dx (integrate by parts with u = x, dv = cosnx)
=2
π
[x
nsinnx
∣∣∣∣π0
− 1
n
∫ π
0
sinnx dx
]=
2
πn2cosnx
∣∣∣∣π0
=2
πn2(cosnπ − 1) =
2
πn2((−1)n − 1)0 if n is even
− 4πn2 if n is odd
So
FS(f)(x) =π
2−
∞∑n=1n odd
4
πn2cosnx =
π
2− 4
πcosx− 4
9πcos 3x− 4
25πcos 5x− · · ·
Observe that, if we find x0 such that cosnx0 = 1 for all n odd, then
FS(f)(x0) =π
2−
∞∑n=1n odd
4
πn2
and we can compute the series. In fact, x0 = 0 satisfies the condition, and the even extension f(x) of f(x) is
continuous at x0 = 0 and satisfies f(0) = 0, so
0 = f(0) = FS(f)(0) =π
2−
∞∑n=1n odd
4
πn2
and we conclude that∞∑n=1n odd
1
n2=π2
8.
34
3.4 Term-by-term Differentiation of Fourier Series
When we use the method of separation of variables to solve a PDE we obtain a solution in the form of an infinite
series. This solution is obtained by making sure the each individual term solves the PDE, and when we join all
the terms together they solve the initial condition as well.
The problem with infinite series expansions is that sometimes it is not possible to differentiate term-by-term.
So we question, does the solution obtained actually solve the problem?
Example. Take the example of the heat conduction problem with frozen ends:
∂u
∂t= k
∂2u
∂x2,
u(0, t) = u(L, t) = 0,
u(x, 0) = f(x).
The solution by the method of separation of variables is
u(x, t) =
∞∑n=1
Bn sinnπx
Le−(nπL )
2kt.
We can verify that this solution actually solves the problem. If the infinite Fourier sine series can be
differentiated term-by-term, then we have
∂u
∂t= −
∞∑n=1
k(nπL
)2
Bn sinnπx
Le−(nπL )
2kt,
∂2u
∂x2= −
∞∑n=1
(nπL
)2
Bn sinnπx
Le−(nπL )
2kt,
so∂u
∂t= k
∂2u
∂x2is satisfied.
Fourier Series. A continuous Fourier series can be differentiated term-by-term if f ′(x) is piecewise smooth.
Which implies that:
If f ′(x) is piecewise smooth, then the Fourier series of a continuous function f(x) can be
differentiated term-by-term if f(−L) = f(L).
So
f ′(x) ∼ −∞∑n=1
Annπ
Lsin
nπx
L+
∞∑n=1
Bnnπ
Lcos
nπx
L.
Fourier cosine series. If f ′(x) is piecewise smooth, then the Fourier series of a continuous function f(x) can
be differentiated term-by-term.
Fourier sine series. If f ′(x) is piecewise smooth, then the Fourier series of a continuous function f(x) can
be differentiated term-by-term if f(0) = 0 and f(L) = 0.
35
When we try to prove this result (see pages 120-121 in the textbook), we obtain a formula for the derivative of
the Fourier sine series of a continuous function f(x) when the condition f(0) = f(L) = 0 is not satisfied. Then
f ′(x) ∼ f(L)− f(0)
L+
∞∑n=1
[nπ
LBn +
2((−1)nf(L)− f(0)
)L
]cos
nπx
L.
36
October 20th
3.5 Term-by-term Integration of Fourier Series
A Fourier series of a piecewise smooth f(x) can always be integrated term-by-term. Moreover, the result is a
convergent infinite series that always converges to the integral of f(x):
∫ x
−Lf(t) dt for all −L 6 x 6 L.
If
f(x) ∼ a0
2+
∞∑n=1
(an cos
nπx
L+ bn sin
nπx
L
)then ∫ x
−Lf(t) dt =
a0
2(x+ L) +
∞∑n=1
(an
∫ x
−Lcos
nπt
Ldt+ bn
∫ x
−Lsin
nπt
Ldt
).
8 Nonhomogeneous Problems
8.2 Heat Flow with Sources and Nonhomogeneous Boundary Conditions
Example (Time Independent Boundary Conditions). Consider the heat equation:
∂u
∂t= k
∂2u
∂x2
and with the boundary conditions
u(0, t) = A
u(L, t) = B
and initial condition
u(x, 0) = f(x)
Find the solution.
Solution. We divide the solution in steps.
Step 1. Equilibrium temperature.
First we obtain an equilibrium temperature uE(x) satisfying the boundary conditions:
d2uEdx2
= 0
uE(0) = A
uE(L) = B
This can be easily found:
uE(x) = A+B −AL
x
37
Step 2. Displacement from equilibrium.
Now we introduce the difference between the actual temperature and the equilibrium temperature:
v(x, t) = u(x, t)− uE(x).
This function v satisfies:
∂v
∂t=∂u
∂t∂2v
∂x2=∂2u
∂x2− ∂2uE
∂x2=∂2u
∂x2
So v(x, t) satisfies the problem:
∂v
∂t= k
d2uEdx2
v(0, t) = v(L, t) = 0
v(x, 0) = f(x)− uE(x)
This is the heat equation with frozen ends, which we have solved:
v(x, t) =
∞∑n=1
bn sinnπx
Le−(nπL )
2kt
with
bn :=2
L
∫ L
0
(f(x)− uE(x)
)sin
nπx
Ldx.
We conclude that the solution is:
u(x, t) = uE(x) +
∞∑n=1
bn sinnπx
Le−(nπL )
2kt.
Note that as time passes t → ∞, the temperature approaches the equilibrium temperature, independently of
the initial condition.
38
October 22nd
8.3 Method of Eigenfunction Expansion with Homogeneous Boundary Conditions
The results on the differentiation term-by-term, allow us to solve the heat conduction with heat sources.
Example (Exercise 3.4.11 or 8.3.2). Consider the heat equation with a steady heat source:
∂u
∂t= k
∂2u
∂x2+Q(x)
and with the boundary conditions
u(0, t) = u(L, t) = 0
and initial condition
u(x, 0) = f(x)
Find the solution, assuming that a continuous solution with continuous derivatives exist.
Solution. We divide the solution in steps:
Step 1. Ignoring the heat source Q(x), find the eigenvalues and eigenfunctions.
Using the method of separation of variables, we have:
u(x, t) = G(t)φ(x),
so ignoring the heat sources, we obtain the eigenvalue problem:
φ′′(x) + λφ(x) = 0
φ(0) = φ(L) = 0
We solve the problem and obtain:
λn =(nπL
)2
, n = 1, 2, . . . (Eigenvalues)
φn(x) = sinnπx
L(Eigenfunctions)
Step 2. Use superposition principle.
We obtain
u(x, t) =
∞∑n=1
Gn(t) sinnπx
L
39
Step 3. Find differential equation for Gn(t).
Now we plug this expression for u(x, t) back into the original PDE (with the heat source Q(x)): First we
calculate
∂u
∂t=
∞∑n=1
G′n(t) sinnπx
L
∂2u
∂x2= −
∞∑n=1
(nπL
)2
Gn(t) sinnπx
L
and we expand the heat source Q(x) using the Fourier sine series expansion:
Q(x) ∼∞∑n=1
qn sinnπx
L,
which means that
qn =2
L
∫ L
0
Q(x) sinnπx
Ldx.
We now rewrite the PDE:
∞∑n=1
G′n(t) sinnπx
L= −
∞∑n=1
k(nπL
)2
Gn(t) sinnπx
L+
∞∑n=1
qn sinnπx
L
which simplifies to∞∑n=1
[G′n(t) +
(nπL
)2
kGn(t)− qn]
sinnπx
L= 0
So we conclude that Gn(t) satisfies:
G′n(t) +(nπL
)2
kGn(t)− qn = 0
Step 4. Find Gn(t).
The DE for Gn(t) is nonhomogeneous, so we first find the homogeneous solution:
Ghn(t) = e−(nπL )2kt
and we find one particular solution:
Gpn(t) =qnL
2
(nπ)2k.
We obtain:
Gn(t) =qnL
2
(nπ)2k+Dne
−(nπL )2kt
Step 5. Write solution.
The solution is
u(x, t) =
∞∑n=1
[qnL
2
(nπ)2k+Dne
−(nπL )2kt
]sin
nπx
L
40
Step 6. Match the initial condition.
The initial condition is
f(x) = u(x, 0) =
∞∑n=1
[CnL
2
(nπ)2k+Dn
]︸ ︷︷ ︸
Bn
sinnπx
L
so we know the expression for Bn:
Bn =2
L
∫ L
0
f(x) sinnπx
Ldx,
thus
Dn = Bn −CnL
2
(nπ)2k
Dn =2
L
∫ L
0
f(x) sinnπx
Ldx− CnL
2
(nπ)2k
Dn =2
L
∫ L
0
f(x) sinnπx
Ldx− 2L
(nπ)2k
∫ L
0
g(x) sinnπx
Ldx
The solution can be written as:
u(x, t) =
∞∑n=1
[CnL
2
(nπ)2k+Dne
−(nπL )2kt
]sin
nπx
L
with the constants calculated above.
Note. In the case of the general heat equation with prescribed temperature at the ends:
∂u
∂t= k
∂2u
∂x2+Q(x, t)
and with the boundary conditions
u(0, t) = A(t)
u(L, t) = B(t)
and initial condition
u(x, 0) = f(x).
We proceed in steps:
Step 1. Reference temperature r(x, t).
∂2r
∂x2= 0
r(0, t) = A(t)
r(L, t) = B(t)
So one possible choice is
r(x, t) = A(t) +B(t)−A(t)
Lx
41
October 26th
Step 2. Displacement from reference. As before, we let
v(x, t) = u(x, t)− r(x, t)
and compute its derivatives:
∂v
∂t=∂u
∂t− ∂r
∂t∂2v
∂x2=∂2u
∂x2− ∂2r
∂x2=∂2u
∂x2
So v(x, t) satisfies the problem:
∂v
∂t= k
d2v
dx2+Q(x, t)
v(0, t) = v(L, t) = 0
v(x, 0) = g(x)
where
Q(x, t) = Q(x, t)− ∂r
∂t(x, t)
g(x) = f(x)− r(x, 0) = f(x)−A(0)− B(0)−A(0)
Lx
Step 3. Find v(x, t) using the method of eigenfunction expansion.
The difference with the example we solved is that Q now depends on x and t, so the differential equation used
to calculate Gn(t) is a little more complicated.
4 Wave Equation: Vibrating Strings and Membranes
4.2 Derivation of a vertically vibrating string
Consider a tightly horizontally stretched string with the ends tied down in some way (as you can imagine, the
way which we tie the ends will be part of the boundary conditions). In principle, a point A of the string may
move in any direction, so
Assumption 1: The perturbation from horizontal is very
small. This way, we can neglect the horizontal displacement.
The displacement is entirely vertical:
y = u(x, t).x
u(x, t)
The goal is to deduce a PDE describing how the vertical displacement of the string changes with time.
42
Newton’s Law. We consider an infinitesimally thin segment of string between x and ∆x in the unperturbed
horizontal position.
Total mass = ρ0(x)∆x
For a point mass, we have:
~F = m~a (Newton’s Law)
Which forces are acting on the segment of string?
There are forces acting vertically on the body of the string, e.g. gravity, and forces acting on the ends of the
segment of string.
Assumption 2: The string is perfectly flexible – it offers no resistance to bending.
This means that the force acting on the ends has the direction tangential to the string. The magnitude of this
force is called tension:
T (x, t) = force exerted at point x and time t in the direction tangent to the string (Tension)
x x + ∆x
T (x, t) T (x + ∆x, t)θ(x, t)
θ(x + ∆x, t)
To express the tension, we need to find an expression for the angle of the string θ(x, t):
tan θ(x, t) =dy
dx=∂u
∂x.
From Newton’s Law, we obtain two equations:
Horizontal component of Force = very small = negligible
Vertical component
of Force=
Vertical component
of tensile forces+
Vertical component
of body forces
Now we look at each term in detail for the segment of string:
Vertical component
of Force= F2 = ma2 = ρ0(x)∆x
∂2u
∂t2(by Newton’s Law)
Vertical component
of tensile forces= T (x+ ∆x, t) sin θ(x+ ∆x, t)− T (x, t) sin θ(x, t)
Vertical component
of body forces= ρ0(x)∆xQ(x, t)
where Q(x, t) is the vertical component of the body force per unit mass.
43
We have:
ρ0(x)∆x∂2u
∂t2= T (x+ ∆x, t) sin θ(x+ ∆x, t)− T (x, t) sin θ(x, t) + ρ0(x)∆xQ(x, t)
Divide everything by ∆x:
ρ0(x)∂2u
∂t2=T (x+ ∆x, t) sin θ(x+ ∆x, t)− T (x, t) sin θ(x, t)
∆x+ ρ0(x)Q(x, t)
and take the limit as ∆x→ 0+:
ρ0(x)∂2u
∂t2=
∂
∂x[T (x, t) sin θ(x, t)] + ρ0(x)Q(x, t)
Assumption 3: The angles θ are small, i.e. θ ≈ 0, so
∂u
∂x= tan θ =
sin θ
cos θ≈ sin θ
The equation becomes:
ρ0(x)∂2u
∂t2=
∂
∂x
(T∂u
∂x
)+ ρ0(x)Q(x, t) (Newton’s Law)
44
October 27th
Perfectly Elastic Strings. Most strings are perfectly elastic, which means that the tensile force T (x, t)
depends only on how stretched the string is near the point x.
We assumed that θ is very small, so the displacement is very small too, thus the string is stretched as much as
in the unperturbed setting. This implies that
T (x, t) ≈ T0 constant.
The small vertical vibrations of a highly stretched string satisfies:
ρ0(x)∂2u
∂t2= T0
∂2u
∂x2+ ρ0(x)Q(x, t) (Highly stretched string)
One-dimensional Wave Equation. Often, gravity is the only body force, and as often the tensile force is
much stronger than the gravitational one: ρ0g �∣∣∣T0
∂2u∂x2
∣∣∣, so we can neglect the influence of the body forces:
Q(x, t) = 0.
ρ0(x)∂2u
∂t2= T0
∂2u
∂x2
or∂2u
∂t2= c2
∂2u
∂x2(Wave Equation)
where c2 = T0
ρ0(x) .
4.3 Boundary Conditions
The PDE obtained is of second-order, so we expect two boundary conditions: one at each end.
Fixed end. If the string is fixed at one end, as in a musical instrument, then the vertical displacement u = 0
at that end:
u(0, t) = 0.
However, we may prescribe the displacement at the end which changes with time:
u(0, t) = f(t).
Free end. If the string can move freely in the vertical direction, as in a frictionless track, then the vertical
component of the tensile force is 0 at the end:
T0∂u
∂x(L, t) = 0.
45
String attached to a Spring. If the string is attached to a spring-mass system, as in the figure.
m
y(t)
ys(t)
Then the displacement on the end of the string is the same as the displacement y(t) of the mass attached to
the spring.
u(0, t) = y(t)
On the other hand, y(t) satisfies its own dynamical system (ODE):
md2y
dt2= −k(y(t)− ys(t)− `) + other forces applied to the mass (Hooke’s Law)
where ` is the unstretched length of the spring and ys(t) is the position of the support of the spring.
The other force applied to the spring is the tensile force applied by the string T (0, t) sin θ(0, t) ≈ T0∂u∂x (0, t) and
a force g(t) representing other external forces:
m∂2u
∂t2(0, t) = −k(u(0, t)− ys(t)− `) + T0
∂u
∂x(0, t) + g(t) (Hooke’s Law)
after substituting y(t) = u(0, t).
String and Massless-Spring. If the mass is very small, m = 0 and there are no external forces g(t) = 0,
then
T0∂u
∂x(0, t) = k(u(0, t)− uE(t))
where uE(t) = ys(t)− ` is the equilibrium position of the spring-mass system.
Moreover, if the equilibrium position matches the unperturbed position of the string: uE(t) = 0 and
T0∂u
∂x(0, t) = k u(0, t)
which is homogeneous.
This condition changes sign when applied to the other end:
T0∂u
∂x(L, t) = −k(u(L, t)− uE(t)).
46
October 29th
4.4 Vibrating String with Fixed Ends
We will now work out the following problem:
∂2u
∂t2= c2
∂2u
∂x2(PDE)
u(0, t) = 0 (BC1)
u(L, t) = 0 (BC2)
u(x, 0) = f(x) (IC1)
∂u
∂t(x, 0) = g(x) (IC2)
for t > 0 and 0 6 x 6 L.
We need two initial conditions because the problem is of second-order in time.
Apply the method of separation of variables: u(x, t) = φ(x)h(t), which implies
φ(x)h′′(t) = c2φ′′(x)h(t)
Divide both sides by c2φ(x)h(t) to obtain:
h′′(t)
c2h(t)=φ′′(x)
φ(x)= −λ
and we obtain two ODEs:
h′′(t) = −c2λh(t) (ODEt)
φ′′(x) = −λφ(x) (ODEx)
where λ = separation constant. The boundary conditions yield:
φ(0) = φ(L) = 0,
so we solve the eigenvalue problem in φ(x):
λn =(nπL
)2
, n = 1, 2, . . .
φn(x) = sinnπx
L
For the problem in t, we obtain:
hn(t) = C1 cosncπt
L+ C2 sin
ncπt
L
Using the superposition principle, we conclude that the solution is:
u(x, t) =
∞∑n=1
[An cos
ncπt
L+Bn sin
ncπt
L
]sin
nπx
L.
47
We now introduce the initial conditions:
f(x) = u(x, 0) =
∞∑n=1
An sinnπx
L
g(x) =∂u
∂t(x, 0) =
∞∑n=1
Bnncπ
Lsin
nπx
L
This means that we expand the functions f(x) and g(x) using a Fourier sine series:
An =2
L
∫ L
0
f(x) sinnπx
Ldx
Bnncπ
L=
2
L
∫ L
0
g(x) sinnπx
Ldx
Note. If this is about a musical instrument, then what information can we tell about the sound?
1. Each term of the series is called a normal mode of vibration
2. To find the amplitude and frequency, we need to write
An cosncπt
L+Bn sin
ncπt
L= A sin(ωt+ θ)
which implies that
A =√A2n +B2
n = amplitude
ω =ncπ
2πL= frequency
θ = arctanAnBn
3. The first normal mode is called the first harmonic or fundamental, and it decides the frequency of the
sound, so the frequency is ω = c2L .
4. Recall that c =√
T0
ρ0, where T0 is the tension on the string and ρ0 the mass density.
Since in a musical instrument, the mass density is fixed and so is the length of the string, the best way to
tune it is by adjusting the tension T0.
When the player clamps down a string with a finger, he/she is shortening the length L, thus producing a
higher pitched sound.
5. Frequency of middle A is 220Hz (1Hz = 1 vibration per second) so the period is 157cm. To go up one
octave, you just have to roughly double the frequency or halve the period.
48
November 2nd
Note. If we use some trigonometric formulas to simplify the terms in the series of u(x, t), we have
cosncπt
Lsin
nπx
L=
1
2sin
nπ
L(x− ct) +
1
2sin
nπ
L(x+ ct)
sinncπt
Lsin
nπx
L=
1
2cos
nπ
L(x− ct)− 1
2cos
nπ
L(x+ ct)
so we can simplify the formula for u(x, t)
u(x, t) = R(x− ct) + S(x+ ct)
with
R(z) =
∞∑n=1
[An2
sinnπz
L+Bn2
cosnπz
L
]
S(z) =
∞∑n=1
[An2
sinnπz
L− Bn
2cos
nπz
L
]This means that the string vibrates in the shape of a combination of two waves: one with velocity c and the
other with velocity −c.
7 Higher Dimensional PDEs
7.3 Vibrating Rectangular Drum
We didn’t see it, but the equation for a vibrating membrane is:
∂2u
∂t2= c2
(∂2u
∂x2+∂2u
∂y2
),
for 0 6 x 6 L, and 0 6 y 6 H.
We suppose that the membrane is rectangular and that its boundary is fixed:
u(0, y, t) = u(L, y, t) = 0
u(x, 0, t) = u(x,H, t) = 0
and because thee equation is of second-order in time, we need two initial conditions:
u(x, y, 0) = α(x, y)
∂u
∂t(x, y, 0) = β(x, y).
To solve we use the method of separation of variables, but since there are 3 variables x, y, and t, we need to
separate them in two steps. First we separate the time variable from the spatial variables: take u(x, y, t) =
φ(x, y)h(t) and we obtain
φ(x, y)h′′(t) = c2h(t)
(∂2φ
∂x2+∂2φ
∂y2
)
49
then dividing by c2φ(x, y)h(t):h′′(t)
c2h(t)=
1
φ
(∂2φ
∂x2+∂2φ
∂y2
)= −λ
and we deduce
h′′(t) = −λc2h(t)
∂2φ
∂x2+∂2φ
∂y2= −λφ
Now we separate the spatial variables: take φ(x, y) = f(x)g(y) and obtain
f ′′(x)g(y) + f(x)g′′(y) = −λf(x)g(y)
so dividing everything by f(x)g(y) we get
f ′′(x)
f(x)= −λ− g′′(y)
g(y)= −µ
and we have two equations for f(x) and g(y):
f ′′(x) = −µf(x)
g′′(y) = −(λ− µ)g(y)
The boundary conditions also become:
f(0) = f(L) = 0
g(0) = g(H) = 0.
We already know the solution of the eigenvalue problem in f(x):
µn =(nπL
)2
(Eigenvalues)
fn(x) = sinnπx
L(Eigenfunctions)
For each n, we solve the problem for g(y), which is the same eigenvalue problem with λ− µn instead of λ:
λn,m − µn =(mπH
)2
(Eigenvalues)
gm(x) = sinmπx
H(Eigenfunctions)
so
λn,m = µn +(mπH
)2
=(nπL
)2
+(mπH
)2
> 0.
We conclude that
φ(x, y) = sinnπx
Lsin
mπy
Hfor n,m = 1, 2, 3, . . .
50
November 3rd
Because λn,m are all positive, we can now solve the problem for h(t):
h′′(t) = −λn,mc2h(t)
which has the solution
hn,m(t) = C1 cos c√λn,mt+ C2 sin c
√λn,mt
Using the superposition principle, we get the solution
u(x, y, t) =
∞∑n=1
∞∑m=1
[An,m cos c
√λn,mt+Bn,m sin c
√λn,mt
]sin
nπx
Lsin
mπy
H
Now we use the initial conditions to find the constants An,m and Bn,m:
α(x, y) = u(x, y, 0) =
∞∑n=1
∞∑m=1
An,m sinnπx
Lsin
mπy
H
β(x, y) =∂u
∂t(x, y, 0) =
∞∑n=1
∞∑m=1
Bn,m sinnπx
Lsin
mπy
H
This means that
α(x, y)︸ ︷︷ ︸=F (y)
=
∞∑m=1
( ∞∑n=1
An,m sinnπx
L
)︸ ︷︷ ︸
=coeff indep of y=Am
sinmπy
H,
so∞∑n=1
An,m sinnπx
L=
2
H
∫ H
0
α(x, y) sinmπy
Hdy
and then
An,m =2
L
∫ L
0
(2
H
∫ H
0
α(x, y) sinmπy
Hdy
)sin
nπx
Ldx.
Similarly, we get
c√λn,mBn,m =
4
LH
∫ L
0
∫ H
0
α(x, y) sinmπy
Hsin
nπx
Ldy dx.
Similarly to the vibrating string, we can put together the sines and cosines in t to get the amplitude and
frequency of a rectangular drum:
amplitude of each normal mode =√A2n,m +B2
n,m
frequency of each normal mode = c√λn,m = cπ
√(nL
)2
+(mH
)2
frequency = cπ
√1
L2+
1
H2= π
√T0
ρ0
√1
L2+
1
H2
51
12 The Method of Characteristics for Linear and Quasilinear Wave
Equations
12.1 Introduction
We saw in section 4.4 that the solution of the one-dimensional wave equation
∂2u
∂t2= c2
∂2u
∂x2
with fixed ends and the initial conditions
u(x, 0) = f(x)
∂u
∂t(x, 0) = g(x),
has the form
u(x, t) =
∞∑n=1
[An2
sinnπ(x− ct)
L+An2
sinnπ(x+ ct)
L+Bn2
cosnπ(x− ct)
L− Bn
2cos
nπ(x+ ct)
L
]where
f(x) ∼∞∑n=1
An sinnπx
L
g(x) ∼∞∑n=1
Bnnπc
Lsin
nπx
L
52
November 5th
so using the integration term-by-term,
1
c
∫ x
0
g(s) ds = −∞∑n=1
Bn
(cos
nπx
L− 1).
We can now rewrite the solution u(x, t)
u(x, t) =f(x− ct) + f(x+ ct)
2+
1
2c
∫ x+ct
x−ctg(s) ds
where f(x) and g(x) are the odd periodic extensions of the original functions in the initial conditions.
This means that the wave equation models two waves moving in the opposite direction with speed c.
The way to get to this conclusion passed through getting the Fourier sine series of the initial conditions f(x)
and g(x) and then going back from the Fourier sine series to the original functions again.
This gives us some extra information:
• When we get from the Fourier sine series to the original functions, we don’t recover the original functions,
but their odd periodic extensions.
• This implies that the waves “bounce” when they get to the end of the string.
However, we can get the same result with a simpler method, called the method of characteristics. The goal
of this method is to find the path on which the solution is moving: in this case x = ±ct.
12.2 Characteristics for First-Order Wave Equations
We start with a simpler PDE:∂w
∂t+ c
∂w
∂x= 0
with the initial condition
w(x, 0) = P (x).
Idea: Find a moving observer x(t) such that w seems to be stopped for that observer, i.e.
d
dtw(x(t), t
)= 0
On one hand:d
dtw(x(t), t
)=∂w
∂t+∂w
∂x
dx
dt
On the other hand, we know that∂w
∂t= −c∂w
∂x,
thus∂w
∂x
(dx
dt− c)
= 0.
53
This implies that either∂w
∂x= 0
which means that w does not depend on x and so we get a constant solution – the initial condition should
discard this option; ordx
dt= c → x = ct+ x0,
which means thatdw
dt= 0,
so w is constant, which implies that
w(x(t), t
)= w(x0, 0) = P (x0).
But from the equation for x, we know that x0 = x− ct:
w(x(t), t
)= w(x0, 0) = P (x− ct).
Then, for any x and t, we can find x0 such that x = ct+ x0. Indeed x0 = x− ct. Thus
w(x, t) = P (x0) = P (x− ct).
We deduced that the solution is
w(x, t) = P (x− ct).
In fact, it is easy to prove that a solution of the PDE
∂w
∂t+ c
∂w
∂x= 0
always takes the form
w(x, t) = P (x− ct)
for some function P .
Proof. Let w(x, t) = P (x− ct). Then
∂w
∂t= P ′(x− ct) ∂
∂t(x− ct) = −cP ′(x− ct)
∂w
∂x= P ′(x− ct) ∂
∂x(x− ct) = P ′(x− ct)
so∂w
∂t+ c
∂w
∂x= 0.
54
November 9th
Example. Solve the initial-value problem
∂w
∂t+ 3t2
∂w
∂x= 0
w(x, 0) =
0 x < 0
x(1− x) 0 6 x 6 1
0 x > 1.
Solution. To find the solution, we first find the characteristics x(t) such thatdw
dt(x(t), t) = 0:
dw
dt(x(t), t) =
∂w
∂t+∂w
∂x
dx
dt=
(dx
dt− 3t2
)∂w
∂x= 0
which implies thatdx
dt= 3t2
so
x(t) = t3 + x0.
This means that
w(x, t) = P (x− t3),
for some function P . Using the initial condition
w(x, 0) = P (x) =
0 x < 0
x(1− x) 0 6 x 6 1
0 x > 1
so we deduce that
w(x, t) = P (x− t3) =
0 x < t3
(x− t3)(1− x+ t3) t3 6 x 6 1 + t3
0 x > 1 + t3
55
12.3 Method of Characteristics for One-Dimensional Wave Equation
12.3.1 General Solution
From the one-dimensional wave equation∂2u
∂t2− c2 ∂
2u
∂x2= 0,
we can derive two first-order partial differential equations by rewriting the equation:(∂
∂t+ c
∂
∂x
)(∂u
∂t− c∂u
∂x
)= 0(
∂
∂t− c ∂
∂x
)(∂u
∂t+ c
∂u
∂x
)= 0
Let
w =∂u
∂t− c∂u
∂x
v =∂u
∂t+ c
∂u
∂x
which satisfy
∂w
∂t+ c
∂w
∂x= 0
∂v
∂t− c ∂v
∂x= 0
From 12.2, we know that
w =∂u
∂t− c∂u
∂x= P (x− ct) (12.1)
v =∂u
∂t+ c
∂u
∂x= Q(x+ ct). (12.2)
Since both w and v satisfy the original wave equation, we can add them together (superposition principle) and
obtain a general solution
u(x, t) = P (x− ct) +Q(x+ ct)
which is the sum of P (x− ct) = a wave of fixed shape moving to the right at velocity c and Q(x+ ct) = a wave
of fixed shape moving to the left at velocity −c.To sketch the solution, we only need to find P (x) and Q(x).
56
November 10th
Review
November 12th
Midterm #2
57
November 16th
12.3.2 Wave Equation in an Infinite Domain
To simplify matters, assume we have an infinite vibrating string! This condition is not as bad as it sounds, as
we are going to see in an example later.
We already know that the solution of the wave equation is
u(x, t) = P (x− ct) +Q(x+ ct),
for some functions P and Q.
The goal is to use the initial conditions
u(x, 0) = f(x) for −∞ < x <∞∂u
∂t(x, 0) = g(x) for −∞ < x <∞
to deduce expressions for P and Q.
The initial conditions imply
f(x) = P (x) +Q(x) (1)
g(x)
c= −P ′(x) +Q′(x). (2)
Take the derivative of (1):
f ′(x) = P ′(x) +Q′(x),
and add this to (2) to get
f ′(x) +g(x)
c= 2Q′(x).
Integrate this equation∫ x
0ds to obtain∫ x
0
Q′(s) ds =1
2
∫ x
0
(f ′(s) +
g(s)
c
)ds
Q(x)−Q(0) =1
2
(f(x)− f(0) +
1
c
∫ x
0
g(s) ds
)Q(x) =
1
2f(x) +
1
2c
∫ x
0
g(s) ds+ C (?)
where C = Q(0)− 12f(0).
And using (1), we obtain
P (x) =1
2f(x)− 1
2c
∫ x
0
g(s) ds− C (#)
This means that the solution is:
u(x, t) =f(x− ct) + f(x+ ct)
2+
1
2c
∫ x+ct
x−ctg(s) ds.
58
Example. Suppose you have an infinite vibrating string which is initially stretched into the position
u(x, 0) =
0 |x| > 1
1 |x| 6 1
and let go from rest:
∂u
∂t(x, 0) = g(x) = 0. -3 -2 -1 0 1 2 3
0.5
1
1.5
The vertical position of the string is given by
u(x, t) =1
2f(x− ct) +
1
2f(x+ ct),
which is the sum of two functions:
P (x− ct) =1
2f(x− ct) =
standing wave of half the size of the original
configuration moving to the right at speed c
Q(x+ ct) =1
2f(x+ ct) =
standing wave of half the size of the original
configuration moving to the left at speed −c
To sketch the graph, we need to sketch both functions, one moving to the right and the other to the left and
add them together where they overlap.
t
x
P = Q = 0 P = Q = 0
P = Q = 0
P = Q = 12
P = 12 , Q = 0P = 0, Q = 1
2
solution u(x, t) important characteristics for sketching
Notice that the only difference with a finite string is that in the finite string, at some point in time the waves
would hit the boundary and in the infinite string they never do.
From our study using the Method of Separation of Variables, we have an idea of what happens to the waves
when they hit the boundary. We’ll study that case later.
59
November 17th
Example. Suppose you have an infinite vibrating string which is initially stretched horizontally
u(x, 0) = f(x) = 0
but it has the initial velocity
∂u
∂t(x, 0) = g(x) =
0 |x| > 1
1 |x| 6 1
You can think of it as a boat, which after passing, the water that is under it comes up. So at some point right
after the boat has passed, the surface of the water is straight, but it has vertical speed:
water
boat
The vertical position of the string is given by
u(x, t) =1
2c
∫ x+ct
x−ctg(s) ds =
1
2c
∫ x+ct
0
g(s) ds− 1
2c
∫ x−ct
0
g(s) ds = F (x+ ct)− F (x− ct),
with
F (x) =1
2c
∫ x
0
g(s) ds =
−1 x < −1
x −1 < x < 1
1 x > 1
which is the sum of two functions:
− 1
2cF (x− ct) = standing wave moving to the right at speed c
1
2cF (x+ ct) = standing wave moving to the left at speed − c
To sketch the graph, we need to sketch both functions, one moving to the right and the other to the left and
add them together where they overlap.
(lower c) (higher c)
60
Notice that the maximum height of the wave is 1c and c =
√T0
ρ0, so the height and speed depend on the string:
more tension on the string → faster moving wave, but smaller.
12.3.3 D’Alembert’s Solution
As we’ve seen before, the solution of the one-dimensional wave equation is
u(x, t) =f(x− ct) + f(x+ ct)
2+
1
2c
∫ x+ct
x−ctg(s) ds.
This formula, although not ideal for sketching the solution, is good for showing some other features of the
solutions to the wave equation.
Domain dependence. Because the solution is constant along charac-
teristic lines, for each point (x, t), we can plot the domain that affects
the solution at this point.
In fact, each point (x, t) depends only on the value of f at the two
bottom vertices of the triangle and on the value of g on the whole base
of the triangle.
(x, t)
x + ctx − ct
t
x
Range of Influence. For the same reasons, we can plot how the influence of a point (x0, 0) propagates with
time.
t
x
x0
x = ct + x0x = −ct + x0
61
November 19th
12.4 Semi-Infinite Strings and Reflections
Now we will solve the one-dimensional wave equation on a semi-infinite string: x > 0:
∂2u
∂t2= c2
∂2u
∂x2(PDE)
u(x, 0) = f(x) (IC1)
∂u
∂t(x, 0) = g(x) (IC2)
We now need a boundary condition at x = 0. We assume that the string is fixed there:
u(0, t) = 0 (BC)
We know that the solution is
u(x, t) = P (x− ct) +Q(x+ ct)
with
P (x) =1
2f(x) +
1
2c
∫ x
0
g(s) ds
Q(x) =1
2f(x)− 1
2c
∫ x
0
g(s) ds
Note that P and Q are only defined for x > 0, so right now, we can only tell what the solution is when
x− ct > 0 → x > ct
x+ ct > 0 → x > −ct always true because x > 0
t
x
x = ct
x > ct
x < ct
• When x > ct, the solution is the same, which means that because the string has finite speed c, it doesn’t
know that there is a boundary.
• When x < ct, we can still define Q(x+ ct), but not P (x− ct), so we have to use the boundary condition
to help us determine that part of the solution.
When x = 0, we have
0 = u(0, t) = P (−ct) +Q(ct) for all t > 0
so
P (z) = −Q(−z) when z < 0
So the solution for x < ct is
u(x, t) = Q(x+ ct)−Q(ct− x) =f(x+ ct)− f(ct− x)
2+
1
2c
∫ x+ct
ct−xg(s) ds.
62
We can use the characteristic method to interpret this solution. It is as
if the characteristic line bounces on the boundary x = 0, but with the
opposite sign. In fact the condition P (z) = −Q(−z) implies that
1
2f(x) +
1
2c
∫ x
0
g(s) ds = −1
2f(−x) +
1
2c
∫ −x0
g(s) ds,
t
x
x = ct
x0 − ct0 x0 + ct0ct0 − x0
Qconstant
Pco
nst
(x0, t0)
which can be achieved if we extend the functions f and g as odd functions: f(−x) = −f(x) and g(−x) = g(x).
The integral of an odd function is even (exercise).(1
2c
∫ −x0
g(s) ds = − 1
2c
∫ x
0
g(−z) dz =1
2c
∫ x
0
g(z) dz
)
• To solve this problem, we can start by extending the initial conditions f and g as odd functions to the
whole domain and then use the original formula
u(x, t) =f(ct− x) + f(x+ ct)
2+
1
2c
∫ x+ct
x−ctg(s) ds.
Example. Suppose you have a semi-infinite vibrating string (x > 0)which is initially stretched into the position
u(x, 0) = f(x) =
1 4 < x < 5
0 otherwise.
and let go from rest:∂u
∂t(x, 0) = g(x) = 0.
First, we extend f as an odd function:
f(x) =
−1 −5 < x < −4
1 4 < x < 5
0 otherwise.
The vertical position of the string is given by
u(x, t) =1
2f(x− ct) +
1
2f(x+ ct),
63
November 23th
12.5 Method of Characteristics for Vibrating String of Fixed Length
In chapter 4, we solved the equation for a finite vibrating string (0 < x < L):
∂2u
∂t2= c2
∂2u
∂x2(PDE)
u(x, 0) = f(x) (IC1)
∂u
∂t(x, 0) = g(x) (IC2)
u(0, t) = 0 (BC1)
u(L, t) = 0 (BC2)
Using the method of characteristics:
u(x, t) = P (x− ct) +Q(x+ ct)
which provides us with different characterization for the solution, which can be more useful in the way that it
gives more intuition on the paths of the waves.
Just like before, we know that
P (x) =1
2f(x) +
1
2c
∫ x
0
g(s) ds
Q(x) =1
2f(x)− 1
2c
∫ x
0
g(s) ds
But these formulas are only valid while 0 < x < L, so the usual solution
holds for 0 < x− ct < L and 0 < x+ ct < L.
t
L
slope
c slope −c
0
• In this region ct < x < L − ct, the string doesn’t know that the boundaries exist, because information
spreads with speed c, and the solution follows d’Alembert’s formula:
u(x, t) =f(x− ct) + f(x+ ct)
2+
1
2c
∫ x+ct
x−ctg(s) ds.
• Outside this region, information about the boundary already reaches the string, so we have to modify the
solution as in 12.4.
The boundary condition at x = 0 implies
0 = u(0, t) = P (−ct) +Q(ct) for all t > 0
and the boundary condition at x = L implies
0 = u(L, t) = P (L− ct) +Q(L+ ct) for all t > 0.
64
Just like in the semi-infinite case, this means that we should extend f
and g as odd functions around x = 0 and x = L. In fact, the easiest way
to do this is
1. extend f and g as odd functions to the interval −L < x < L;
2. extend f and g periodically with period 2L.
We can use the characteristic method to interpret this solution. It is as
if the characteristic line bounces on the boundaries x = 0 and x = L,
and with each bounce it changes sign.
t
x
(x0, t0)
L0
Example. Suppose you have a finite vibrating string (0 < x < 4) which is initially stretched into the position
u(x, 0) = f(x) =
1 2 < x < 3
0 otherwise.
and let go from rest:∂u
∂t(x, 0) = g(x) = 0.
First, we extend f as an odd function:
fodd(x) =
−1 −3 < x < −2
1 2 < x < 3
0 otherwise,
and we extend it periodically with period 8:
f(x) =
...
fodd(x+ 8) −12 < x < −4
fodd(x) −4 < x < 4
fodd(x− 8) 4 < x < 12
...
The vertical position of the string is given by
u(x, t) =1
2f(x− ct) +
1
2f(x+ ct),
65
November 24th
12.6 Method of Characteristics for Quasilinear PDEs
12.6.1 Method of Characteristics
Definition. A quasilinear PDE is a PDE which is linear on the highest derivatives.
Example. The PDE∂ρ
∂t+ c(ρ)
∂ρ
∂x= Q(ρ)
is quasilinear if c(ρ) is not a constant function or Q(ρ) is not linear in ρ.
To solve this equations, we use the Method of Characteristics, in a slightly different way:
• We find a moving observer x(t) which satisfies
dx
dt= c(ρ, x, t), (Chars)
which like the integrating factor, unites the left-hand side of the equation into one derivative
dρ
dt= Q(ρ, x, t). (?)
This means that according to the observer x(t), the solution is not stopped, but becomes simpler to solve.
Then solving (Chars) and (?) gives the solution. Note that the characteristics can be curved now.
Example. Consider the following PDE:∂u
∂t+ u
∂u
∂x= 0
with the initial condition
u(x, 0) = f(x) =
0 x < 0
x 0 6 x 6 1
1 x > 1
This means that the problem splits into two ODE’s:
du
dt= 0
dx
dt= u
The first equation means that u is constant along characteristic lines:
u(x(t), t) = u(x0, 0) = f(x0).
Now we use the fact that u(x(t), t) is constant to deduce the character-
istic curves:
x′(t) = u(x(t), t)) = f(x0),
so
x(t) = f(x0)t+ x0.-1 -0.5 0 0.5 1 1.5 2 2.5 3
0.5
1
1.5
2
2.5
66
As before, to find the solution, we need to express x0 in terms of x and t, which is the equivalent of following
the characteristic line from the point (x, t) all the way to where it hits the x-axis (x0, 0).
Because f(x) is defined in three branches, we need to do this in three parts:
• If x0 < 0, then f(x0) = 0, so x0 = x. Then
u(x, t) = f(x0) = 0,
This corresponds to x < 0.
• If 0 6 x0 6 1, then f(x0) = x0, and so x = (t+ 1)x0 and we get x0 = x1+t . Then
u(x, t) = f(x0) = x0 =x
1 + t.
This corresponds to 0 6 x1+t 6 1 which simplifies to 0 6 x 6 1 + t.
• If x0 > 1, then f(x0) = 1, and so x = t+x0 and we get x0 = x−t.
Then
u(x, t) = f(x0) = 1,
This corresponds to x− t > 1 which simplifies to x > 1 + t.
The solution is
u(x, t) =
0 x < 0
x1+t 0 6 x 6 1 + t
1 x > 1 + t
x
t
67
November 26th
12.6.2 Traffic Flow
We start by deducing a simplified model for a congested one-directional highway.
We do this by introducing
• traffic density ρ(x, t). The number of cars per km at time t located at position x.
• traffic flow q(x, t). The number of cars per hour passing a fixed place x.
Conservation of cars. Assuming that there are no exits on a segment of the highway between a and b, then
the number of cars in this segment
N =
∫ b
a
ρ(x, t) dx
can still change in time.
Rate of change of
the number of cars=
Number of cars en-
tering at x = a−
Number of cars ex-
iting at x = b
dN
dt= q(a, t) − q(b− t)
so we have the equationd
dt
∫ b
a
ρ(x, t) dx = −∫ b
a
∂q
∂x(x, t) dx
We take the derivative in t to the inside of the integral and obtain
∂ρ
∂t+∂q
∂x= 0 (Conservation of Cars)
Car velocity. The number of cars per hour passing through a point x, q(x, t) is equal to the density of cars
times their velocity:
q = ρu
where u is the velocity of cars. It is reasonable to assume that the velocity of the cars depends only on the
density of cars u = u(ρ) and
• The higher the density ρ, the lower the velocity u, since the more cars on the road, the slower one has to
drive, so dudρ < 0.
We obtain the equation∂ρ
∂t+ c(ρ)
∂ρ
∂x= 0,
with c(ρ) = q′(ρ) = u(ρ) + ρu′(ρ).
68
Elementary traffic model. We expect that a traffic model satisfies the properties:
1. If there are no cars, then the velocity should be maximum umax: u(0) = umax;
2. At some maximum density ρmax, the velocity should be 0: u(ρmax) = 0.
Then the simplest formula for u satisfying these properties is
u(ρ) = umax
(1− ρ
ρmax
).
Then
c(ρ) = umax
(1− ρ
ρmax
)− umax
ρmaxρ = umax
(1− 2ρ
ρmax
).
12.6.3 Method of Characteristics
The characteristic equations are
dρ
dt= 0 (?)
dx
dt= c(ρ) (#)
Using (?), we know that ρ is constant along the characteristics x(t), so
ρ(x(t), t) = ρ(x0, 0) = f(x0)
for some initial condition u(x, 0) = f(x).
Then
x′(t) = c(f(x0)
)which is constant, so
x(t) = c(f(x0)
)t+ x0.
This means that the characteristics are straight lines with slope c(f(x0)
), which depends on the initial point.
To determine an exact expression for the solution ρ(x, t), we need to determine x0 in terms of x and t, as we did
in the previous example. This is usually difficult and not very interesting. We can still know how the solution
ρ is evolving with time without it.
69
November 30th
Example (Fanlike Characteristics). After normalizing the constants, assume that the maximum density ρmax =
4 and the maximum speed is umax = 1. Suppose you have a one-way road with a traffic light which is turned
red. At time t = 0, the light turns green. How does the traffic develop?
Solution. We know that the traffic density satisfies the PDE
∂ρ
∂t+(1− ρ
2
)∂ρ∂x
= 0
with the initial conditions
ρ(x, 0) = f(x) =
4 x < 0
0 x > 0,
which arise from the fact that behind the traffic light, the cars are stopped at maximum density and in front of
the traffic light, the road is empty.
From before, we know that the density remains constant along the char-
acteristics, and that the characteristics are given by
x(t) =
(1− ρ(x(t), t)
2
)t+ x0. (?)
Because ρ(x(t), t) = r(x0, 0) = f(x0), this simplifies to
x(t) =
(1− f(x0)
2
)t+ x0.
slop
e1slope
−1
Because the solution is constant on each of these lines, this means that on the left of the cars are still stopped,
and on the right the cars are going at maximum speed.
You can see that the line that makes the distinction between the stopped cars and the moving ones is moving
backwards, meaning that each driver has to wait a certain time to start moving, but eventually everyone starts
moving.
Since there are no characteristics in the red area, what happens there?
This difficulty is caused by the discontinuity in the initial condition. For
a fixed t > 0, we have the following situation on the right.
In the middle section, the solution satisfies the PDE:
∂ρ
∂t+(1− ρ
2
)∂ρ∂x
= 0
ρ
x
x = −t x = t
4
From the first expression for the characteristics (?) for x0 = 0, we get
x =(
1− ρ
2
)t
so
ρ(x, t) = 2− 2x
t.
70
Then
∂ρ
∂t= 2
x
t2∂ρ
∂x= −2
t,
so the PDE is satisfied:
2∂ρ
∂t+(1− ρ
2
)∂ρ∂x
= 2x
t2+(
1−(
1− x
t
))(−2
t
)= 2
x
t2− 2
x
t2= 0.
We then have the following picture.
ρ
x
x = −t x = t
4
Solution for a fixed t > 0 Fanlike characteristics
The movement of a car will be like in the figure below.
Car
Stopped Max Speed
71
December 1st
12.6.4 Shock Waves
Intersecting characteristics. The method of characteristics doesn’t always work as well as in the previous
examples. In these examples, the characteristic lines never intersect, but it is easy to see that they can intersect.
When the characteristic curves intersect, they form what we call shock waves.
ρ1 ρ2
ρ
t
ρ1 ρ2
ρ
t
Characteristics intersect Discontinuity Curve
• At the point marked, the solution, which is constant along the both characteristics, will assume two
different values! This can’t happen, so we have to find a way to solve the problem.
• At that point, the solution is discontinuous, so this means that when there are intersecting characteristics,
the only possible solutions will be discontinuous.
Where should the discontinuity be? We go back to the integral formula from which we obtained the
PDE:d
dt
(∫ b
a
ρ(x, t) dx
)= q(a, t)− q(b, t)
This formula implies the PDE when ρ is differentiable, but now, we need to split the integral in two pieces:
d
dt
(∫ b
a
ρ(x, t) dx
)=
d
dt
(∫ xs(t)
a
ρ−(x, t) dx+
∫ b
xs(t)
ρ+(x, t) dx
)
=dxsdt
(ρ−(xs(t), t)− ρ+(xs(t), t)
)+
∫ b
a
∂ρ
∂t(x, t) dx
For the right-hand side, we know that q = q(ρ), so
q(a, t)− q(b, t) = q(ρ−(a, t))− q(ρ+(b, t)).
By letting a→ xs(t) and b→ xs(t), we obtain
dxsdt
(ρ− − ρ+) = q(ρ−)− q(ρ+)
which implies thatdxsdt
=q(ρ+)− q(ρ−)
ρ+ − ρ− =[q]
[ρ]. (Rankine-Hugoniot Condition)
This equation tells where the jump discontinuity should be.
72
December 3rd
Example. As in the previous example, assume that we normalize all the constants so that ρmax = 4 and
umax = 1. Suppose you have a one-way road with a traffic light x = 0 which is turned green. At time t = 0,
the light turns red. How does the traffic develop?
Solution. We know that the traffic density satisfies the PDE
∂ρ
∂t+(1− ρ
2
)∂ρ∂x
= 0.
We assume that cars are going at some constant speed, so that ρ = 1 before the light, and that at the light the
cars are stopped u = 0, which is equivalent to ρ(0, t) = ρmax. We get the conditions
ρ(x, 0) = 1 for x < 0
ρ(0, t) = 4 for t > 0
From before, we know that the density remains constant along the char-
acteristics, and that the characteristics are given by
x(t) =
(1− f(x0)
2
)t+ x0.
The shock is formed because we have cars moving at some speed reaching the cars that already stopped because
of the red light.
We want to find where there is a discontinuity on the solution, so we use the Rankine-Hugoniot condition we
derived before. First, we recall that
q(ρ) = ρu = ρumax
(1− ρ
ρmax
)= ρ
(1− ρ
4
),
so
x′s(t) =q(4)− q(1)
4− 1=
0− 34
3= −1
4.
Thus
xs(t) = − t4
We obtain the following characteristics:
The red line is the shock wave, which is moving backwards. The meaning is that it is the line where the cars
stop for the red light. It is moving backwards, because the cars are forming a line behind the red light.
73
Note. The shock wave without the normalization would be
xs(t) = − q(ρ0)
ρmax − ρ0t = − u(ρ0)ρ0
ρmax − ρ0t,
where ρmax is the density of a packed road in a traffic jam and ρ0 is the density of the cars travel before the red
light.
• If the shock wave is too fast, i.e. too close to the horizontal, then the line behind the red light will form
too fast and there will probably be a crash.
• To prevent a crash, we want to bring the slope as close to vertical as possible. This can be achieved in
two ways:
– lowering umax = the speed limit,
– lowering ρ0 =the density of cars on the road.
74