Separation of Variables: More Examples
Philippe B. Laval
KSU
Today
Philippe B. Laval (KSU) Separation of Variables Today 1 / 33
Introduction
In the previous section, we explained the separation of variabletechnique and looked at some examples.
All the examples we looked at had the same PDE and boundaryconditions. Only the initial condition changed.
We now looked at more examples. The PDE will be the same as inthe previous section, that is the one-dimensional heat equation whereonly diffusion occurs, that is ut = kuxx . However, we will change theboundary conditions. In the previous section, we only consideredwhen the temperature of the rod at the ends was maintained at 0◦.Here will consider mixed boundary conditions.
We proceed by examples.
Philippe B. Laval (KSU) Separation of Variables Today 2 / 33
Heat Equation for a Rod with Insulated Ends
Recall, if the ends are insulated, there is no heat loss or gain at theboundary, so the flux at the boundary is 0.Let’s solve
PDE ut = kuxx 0 < x < L 0 < t <∞
BCux (0, t) = 0ux (L, t) = 0
0 < t <∞
IC u (x , 0) = φ (x) 0 ≤ x ≤ L
(1)
We follow the steps outlined in the previous section.
Philippe B. Laval (KSU) Separation of Variables Today 3 / 33
Step 1: Transforming the PDE in Two ODEs
As in the previous section, we seek a nontrivial solution of the formu (x , t) = X (x)T (t). Proceeding as in the previous section, we transformthe PDE in two ODEs. We get:
T ′ + λkT = 0
X ′′ + λX = 0
where λ is a real number.
Philippe B. Laval (KSU) Separation of Variables Today 4 / 33
Step 2: Solving the Time-Dependent ODE
T ′ + λkT = 0 is a well known ODE. Its solution is:
T (t) = C1e−λkt (2)
Philippe B. Laval (KSU) Separation of Variables Today 5 / 33
Step 2: Solving the Time-Dependent ODE
T ′ + λkT = 0 is a well known ODE. Its solution is:
T (t) = C1e−λkt (2)
Philippe B. Laval (KSU) Separation of Variables Today 5 / 33
Step 2: Solving the Eigenvalue Problem
The next ODE to solve isX ′′ + λX = 0 (3)
Since we are looking for a nontrivial solution, we have to solve theboundary problem
X ′′ + λX = 0X ′ (0) = 0X ′ (L) = 0
(4)
DefinitionThe values of λ for which the boundary value problem in 4 has nontrivialsolutions are called eigenvalues. The corresponding solutions X (x) arecalled eigenfunctions.
Philippe B. Laval (KSU) Separation of Variables Today 6 / 33
Step 2: Solving the Eigenvalue Problem
There are three possibilities.
1 λ < 0. Results in a trivial solution (see homework), so we discard it.2 λ = 0. In this case, equation X ′′ + λX = 0 becomes X ′′ = 0 withsolutions X = Ax + B. The boundary conditions imply thatX (x) = B = B0. The resulting solution is u (x , t) = B0.
3 λ > 0. In this case, the general solution of X ′′ + λX = 0 is
X (x) = C2 sin√λx + C3 cos
√λx . The eigenvalues are λ =
(nπL
)2for n = 1, 2, 3, ... The corresponding eigenfunctions areX (x) = C3 cos
nπLx for n = 1, 2, 3, ...The resulting solutions are
u (x , t) = Bne−(nπL )
2kt cos
nπLx for n = 1, 2, 3, ...
Philippe B. Laval (KSU) Separation of Variables Today 7 / 33
Step 3: Finishing the Problem - Principle of Superposition
To satisfy the IC, we use the principle of superposition. Since we have ahomogeneous equation, a linear combination of all the solutions we haveso far is also a solution. We remember that we have solutions when bothλ = 0 and λ > 0. Hence,
u (x , t) = B0 +∞∑n=1
Bne−(nπL )
2kt cos
nπLx
which we can also write as
u (x , t) =∞∑n=0
Bne−(nπL )
2kt cos
nπLx
Philippe B. Laval (KSU) Separation of Variables Today 8 / 33
Step 3: Finishing the Problem
Using the IC, we see that φ (x) = u (x , 0) = B0 +∞∑n=1
Bn cosnπLx .
This is similar to the previous section, but the infinite series involves cosineinstead of sine. If you recall, what made the problem easy to solve was thenice property integrals involving sine functions have. Fortunately for us,the cosine function has similar property, which we give as a proposition.
Proposition
∫ L0 cos
mπxL
cosnπxLdx =
0 if m 6= nL2
if m = n 6= 0L m = n = 0
Philippe B. Laval (KSU) Separation of Variables Today 9 / 33
Step 3: Finishing the Problem
To find the coeffi cients An, we proceed as we did in the previous section.We start with
φ (x) = B0 + B1 cosπ
Lx + B2 cos
2πLx + B3 cos
3πLx + ...
We multiply each side by cosmπxL
for m = 0, 1, 2, 3, ...
We get
B0 =1L
∫ L
0φ (x) dx
and
Bn =2L
∫ L
0φ (x) cos
nπxLdx for n > 0
Philippe B. Laval (KSU) Separation of Variables Today 10 / 33
Step 3: Finishing the Problem
So, we have the following result
PropositionAssuming that such a representation exists, the Fourier cosine seriesrepresentation of the function φ (x) between 0 and L is
φ (x) = B0 +∞∑n=1
Bn cosnπLx (5)
where
B0 =1L
∫ L
0φ (x) dx (6)
and
Bn =2L
∫ L
0φ (x) cos
nπxLdx for n > 0 (7)
Philippe B. Laval (KSU) Separation of Variables Today 11 / 33
Step 3: Finishing the Problem
In conclusion, we have the following proposition:
PropositionThe solution to the IBVP
PDE ut = kuxx 0 < x < L 0 < t <∞
BCux (0, t) = 0ux (L, t) = 0
0 < t <∞
IC u (x , 0) = φ (x) 0 ≤ x ≤ L
is
u (x , t) = B0 +∞∑n=1
Bne−(nπL )
2kt cos
nπLx
where Bn for n = 0, 1, 2, 3, ... are the coeffi cients in the Fourier cosine
series representation of φ (x) that is φ (x) = B0 +∞∑n=1
Bn cosnπLx
Philippe B. Laval (KSU) Separation of Variables Today 12 / 33
Step 3: Finishing the Problem
Before looking at an example with a specific function for φ (x), we make afinal remark.
Remark
We can see from the solution u (x , t) = B0 +∞∑n=1
Bne−(nπL )
2kt cos
nπLx
that limt→∞
e−(nπL )
2kt = 0 and since cos
nπLx and Bn are bounded, it follows
that limt→∞
Bne−(nπL )
2kt cos
nπLx = 0 and therefore lim
t→∞u (x , t) = B0. Note
that B0 =1L
∫ L0 φ (x) dx represents the average value of φ (x), the initial
temperature distribution. So, the steady state solution is the average ofthe initial temperature distribution.
Philippe B. Laval (KSU) Separation of Variables Today 13 / 33
Example
ExampleSolve the IBVP
PDE ut = kuxx 0 < x < 2 0 < t <∞
BCux (0, t) = 0ux (2, t) = 0
0 < t <∞
IC u (x , 0) = x2 0 ≤ x ≤ 2
Philippe B. Laval (KSU) Separation of Variables Today 14 / 33
Example
We should have found the following:
x2 =43+∞∑n=1
(−1)n(4nπ
)2cos
nπ2x (a picture is shown in the next slide)
Therefore, the solution is
u (x , t) =43+∞∑n=1
(−1)n(4nπ
)2e−(
nπ2 )
2kt cos
nπ2x
Philippe B. Laval (KSU) Separation of Variables Today 15 / 33
Example
0.0 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 1.8 2.00
1
2
3
x
y
Fourier Cosine Series for x2black: x2
red: first two terms of the seriesgreen: first three terms of the seriespink: first 6 terms of the series
Philippe B. Laval (KSU) Separation of Variables Today 16 / 33
Heat Equation in a Thin Circular Ring
Here, we consider the heat equation in a circular ring. We make thefollowing assumptions:
1 We assume the ring has length 2L. It will be obvious in a while why
2L and not L. Note that the radius r of the ring will then be r =Lπ.
2 Assume the wire making up the ring is thin enough so that thetemperature is constant along cross sections. In other words, heatonly flows along the wire.
3 The lateral sides of the wire are perfectly insulated, there is no heatloss or gain.
Under these conditions, the ring will satisfy the one-dimensional heatequation where the distance x is the arc length along the wire. As far asheat flow is concerned, the ring will behave like a thin rod. Only theboundary conditions will be different. so, before we solve it the heatequation for the ring, we have to formulate the correct boundaryconditions.
Philippe B. Laval (KSU) Separation of Variables Today 17 / 33
Heat Equation in a Thin Circular Ring
To facilitate formulating the boundary conditions, we do the following:
Position our ring so that its center is at the origin, see the picture onthe next slide.
We measure arc length (x) counterclockwise from the point at whichthe ring intersects with the positive horizontal axis, P in the picture.Hence, the arc length, x , ranges from −L to L.We can think of the ring as a thin rod which has been bent into theshape of the ring.The ring is positioned so that the connectionhappens where the ring meets the negative horizontal axis, Q in thepicture. Hence, the connection happens at x = L and x = −L. Thesevalues correspond to our boundaries.
Where the two ends of the thin wire meet to form the ring, we willhave perfect thermal contact. Our boundaries are not reallyboundaries since they correspond to the same point.
Philippe B. Laval (KSU) Separation of Variables Today 18 / 33
Heat Equation in a Thin Circular Ring
Philippe B. Laval (KSU) Separation of Variables Today 19 / 33
Heat Equation in a Thin Circular Ring
Therefore, the IBVP which describes this problem, and the one we willsolve is
PDE ut = kuxx −L < x < L 0 < t <∞
BCu (−L, t) = u (L, t)ux (−L, t) = ux (L, t)
0 < t <∞
IC u (x , 0) = φ (x) −L ≤ x ≤ L
(8)
We follow the steps outlined in the previous previous examples.
Philippe B. Laval (KSU) Separation of Variables Today 20 / 33
Step 1: Transforming the PDE in Two ODEs
As in the previous section, we seek a nontrivial solution of the formu (x , t) = X (x)T (t). Proceeding as in the previous section, we transformthe PDE in two ODEs. We get:
T ′ + λkT = 0
X ′′ + λX = 0
where λ is a real number.
Philippe B. Laval (KSU) Separation of Variables Today 21 / 33
Step 2: Solving the Time-Dependent ODE
T ′ + λkT = 0 is a well known ODE. Its solution is:
T (t) = C1e−λkt
Philippe B. Laval (KSU) Separation of Variables Today 22 / 33
Step 2: Solving the Time-Dependent ODE
T ′ + λkT = 0 is a well known ODE. Its solution is:
T (t) = C1e−λkt
Philippe B. Laval (KSU) Separation of Variables Today 22 / 33
Step 2: Solving the Eigenvalue Problem
The next ODE to solve isX ′′ + λX = 0
Since we are looking for a nontrivial solution, we have to solve theboundary problem
X ′′ + λX = 0X (−L) = X (L)X ′ (−L) = X ′ (L)
(9)
Philippe B. Laval (KSU) Separation of Variables Today 23 / 33
Step 2: Solving the Eigenvalue Problem
There are three possibilities.
1 λ < 0. Results in a trivial solution (see homework), so we discard it.2 λ = 0. In this case, equation X ′′ + λX = 0 becomes X ′′ = 0 withsolutions X (x) = Ax + B. The boundary conditions imply thatX (x) = B = B0. The resulting solution is u (x , t) = B0.
3 λ > 0. In this case, the general solution of X ′′ + λX = 0 is
X (x) = C2 sin√λx + C3 cos
√λx . The eigenvalues are λ =
(nπL
)2for n = 1, 2, 3, ... The corresponding eigenfunctions areX (x) = C2 sin
nπLx + C3 cos
nπLx for n = 1, 2, 3, ... The resulting
solutions are u (x , t) = e−(nπL )
2kt(An sin
nπLx + Bn cos
nπLx)for
n = 1, 2, 3, ...
Philippe B. Laval (KSU) Separation of Variables Today 24 / 33
Step 3: Finishing the Problem - Principle of Superposition
To satisfy the IC, we use the principle of superposition. Since we have ahomogeneous equation, a linear combination of all the solutions we haveso far is also a solution. We remember that we have solutions when bothλ = 0 and λ > 0. Hence,
u (x , t) = B0 +∞∑n=1
e−(nπL )
2kt(An sin
nπLx + Bn cos
nπLx)
which we can also write as
u (x , t) =∞∑n=0
Bne−(nπL )
2kt cos
nπLx +
∞∑n=1
Ane−(nπL )
2kt sin
nπLx
Philippe B. Laval (KSU) Separation of Variables Today 25 / 33
Step 3: Finishing the Problem
Using the IC, we see that
φ (x) = u (x , 0) (10)
= B0 +∞∑n=1
(An sin
nπLx + Bn cos
nπLx)
This time, the series has both sine and cosine functions. Also, x nowranges from −L to L. Fortunately for us, the properties we used beforewhich made the problem simpler also hold in this case. We give them as aproposition.
Philippe B. Laval (KSU) Separation of Variables Today 26 / 33
Step 3: Finishing the Problem
Proposition
Let m and n be nonnegative integers. Then the following is true:
1∫ L−L cos
mπxL
cosnπxLdx =
0 if m 6= nL if m = n 6= 02L m = n = 0
2∫ L−L sin
(mπxL
)sin(nπxL
)dx =
{0 if m 6= nL if m = n 6= 0
3∫ L−L sin
(mπxL
)cos
nπxLdx = 0
Philippe B. Laval (KSU) Separation of Variables Today 27 / 33
Step 3: Finishing the Problem
To find the coeffi cients An, we proceed as we did in the previous examples.We start with
φ (x) = B0 + A1 sinπ
Lx + B1 cos
π
Lx + A2 sin
2πLx + B2 cos
2πLx + ... (11)
Then, for each m = 1, 2, 3, ..., we multiply both sides with sinmπLx and
integrate from −L to L, then for each m = 0, 1, 2, 3, ... we multiply bothsides with cos
mπLand integrate from −L to L.
Philippe B. Laval (KSU) Separation of Variables Today 28 / 33
Step 3: Finishing the Problem
PropositionAssuming that such a representation exists, the Fourier seriesrepresentation of the function φ (x) between −L and L is
φ (x) = B0 +∞∑n=1
(An sin
nπLx + Bn cos
nπLx)
where
An =1L
∫ L
−Lφ (x) sin
nπLxdx for m = 1, 2, 3, ...
B0 =12L
∫ L
−Lφ (x) dx
Bn =1L
∫ L
−Lφ (x) cos
nπxLdx
Philippe B. Laval (KSU) Separation of Variables Today 29 / 33
Step 3: Finishing the Problem
PropositionThe solution to the IBVP
PDE ut = kuxx −L < x < L 0 < t <∞
BCu (−L, t) = u (L, t)ux (−L, t) = ux (L, t)
0 < t <∞
IC u (x , 0) = φ (x) −L ≤ x ≤ L
is
u (x , t) = B0 +∞∑n=1
e−(nπL )
2kt(An sin
nπLx + Bn cos
nπLx)
where the coeffi cients A1,A2,A3, ... and the coeffi cients B0,B1,B2,B3, ...are given above.
Philippe B. Laval (KSU) Separation of Variables Today 30 / 33
Summary
In the examples and explanation of this section and the previous one, wewere solving the one-fimensional heat equation ut = kuxx . Using theseparation of variables method, we were seeking a solution of the formu (x , t) = X (x)T (t). We outline what these examples have in commonand also where they differ.
1 The separation of variable method resulted in having to solve twoODEs:
T ′ + λkT = 0
X ′′ + λX = 0
2 For the first ODE, we did not use BCs, we only found a generalsolution which was the same for all the examples:
T (t) = C1e−λkt
3 For the second ODE, we used BCs. We noticed that the BCs of theODE were similar to those of the PDE in the following sense. Theywere both homogeneous. If the BCs of the PDE involved derivatives,so did the BCs of the ODE. More specifically, if the BCs of the PDEwere u (0, t) = 0 and u (L, t) = 0 then the BCs of the ODE wereX (0) = 0 and X (L) = 0. if the BCs of the PDE were ux (0, t) = 0and ux (L, t) = 0 then the BCs of the ODE were X ′ (0) = 0 andX ′ (L) = 0. And so on.
4 The values of λ for which the second ODE has solutions are calledeigenvalues and the corresponding solutions are calledeigenfunctions. What these eigenvalues and eigenfunctions aredepends greatly on the boundary conditions. The table belowsummarizes the various possibilities.
Philippe B. Laval (KSU) Separation of Variables Today 31 / 33
Philippe B. Laval (KSU) Separation of Variables Today 32 / 33
Exercises
See the problems at the end of my notes on separation of variables: moreexamples.
Philippe B. Laval (KSU) Separation of Variables Today 33 / 33