The Heat Equation

MATH 467 Partial Differential Equations

J. Robert Buchanan

Department of Mathematics

Spring 2016

Objectives

In this lesson we will: ▶ solve the heat equation with Dirichlet boundary conditions, ▶ solve the heat equation with Neumann boundary

conditions, ▶ solve the heat equation with Robin boundary conditions,

and ▶ solve the heat equation with nonhomogeneous boundary

conditions.

Dirichlet Boundary Conditions

Find the solution to the IBVP:

u_{t} = k u_{xx} for 0 < x < L, t > 0
u(0, t) = 0
u(L, t) = 0
u(x, 0) = \{ \begin{matrix}x & for 0 ≤ x ≤ L/2, \\ L − x & for L/2 < x ≤ L. \end{matrix}

Solution (1 of 4)

The nontrivial product solutions must take the form,

u_{n}(x, t) = e^{−kn^{2}π^{2}t/L^{2}}sin \frac{nπx}{L}

for n = 1, 2, . . .. By the Principle of Superposition,

u(x, t) = ∑_{n=1}^{∞}b_{n}e^{−kn^{2}π^{2}t/L^{2}}sin \frac{nπx}{L}

is also a solution to the PDE and satisfies the BCs. Applying the initial condition yields,

u(x, 0) = ∑_{n=1}^{∞}b_{n} sin \frac{nπx}{L} = \{ \begin{matrix}x & for 0 ≤ x ≤ L/2, \\ L − x & for L/2 < x ≤ L. \end{matrix}

The coefficients b_{n} can be found using the Euler-Fourier integral formulas.

Solution (2 of 4)

Think of f (x) as the 2L-periodic, odd extension of the initial condition. In this case f (x) is continuous on (−∞, ∞).

b_{n} = \frac{2}{L} ∫_{0}^{L}f (x) sin \frac{nπx}{L} dx
= \frac{2}{L} ∫_{0}^{L/2} x sin \frac{nπx}{L} dx + \frac{2}{L} ∫_{L/2}^{L}(L − x) sin \frac{nπx}{L} dx
= \frac{L}{n^{2}π^{2}} (2 sin \frac{nπ}{2} − nπ cos \frac{nπ}{2}) + \frac{L}{n^{2}π^{2}} (nπ cos \frac{nπ}{2} + 2 sin \frac{nπ}{2})
= \frac{4L}{n^{2}π^{2}} sin \frac{nπ}{2}

u(x, t) = \frac{4L}{π^{2}} ∑_{n=1}^{∞} \frac{sin \frac{nπ}{2}}{n^{2}} e^{−kn^{2}π^{2}t/L^{2}}sin \frac{nπx}{L}

k = 1 = L

Neumann Boundary Conditions

Find the solution to the IBVP:

u_{t} = u_{xx} for 0 < x < π, t > 0
u_{x}(0, t) = 0
u_{x}(π, t) = 0
u(x, 0) = \{ \begin{matrix}0 & for 0 ≤ x < π/2, \\ 100 & for π/2 ≤ x ≤ π. \end{matrix}

Solution (1 of 8)

Assuming a product solution of the form u(x, t) = X(x)T (t) then

X(x)T′(t) = X′′(x)T (t)
\frac{X(x)T′(t)}{X(x)T (t)} = \frac{X′′(x)T (t)}{X(x)T (t)}
\frac{T′(t)}{T (t)} = \frac{X′′(x)}{X(x)} = c

where c is a constant.

Solution (2 of 8)

Suppose c = 0, then

\frac{X′′(x)}{X(x)} = 0
X′′(x) = 0
X(x) = Ax + B.

Since X′(0) = X′(π) = 0 then A = 0 and B = a_{0}/2, where a_{0} is an arbitrary constant.

Solution (3 of 8)

Suppose c = −λ^{2} with λ > 0.

\frac{X′′(x)}{X(x)} = −λ^{2}
X′′(x) + λ^{2}X(x) = 0
X(x) = A cos (λx) + B sin(λx)
and X′(x) = −Aλ sin(λx) + Bλ cos (λx).

Since X′(0) = X′(π) = 0 then B = 0 and λ ≡ λ_{n} = n for n = 1, 2, … and A is an arbitrary constant. Thus

u_{n}(x, t) = e^{−n^{2}t}cos (nx)

satisfies the PDE and the BCs.

Solution (3 of 8)

Suppose c = −λ^{2} with λ > 0.

\frac{X′′(x)}{X(x)} = −λ^{2}
X′′(x) + λ^{2}X(x) = 0
X(x) = A cos (λx) + B sin(λx)
and X′(x) = −Aλ sin(λx) + Bλ cos (λx).

Since X′(0) = X′(π) = 0 then B = 0 and λ ≡ λ_{n} = n for n = 1, 2, … and A is an arbitrary constant. Thus

u_{n}(x, t) = e^{−n^{2}t}cos (nx)

satisfies the PDE and the BCs.

Solution (4 of 8)

Suppose c = λ^{2} with λ > 0.

\frac{X′′(x)}{X(x)} = λ^{2}
X′′(x) − λ^{2}X(x) = 0
X(x) = A cosh (λx) + B sinh(λx)
and X′(x) = Aλ sinh(λx) + Bλ cosh (λx).

Since X′(0) = X′(π) = 0 then A = 0 = B and hence there are no nontrivial solutions in this case.

Solution (4 of 8)

Suppose c = λ^{2} with λ > 0.

\frac{X′′(x)}{X(x)} = λ^{2}
X′′(x) − λ^{2}X(x) = 0
X(x) = A cosh (λx) + B sinh(λx)
and X′(x) = Aλ sinh(λx) + Bλ cosh (λx).

Since X′(0) = X′(π) = 0 then A = 0 = B and hence there are no nontrivial solutions in this case.

By the Principle of Superposition, the solution to the PDE satisfying the BCs can be written as

u(x, t) = \frac{a_{0}}{2} + ∑_{n=1}^{∞}a_{n}e^{−n^{2}t}cos (nx).

Applying the initial condition yields,

u(x, 0) = \frac{a_{0}}{2} + ∑_{n=1}^{∞}a_{n} cos (nx) = \{ \begin{matrix}0 & for 0 ≤ x < π/2, \\ 100 & for π/2 ≤ x ≤ π. \end{matrix}

The coefficients a_{n} can be found using the Euler-Fourier integral formulas.

Solution (6 of 8)

Think of f (x) as the 2π-periodic, even extension of the initial condition.

a_{0} = \frac{2}{π} ∫_{0}^{π} f (x) dx = \frac{2}{π} ∫_{π/2}^{π} 100 dx = 100
a_{n} = \frac{2}{π} ∫_{0}^{π} f (x) cos (nx) dx
= \frac{2}{π} ∫_{π/2}^{π} 100 cos (nx) dx
= −\frac{200}{nπ} sin \frac{nπ}{2}

Consequently, the formal solution to the IBVP is

u(x, t) ∼ 50 − \frac{200}{π} ∑_{n=1}^{∞} \frac{sin \frac{nπ}{2}}{n} cos (nx).

Solution (6 of 8)

Think of f (x) as the 2π-periodic, even extension of the initial condition.

a_{0} = \frac{2}{π} ∫_{0}^{π} f (x) dx = \frac{2}{π} ∫_{π/2}^{π} 100 dx = 100
a_{n} = \frac{2}{π} ∫_{0}^{π} f (x) cos (nx) dx
= \frac{2}{π} ∫_{π/2}^{π} 100 cos (nx) dx
= −\frac{200}{nπ} sin \frac{nπ}{2}

Consequently, the formal solution to the IBVP is

u(x, t) ∼ 50 − \frac{200}{π} ∑_{n=1}^{∞} \frac{sin \frac{nπ}{2}}{n} cos (nx). u(x, t) ∼ 50 − \frac{200}{π} ∑_{n=1}^{∞} \frac{sin \frac{nπ}{2}}{n} e^{−n^{2}t}cos (nx). u(x, t) ∼ 50 − \frac{200}{π} ∑_{n=1}^{∞} \frac{sin \frac{nπ}{2}}{n} e^{−n^{2}t}cos (nx).

Robin Boundary Conditions

Find the solution to the IBVP:

u_{t} = u_{xx} for 0 < x < L, t > 0
u_{x}(0, t) = α u(0, t)
u_{x}(L, t) = −β u(L, t)
u(x, 0) = \{ \begin{matrix}0 & for 0 ≤ x < L/2, \\ 100 & for L/2 ≤ x ≤ L. \end{matrix}

Assume α > 0 and β > 0.

Solution (1 of 10)

Assuming a product solution of the form u(x, t) = X(x)T (t) then

X(x)T′(t) = X′′(x)T (t)
\frac{X(x)T′(t)}{X(x)T (t)} = \frac{X′′(x)T (t)}{X(x)T (t)}
\frac{T′(t)}{T (t)} = \frac{X′′(x)}{X(x)} = c

where c is a constant.

Solution (2 of 10)

Suppose c = 0, then

\frac{X′′(x)}{X(x)} = 0
X′′(x) = 0
X(x) = Ax + B.

Question: can such a function satisfy the boundary conditions:

A = αB (BC at x = 0)
A = −β(AL + B) (BC at x = L)

Eliminating A from the 2nd equation using the 1st equation yields:

αB = −β(αL + 1)B.

If B = 0 then A = 0 and X(x) = 0. If B ≠ 0 then

α = −β(αL + 1) ⟹ α < 0 (contradiction).

\frac{X′′(x)}{X(x)} = 0
X′′(x) = 0
X(x) = Ax + B.

Question: can such a function satisfy the boundary conditions:

A = αB (BC at x = 0)
A = −β(AL + B) (BC at x = L)

Eliminating A from the 2nd equation using the 1st equation yields:

αB = −β(αL + 1)B.

If B = 0 then A = 0 and X(x) = 0. If B ≠ 0 then

α = −β(αL + 1) ⟹ α < 0 (contradiction).

\frac{X′′(x)}{X(x)} = 0
X′′(x) = 0
X(x) = Ax + B.

Question: can such a function satisfy the boundary conditions:

A = αB (BC at x = 0)
A = −β(AL + B) (BC at x = L)

Eliminating A from the 2nd equation using the 1st equation yields:

αB = −β(αL + 1)B.

If B = 0 then A = 0 and X(x) = 0. If B ≠ 0 then

α = −β(αL + 1) ⟹ α < 0 (contradiction).

Solution (3 of 10)

Suppose c = λ^{2} with λ > 0.

\frac{X′′(x)}{X(x)} = λ^{2}
X′′(x) − λ^{2}X(x) = 0
X(x) = A cosh (λx) + B sinh(λx)
and X′(x) = Aλ sinh(λx) + Bλ cosh (λx).

Can this type of function satisfy the boundary conditions?

Bλ = αA
Aλ sinh(λL) + Bλ cosh (λL) = −β(A cosh (λL) + B sinh(λL))

The first equation implies A = 0 ⟺ B = 0.

Solution (3 of 10)

Suppose c = λ^{2} with λ > 0.

\frac{X′′(x)}{X(x)} = λ^{2}
X′′(x) − λ^{2}X(x) = 0
X(x) = A cosh (λx) + B sinh(λx)
and X′(x) = Aλ sinh(λx) + Bλ cosh (λx).

Can this type of function satisfy the boundary conditions?

Bλ = αA
Aλ sinh(λL) + Bλ cosh (λL) = −β(A cosh (λL) + B sinh(λL))

The first equation implies A = 0 ⟺ B = 0.

Solution (3 of 10)

Suppose c = λ^{2} with λ > 0.

\frac{X′′(x)}{X(x)} = λ^{2}
X′′(x) − λ^{2}X(x) = 0
X(x) = A cosh (λx) + B sinh(λx)
and X′(x) = Aλ sinh(λx) + Bλ cosh (λx).

Can this type of function satisfy the boundary conditions?

Bλ = αA
Aλ sinh(λL) + Bλ cosh (λL) = −β(A cosh (λL) + B sinh(λL))

The first equation implies A = 0 ⟺ B = 0.

Solution (4 of 10)

Use the BC at x = 0 to eliminate A and B from the second equation,

Aλ sinh(λL) + \frac{αA}{λ}λ cosh (λL) = −β(A cosh (λL) + \frac{αA}{λ} sinh(λL))
λ sinh(λL) + α cosh (λL) = −β(cosh (λL) + \frac{α}{λ} sinh(λL))
(λ + \frac{αβ}{λ} ) sinh(λL) = −(α + β) cosh (λL)
(λ + \frac{αβ}{λ} ) tanh(λL) = −(α + β)

since cosh (λL) ≥ 1.

(λ + \frac{α}{λ}) tanh(λL) = −(α + β)

Since α > 0, β > 0, L > 0, and we have assumed λ > 0 then

tanh(λL) < 0 ⟺ λL < 0

which is a contradiction. Hence there are no nontrivial solutions when c > 0.

Solution (6 of 10)

Suppose c = −λ^{2} with λ > 0.

\frac{X′′(x)}{X(x)} = −λ^{2}
X′′(x) + λ^{2}X(x) = 0
X(x) = A cos (λx) + B sin(λx)
and X′(x) = −Aλ sin(λx) + Bλ cos (λx).

Can this type of function satisfy the boundary conditions?

Bλ = αA
−Aλ sin(λL) + Bλ cos (λL) = −β(A cos (λL) + B sin(λL))

The first equation implies A = 0 ⟺ B = 0.

Solution (6 of 10)

Suppose c = −λ^{2} with λ > 0.

\frac{X′′(x)}{X(x)} = −λ^{2}
X′′(x) + λ^{2}X(x) = 0
X(x) = A cos (λx) + B sin(λx)
and X′(x) = −Aλ sin(λx) + Bλ cos (λx).

Can this type of function satisfy the boundary conditions?

Bλ = αA
−Aλ sin(λL) + Bλ cos (λL) = −β(A cos (λL) + B sin(λL))

The first equation implies A = 0 ⟺ B = 0.

Solution (6 of 10)

Suppose c = −λ^{2} with λ > 0.

\frac{X′′(x)}{X(x)} = −λ^{2}
X′′(x) + λ^{2}X(x) = 0
X(x) = A cos (λx) + B sin(λx)
and X′(x) = −Aλ sin(λx) + Bλ cos (λx).

Can this type of function satisfy the boundary conditions?

Bλ = αA
−Aλ sin(λL) + Bλ cos (λL) = −β(A cos (λL) + B sin(λL))

The first equation implies A = 0 ⟺ B = 0.

Solution (7 of 10)

Use the BC at x = 0 to eliminate A and B from the second equation,

−Aλ sin(λL) + \frac{αA}{λ}λ cos (λL) = −β(A cos (λL) + \frac{αA}{λ} sin(λL))
−λ sin(λL) + α cos (λL) = −β(cos (λL) + \frac{α}{λ} sin(λL))
(λ − \frac{αβ}{λ} ) sin(λL) = (α + β) cos (λL)

Note:

cos (λL) = 0 ⟺ λ = \frac{(2n − 1)π}{2L}

with n ∈ ℕ.

Solution (8 of 10)

Suppose λ = \frac{(2n − 1)π}{2L} with n ∈ ℕ, then sin(λL) = ±1 and

(λ − \frac{αβ}{λ} ) sin(λL) = (α + β) cos (λL)
λ − \frac{αβ}{λ} = 0
αβ = (\frac{(2n − 1)π}{2L} )^{2} .

If there is no n ∈ ℕ satisfying the last equation, then cos (λL) ≠ 0 and

(λ − \frac{αβ}{λ} ) sin(λL) = (α + β) cos (λL)
(λ − \frac{αβ}{λ} ) tan(λL) = α + β
tan(λL) = \frac{α + β}{λ − \frac{αβ}{λ}} = \frac{(α + β)λ}{λ^{2} − αβ}.

Solution (8 of 10)

Suppose λ = \frac{(2n − 1)π}{2L} with n ∈ ℕ, then sin(λL) = ±1 and

(λ − \frac{αβ}{λ} ) sin(λL) = (α + β) cos (λL)
λ − \frac{αβ}{λ} = 0
αβ = (\frac{(2n − 1)π}{2L} )^{2} .

If there is no n ∈ ℕ satisfying the last equation, then cos (λL) ≠ 0 and

(λ − \frac{αβ}{λ} ) sin(λL) = (α + β) cos (λL)
(λ − \frac{αβ}{λ} ) tan(λL) = α + β
tan(λL) = \frac{α + β}{λ − \frac{αβ}{λ}} = \frac{(α + β)λ}{λ^{2} − αβ}.

tan(λL) = \frac{(α + β)λ}{λ^{2} − αβ}

This equation has positive solutions which can be approximated using Newton’s method.

L = α = β = 1

Solution (10 of 10)

The first few solutions are

λ_{1} ≈ 1.20779
λ_{2} ≈ 3.44824
λ_{3} ≈ 6.44095
λ_{4} ≈ 9.53048

and λ_{n} → (n − 1)π as n → ∞. The corresponding eigenfunctions are

X_{n}(x) = A_{n} cos (λ_{n}x) + B_{n} sin(λ_{n}x)

while the product solutions have the form u_{n}(x, t) = e^{−λ_{n}^{2}t}(A_{n} cos (λ_{n}x) + B_{n} sin(λ_{n}x)).

Nonhomogeneous Boundary Conditions

Consider the IBVP:

u_{t} = ku_{xx} for 0 < x < L, t > 0
u(0, t) = u_{0}
u(L, t) = u_{L}
u(x, 0) = f (x)

Recall that the temperature in the region asymptotically approached a steady state of 0 when the boundary conditions were homogeneous (u(0, t) = u(L, t) = 0). Suppose that in the nonhomogeneous case the temperature distribution approaches a nonzero steady state U(x).

Steady-State Solution

Suppose

U′′(x) = 0 for 0 < x < L
U(0) = u_{0}
U(L) = u_{L}

then U(x) = Ax + B.

U(0) = u_{0} = A(0) + B ⟹ B = u_{0}

The other boundary condition implies

U(L) = u_{L} = AL + u_{0} ⟹ A = \frac{u_{L} − u_{0}}{L}.

Hence the steady-state solution is

U(x) = \frac{(u_{L} − u_{0})x}{L} + u_{0}.

Time-Dependent Solution (1 of 2)

Assume the solution to the IBVP can be written as u(x, t) = U(x) + v(x, t) where v(x, t) is an unknown function.

Question: what IBVP must v(x, t) satisfy?

u_{t} = ku_{xx}
(U(x) + v(x, t))_{t} = k(U(x) + v(x, t))_{xx}
v_{t} = kv_{xx} (PDE)

u(0, t) = u_{0}
U(0) + v(0, t) = u_{0}
v(0, t) = 0 (BC at x = 0)

Likewise v(L, t) = 0.

u(x, 0) = f (x)
U(x) + v(x, 0) = f (x)
v(x, 0) = f (x) − U(x) (IC at t = 0)

Time-Dependent Solution (1 of 2)

Assume the solution to the IBVP can be written as u(x, t) = U(x) + v(x, t) where v(x, t) is an unknown function.

Question: what IBVP must v(x, t) satisfy?

u_{t} = ku_{xx}
(U(x) + v(x, t))_{t} = k(U(x) + v(x, t))_{xx}
v_{t} = kv_{xx} (PDE)

u(0, t) = u_{0}
U(0) + v(0, t) = u_{0}
v(0, t) = 0 (BC at x = 0)

Likewise v(L, t) = 0.

u(x, 0) = f (x)
U(x) + v(x, 0) = f (x)
v(x, 0) = f (x) − U(x) (IC at t = 0)

Time-Dependent Solution (1 of 2)

Assume the solution to the IBVP can be written as u(x, t) = U(x) + v(x, t) where v(x, t) is an unknown function.

Question: what IBVP must v(x, t) satisfy?

u_{t} = ku_{xx}
(U(x) + v(x, t))_{t} = k(U(x) + v(x, t))_{xx}
v_{t} = kv_{xx} (PDE)

u(0, t) = u_{0}
U(0) + v(0, t) = u_{0}
v(0, t) = 0 (BC at x = 0)

Likewise v(L, t) = 0.

u(x, 0) = f (x)
U(x) + v(x, 0) = f (x)
v(x, 0) = f (x) − U(x) (IC at t = 0)

Time-Dependent Solution (2 of 2)

v_{t} = kv_{xx} for 0 < x < L and t > 0
v(0, t) = 0
v(L, t) = 0
v(x, 0) = f (x) − U(x)

Ifb_{n} = \frac{2}{L} ∫_{0}^{L}(f (x) − U(x)) sin \frac{nπx}{L} dx,
then v(x, t) = ∑_{n=1}^{∞}b_{n}e^{−kn^{2}π^{2}t/L^{2}}sin \frac{nπx}{L},

and u(x, t) = u_{0} + \frac{(u_{L} − u_{0})x}{L} + ∑_{n=1}^{∞}b_{n}e^{−kn^{2}π^{2}t/L^{2}}sin \frac{nπx}{L}.

Time-Dependent Solution (2 of 2)

v_{t} = kv_{xx} for 0 < x < L and t > 0
v(0, t) = 0
v(L, t) = 0
v(x, 0) = f (x) − U(x)

Ifb_{n} = \frac{2}{L} ∫_{0}^{L}(f (x) − U(x)) sin \frac{nπx}{L} dx,
then v(x, t) = ∑_{n=1}^{∞}b_{n}e^{−kn^{2}π^{2}t/L^{2}}sin \frac{nπx}{L},

and u(x, t) = u_{0} + \frac{(u_{L} − u_{0})x}{L} + ∑_{n=1}^{∞}b_{n}e^{−kn^{2}π^{2}t/L^{2}}sin \frac{nπx}{L}.

Example

Solve the following IBVP:

u_{t} = 5u_{xx} for 0 < x < 1 and t > 0
u(0, t) = 10
u(1, t) = 20
u(x, 0) = 10 + 11x − x^{2}

Solution (1 of 2)

The steady-state solution is

U(x) = 10 + \frac{(20 − 10)x}{1} = 10(1 + x).

The transient solution v(x, t) satisfies the IBVP:

v_{t} = 5v_{xx} for 0 < x < 1 and t > 0
v(0, t) = 0
v(1, t) = 0
v(x, 0) = 10 + 11x − x^{2} − 10(1 + x) = x − x^{2}

Solution (1 of 2)

The steady-state solution is

U(x) = 10 + \frac{(20 − 10)x}{1} = 10(1 + x).

The transient solution v(x, t) satisfies the IBVP:

v_{t} = 5v_{xx} for 0 < x < 1 and t > 0
v(0, t) = 0
v(1, t) = 0
v(x, 0) = 10 + 11x − x^{2} − 10(1 + x) = x − x^{2}

b_{n} = 2 ∫_{0}^{1}(x − x^{2}) sin(nπx) dx
= \frac{4(1 − (−1)^{n})}{n^{3}π^{3}}
= \{ \begin{matrix}0 & if n is even, \\ 8/(n^{3}π^{3}) & if n is odd. \end{matrix}

v(x, t) = \frac{8}{π^{3}} ∑_{n=1}^{∞} \frac{e^{−5(2n−1)^{2}π^{2}t}}{(2n − 1)^{3}} sin((2n − 1)πx)

u(x, t) = 10(1 + x) + \frac{8}{π^{3}} ∑_{n=1}^{∞} \frac{e^{−5(2n−1)^{2}π^{2}t}}{(2n − 1)^{3}} sin((2n − 1)πx)

Time Dependent Boundary Conditions

Consider the IBVP:

u_{t} = ku_{xx}, for 0 < x < L and t > 0
u(0, t) = a(t)
u(L, t) = b(t)
u(x, 0) = f (x)

▶ In this situation the boundary conditions are functions of

time. ▶ There may not be a steady-state solution, but the approach

used in the case of constant, nonhomogeneous BCs is useful.

Define a reference function r(x, t) = a(t) + \frac{(b(t) − a(t))x}{L} and suppose u(x, t) = r(x, t) + v(x, t).

Question: what IBVP does v(x, t) satisfy?

Time Dependent Boundary Conditions

Consider the IBVP:

u_{t} = ku_{xx}, for 0 < x < L and t > 0
u(0, t) = a(t)
u(L, t) = b(t)
u(x, 0) = f (x)

▶ In this situation the boundary conditions are functions of

time. ▶ There may not be a steady-state solution, but the approach

used in the case of constant, nonhomogeneous BCs is useful.

Define a reference function r(x, t) = a(t) + \frac{(b(t) − a(t))x}{L} and suppose u(x, t) = r(x, t) + v(x, t).

Question: what IBVP does v(x, t) satisfy?

PDE for v(x, t)

u_{t} = ku_{xx}
(r(x, t) + v(x, t))_{t} = k(r(x, t) + v(x, t))_{xx}
a′(t) + \frac{(b′(t) − a′(t))x}{L} + v_{t} = kv_{xx}
v_{t} = kv_{xx} − a′(t) − \frac{(b′(t) − a′(t))x}{L}

Note: this PDE is nonhomogeneous.

BCs for v(x, t)

u(0, t) = a(t)
r(0, t) + v(0, t) = a(t)
a(t) + v(0, t) = a(t)
v(0, t) = 0 (BC at x = 0)
u(L, t) = b(t)
r(L, t) + v(L, t) = b(t)
b(t) + v(L, t) = b(t)
v(L, t) = 0 (BC at x = L)

The boundary conditions are once again homogeneous.

IC for v(x, t)

u(x, 0) = f (x)
r(x, 0) + v(x, 0) = f (x)
a(0) + \frac{(b(0) − a(0))x}{L} + v(x, 0) = f (x)
v(x, 0) = f (x) − a(0) − \frac{(b(0) − a(0))x}{L}

IBVP for v(x, t)

In summary:

v_{t} = kv_{xx} − a′(t) − \frac{(b′(t) − a′(t))x}{L} for 0 < x < L and t > 0
v(0, t) = 0
v(L, t) = 0
v(x, 0) = f (x) − a(0) − \frac{(b(0) − a(0))x}{L}

Remarks:

▶ This IBVP has a nonhomogeneous PDE and a non-trivial

initial condition. ▶ Search for a solution v(x, t) = v_{1}(x, t) + v_{2}(x, t) for which

v_{1}(x, t) solves the nonhomogeneous PDE with a zero initial condition and v_{2}(x, t) solves a homogeneous PDE with a non-zero initial condition.

Sum of Solutions

Consider the two IBVPs:

(v_{1})_{t} = k(v_{1})_{xx} for 0 < x < L, t > 0
v_{1}(0, t) = 0
v_{1}(L, t) = 0
v_{1}(x, 0) = f (x) − \frac{(b(0) − a(0))x}{L} − a(0)

(v_{2})_{t} = k(v_{2})_{xx} − a′(t) − \frac{(b′(t) − a′(t))x}{L} for 0 < x < L, t > 0
v_{2}(0, t) = 0
v_{2}(L, t) = 0
v_{2}(x, 0) = 0

If v_{1}(x, t) solves the 1st IBVP and v_{2}(x, t) solves the 2nd IBVP, then v(x, t) = v_{1}(x, t) + v_{2}(x, t) solves:

v_{t} = kv_{xx} − a′(t) − \frac{(b′(t) − a′(t))x}{L} for 0 < x < L and t > 0
v(0, t) = 0
v(L, t) = 0
v(x, 0) = f (x) − a(0) − \frac{(b(0) − a(0))x}{L}

Solution of IBVP with Homogeneous PDE

The IBVP,

(v_{1})_{t} = k(v_{1})_{xx} for 0 < x < L, t > 0
v_{1}(0, t) = 0
v_{1}(L, t) = 0
v_{1}(x, 0) = f (x) − \frac{(b(0) − a(0))x}{L} − a(0)

has solution

v_{1}(x, t) = ∑_{n=1}^{∞}b_{n}e^{−kn^{2}π^{2}t/L^{2}}sin \frac{nπx}{L}

where

b_{n} = \frac{2}{L} ∫_{0}^{L}(f (x) − \frac{(b(0) − a(0))x}{L} − a(0)) sin \frac{nπx}{L} dx.

Solution of IBVP with Nonhomogeneous PDE

We will assume the solution to the IBVP:

(v_{2})_{t} = k(v_{2})_{xx} − a′(t) − \frac{(b′(t) − a′(t))x}{L} for 0 < x < L, t > 0
v_{2}(0, t) = 0
v_{2}(L, t) = 0
v_{2}(x, 0) = 0

is of the form

v_{2}(x, t) = ∑_{n=1}^{∞}b_{n}(t)e^{−kn^{2}π^{2}t/L^{2}}sin \frac{nπx}{L}

where the coefficients b_{n} are functions of t. Differentiate this solution and substitute it into the nonhomogeneous PDE.

Verifying the Solution

(v_{2})_{xx} = − ∑_{n=1}^{∞} \frac{n^{2}π^{2}}{L^{2}}b_{n}(t)e^{−kn^{2}π^{2}t/L^{2}}sin \frac{nπx}{L}

(v_{2})_{t} = ∑_{n=1}^{∞}(b′_{n}(t)e^{−kn^{2}π^{2}t/L^{2}}− \frac{kn^{2}π^{2}}{L^{2}}b_{n}(t)e^{−kn^{2}π^{2}t/L^{2}})sin \frac{nπx}{L}

Since (v_{2})_{t} − k(v_{2})_{xx} = −a′(t) − \frac{(b′(t) − a′(t))x}{L} then

∑_{n=1}^{∞}b′_{n}(t)e^{−kn^{2}π^{2}t/L^{2}}sin \frac{nπx}{L} = −a′(t) − \frac{(b′(t) − a′(t))x}{L}.

Multiply both sides by sin(mπx/L) and integrate over [0, L].

Integration and Orthogonality

− ∫_{0}^{L}(a′(t) + \frac{(b′(t) − a′(t))x}{L})sin \frac{mπx}{L} dx = \frac{L}{2}b′_{m}(t)e^{−km^{2}π^{2}t/L^{2}}
−\frac{L}{nπ}(a′(t) − (−1)^{m}b′(t)) = \frac{L}{2}b′_{m}(t)e^{−km^{2}π^{2}t/L^{2}}
b′_{m}(t) = \frac{2}{mπ}e^{km^{2}π^{2}t/L^{2}}((−1)^{m}b′(t) − a′(t))

Integrate both sides with respect to t.

∫_{0}^{t}b′_{m}(s) ds = \frac{2}{mπ} ∫_{0}^{t}e^{km^{2}π^{2}s/L^{2}}((−1)^{m}b′(s) − a′(s)) ds
b_{m}(t) − b_{m}(0) = \frac{2}{mπ} ∫_{0}^{t}e^{km^{2}π^{2}s/L^{2}}((−1)^{m}b′(s) − a′(s)) ds

Since v_{2}(x, 0) = 0 then b_{m}(0) = 0 for m ∈ ℕ.

Integration and Orthogonality

− ∫_{0}^{L}(a′(t) + \frac{(b′(t) − a′(t))x}{L})sin \frac{mπx}{L} dx = \frac{L}{2}b′_{m}(t)e^{−km^{2}π^{2}t/L^{2}}
−\frac{L}{nπ}(a′(t) − (−1)^{m}b′(t)) = \frac{L}{2}b′_{m}(t)e^{−km^{2}π^{2}t/L^{2}}
b′_{m}(t) = \frac{2}{mπ}e^{km^{2}π^{2}t/L^{2}}((−1)^{m}b′(t) − a′(t))

Integrate both sides with respect to t.

∫_{0}^{t}b′_{m}(s) ds = \frac{2}{mπ} ∫_{0}^{t}e^{km^{2}π^{2}s/L^{2}}((−1)^{m}b′(s) − a′(s)) ds
b_{m}(t) − b_{m}(0) = \frac{2}{mπ} ∫_{0}^{t}e^{km^{2}π^{2}s/L^{2}}((−1)^{m}b′(s) − a′(s)) ds

Since v_{2}(x, 0) = 0 then b_{m}(0) = 0 for m ∈ ℕ.

Assembling the Solution

r(x, t) = a(t) + \frac{(b(t) − a(t))x}{L}
v_{1}(x, t) = ∑_{n=1}^{∞}b_{n}e^{−kn^{2}π^{2}t/L^{2}}sin \frac{nπx}{L}

v_{2}(x, t) = ∑_{n=1}^{∞} \frac{2}{nπ} [∫_{0}^{t}e^{−kn^{2}π^{2}(t−s)/L^{2}}((−1)^{n}b′(s) − a′(s)) ds] sin \frac{nπx}{L}
u(x, t) = r(x, t) + v_{1}(x, t) + v_{2}(x, t)

Example

Find the solution to the following IBVP.

u_{t} = u_{xx} for 0 < x < 1 and t > 0
u(0, t) = t
u(1, t) = 1 + sin t
u(x, 0) = x

The reference function is r(x, t) = t + (1 − t + sin t)x.

Example

Find the solution to the following IBVP.

u_{t} = u_{xx} for 0 < x < 1 and t > 0
u(0, t) = t
u(1, t) = 1 + sin t
u(x, 0) = x

The reference function is r(x, t) = t + (1 − t + sin t)x.

Associated Homogeneous IVBP

(v_{1})_{t} = (v_{1})_{xx} for 0 < x < 1 and t > 0
v_{1}(0, t) = 0
v_{1}(1, t) = 0
v_{1}(x, 0) = x − (0 + (1 − 0 + sin 0)x) = x − x = 0

Hence v_{1}(x, t) = 0.

Associated Nonhomogeneous IVBP

(v_{2})_{t} = (v_{2})_{xx} − 1 + (1 − cos t)x

for 0 < x < 1 and t > 0

v_{1}(0, t) = 0
v_{1}(1, t) = 0
v_{1}(x, 0) = 0

Assume solution v_{2}(x, t) has the form

v_{2}(x, t) = ∑_{n=1}^{∞}b_{n}(t)e^{−n^{2}π^{2}t}sin(nπx)

where

b_{n}(t) = \frac{2}{nπ} ∫_{0}^{t}e^{n^{2}π^{2}s}((−1)^{n} cos s − 1) dx.

Calculation of b_{n}(t)

b_{n}(t) = \frac{2}{nπ} ∫_{0}^{t}e^{n^{2}π^{2}s}((−1)^{n} cos s − 1) dx
= \frac{1 − e^{n^{2}π^{2}t}}{n^{2}π^{2}} − \frac{(−1)^{n}n^{2}π^{2}}{1 + n^{4}π^{4}} + \frac{(−1)^{n}e^{n^{2}π^{2}t}}{1 + n^{4}π^{4}} (n^{2}π^{2} cos t + sin t)

Graph Homework

▶ Read Section 4.2 ▶ Exercises: 4, 5, 6