Docsity

Solving the 1-Dimensional Heat Equation, Study notes of Differential Equations

Partial preview of the text

Download Solving the 1-Dimensional Heat Equation and more Study notes Differential Equations in PDF only on Docsity!

The One-Dimensional Heat Equation

R. C. Daileda

Trinity University

Partial Differential Equations Lecture 9

Introduction

The heat equation

Goal: Model heat (thermal energy) flow in a one-dimensional object (thin rod).

Set up: Place rod along x-axis, and let

u(x, t) = temperature in rod at position x, time t.

Under ideal conditions (e.g. perfect insulation, no external heat sources, uniform rod material), one can show the temperature must satisfy

∂u ∂t

= c^2 ∂^2 u ∂x^2

the one-dimensional heat equation

The constant c^2 is called the thermal diffusivity of the rod.

Solving the Heat Equation

Case 1: homogeneous Dirichlet boundary conditions

We now apply separation of variables to the heat problem

ut = c^2 uxx (0 < x < L, t > 0), u(0, t) = u(L, t) = 0 (t > 0), u(x, 0) = f (x) (0 < x < L).

We seek separated solutions of the form u(x, t) = X (x)T (t). In this case ut = XT ′ uxx = X ′′T

⇒ XT ′^ = c^2 X ′′T ⇒

X ′′

X

T ′

c^2 T

= k.

Together with the boundary conditions we obtain the system

X ′′^ − kX = 0, X (0) = X (L) = 0, T ′^ − c^2 kT = 0.

Already know: up to constant multiples, the only solutions to the BVP in X are

k = −μ^2 n = −

( (^) nπ L

X = Xn = sin (μnx) = sin

( (^) nπx L

, n ∈ N.

Therefore T must satisfy

T ′^ − c^2 kT = T ′^ +

( (^) cnπ L

λn

2 T = 0

T ′^ = −λ^2 nT ⇒ T = Tn = bne−λ (^2) nt .

We thus have the normal modes of the heat equation:

un(x, t) = Xn(x)Tn(t) = bne−λ (^2) nt sin(μnx), n ∈ N.

Remarks

As before, if the sine series of f (x) is already known, solution can be built by simply including exponential factors.

One can show that this is the only solution to the heat equation with the given initial condition.

Because of the decaying exponential factors:

∗ The normal modes tend to zero (exponentially) as t → ∞. ∗ Overall, u(x, t) → 0 (exponentially) uniformly in x as t → ∞. ∗ As c increases, u(x, t) → 0 more rapidly.

This agrees with intuition.

Example

Solve the heat problem

ut = 3uxx (0 < x < 2 , t > 0), u(0, t) = u(2, t) = 0 (t > 0), u(x, 0) = 50 (0 < x < 2).

We have c =

3, L = 2 and, by exercise 2.3.1 (with p = L = 2)

f (x) = 50 =

π

∑^ ∞

k=

2 k + 1 sin

(2k + 1)πx 2

Since λ 2 k+1 = c(2k + 1)π L

3(2k + 1)π 2

, we obtain

u(x, t) =

π

∑^ ∞

k=

2 k + 1 e−3(2k+1)

(^2) π (^2) t/ 4 sin

(2k + 1)πx 2

Solving the Heat Equation

Case 2b: inhomogeneous Dirichlet boundary conditions

Now consider the heat problem

ut = c^2 uxx (0 < x < L, t > 0), u(0, t) = T 1 , u(L, t) = T 2 (t > 0), u(x, 0) = f (x) (0 < x < L).

Step 1: Let u 1 denote the steady state solution from above:

u 1 =

T 2 − T 1

L

x + T 1.

Step 2: Let u 2 = u − u 1.

Remark: By superposition, u 2 still solves the heat equation.

The boundary and initial conditions satisfied by u 2 are

u 2 (0, t) = u(0, t) − u 1 (0) = T 1 − T 1 = 0, u 2 (L, t) = u(L, t) − u 1 (L) = T 2 − T 2 = 0, u 2 (x, 0) = f (x) − u 1 (x).

Step 3: Solve the heat equation with homogeneous Dirichlet boundary conditions and initial conditions above. This yields u 2.

Step 4: Assemble u(x, t) = u 1 (x) + u 2 (x, t).

Remark: According to our earlier work, lim t→∞ u 2 (x, t) = 0.

We call u 2 (x, t) the transient portion of the solution.

We have u(x, t) → u 1 (x) as t → ∞, i.e. the solution tends to the steady state.

According to exercise 2.3.7 (with p = L = 2), the sine series for 50(x − 1) is − 100 π

∑^ ∞

k=

k

sin

2 kπx 2

i.e. only even modes occur. Since λ 2 k = c 2 kπ L

3 kπ,

u 2 (x, t) =

π

∑^ ∞

k=

k e−^3 k (^2) π (^2) t sin (kπx).

Hence

u(x, t) = u 1 (x)+u 2 (x, t) = 100− 50 x−

π

∑^ ∞

k=

k e−^3 k (^2) π (^2) t sin (kπx).

Solving the Heat Equation

Case 3: homogeneous Neumann boundary conditions

Let’s now consider the heat problem

ut = c^2 uxx (0 < x < L , 0 < t), ux (0, t) = ux (L, t) = 0 (0 < t), u(x, 0) = f (x) (0 < x < L),

in which we assume the ends of the rod are insulated. As before, assuming u(x, t) = X (x)T (t) yields the system

X ′′^ − kX = 0, X ′(0) = X ′(L) = 0, T ′^ − c^2 kT = 0.

Note that the boundary conditions on X are not the same as in the Dirichlet condition case.

Case 2: k = 0. We need to solve X ′′^ = 0. Integrating twice gives

X = c 1 x + c 2.

The boundary conditions give 0 = X ′(0) = X ′(L) = c 1. Taking c 2 = 1 we get the solution

X = X 0 = 1.

Case 3: k = −μ^2 < 0. We need to solve X ′′^ + μ^2 X = 0. The characteristic equation is

r 2 + μ^2 = 0 ⇒ r = ±iμ,

which gives the general solution X = c 1 cos(μx) + c 2 sin(μx).

The boundary conditions yield

0 = X ′(0) = − μc 1 sin 0 + μc 2 cos 0 = μc 2 ⇒ c 2 = 0, 0 = X ′(L) = − μc 1 sin(μL) + μc 2 cos(μL) = − μc 1 sin(μL).

In order to have X 6 ≡ 0, this shows that we need

sin(μL) = 0 ⇒ μL = nπ ⇒ μ = μn =

nπ L (n ∈ Z).

Taking c 1 = 1 we obtain

X = Xn = cos(μnx) (n ∈ N).

Remarks:

We only need n > 0, since cosine is an even function. When n = 0 we get X 0 = cos 0 = 1, which agrees with the k = 0 result.

Initial conditions

If we now impose our initial condition we find that

f (x) = u(x, 0) = a 0 +

∑^ ∞

n=

an cos nπx L

which is simply the 2L-periodic cosine expansion of f (x). Hence

a 0 =

L

∫ L

0

f (x) dx, an =

L

∫ L

0

f (x) cos

nπx L dx, (n ∈ N).

Remarks: As before, if the cosine series of f (x) is already known, u(x, t) can be built by simply including exponential factors. Because of the exponential factors, (^) tlim→∞ u(x, t) = a 0 , which is the average initial temperature.

Example

Solve the following heat problem:

ut =

uxx , 0 < x < 1 , 0 < t, ux (0, t) = ux (1, t) = 0, 0 < t, u(x, 0) = 100x(1 − x), 0 < x < 1.

We have c = 1/2, L = 1 and f (x) = 100x(1 − x). Therefore

a 0 =

0

100 x(1 − x) dx =

an = 2

0

100 x(1 − x) cos nπx dx = −200(1 + (−1)n) n^2 π^2 , n ≥ 1.