You are on page 1of 1

PDEs 2 (Spring 2022/2023)

Problem sheet 2

Please upload your solution to problem 1 (as a single PDF file) onto the Assignment 2 Moodle
page by 14:00 on Thursday, 16 February (Week 6).

Consider the heat equation


ut − Kuxx = 0 for 0 < x < 1, t > 0, (1)
subject to the boundary conditions
u(0, t) = 0, u(1, t) = 0, (2)
and the initial condition
u(x, 0) = u0 (x). (3)

Problem 1*. Show that the Du Fort - Frankel method for Eq. (1), given by
wk,j+1 − wk,j−1 wk+1,j − wk,j−1 − wk,j+1 + wk−1,j
−K = 0,
2τ h2

has the local truncation error O τ 2 + h2 + τ 2 /h2 .

Problem 2. The initial boundary value problem (1)–(3) is solved numerically using the finite-difference method:

wk0 = u0 (xk ), w0j = 0, wN j = 0,


wk,j+1 − wk,j wk+1,j − 2wkj + wk−1,j wk+1,j+1 − 2wk,j+1 + wk−1,j+1
− K(1 − σ) − Kσ = 0, (4)
τ h2 h2
for k = 1, 2, . . . , N −1 and j = 0, 1, . . . . Here wkj is an approximation to u(xk , yj ) and xk = kh (k = 0, 1, . . . , N ),
tj = jτ (j = 0, 1, . . . ), h = N1 . In Eqs. (4), σ is a real parameter such that 0 ≤ σ ≤ 1. Show that the method
is stable if  
1 1
σ≥ 1−
2 2γ
where γ = Kτ /h2 .

Problem 3. Show that if


Kτ 1
γ≡ 2
=
h 6
in the explicit forward-difference method for Eq. (1):
wk,j+1 − wkj wk+1,j − 2wkj + wk−1,j
−K = 0,
τ h2
then the local truncation error is O(τ 2 ) or, equivalently O(h4 ).

Problem 4. Consider the equation

∂u ∂ 2u ∂u
= 3 2 − 2a(x, t) + b(x, t) for 0 < x < 1, t > 0,
∂t ∂x ∂x
subject to the initial and boundary conditions

u(0, t) = µ1 (t), u(1, t) = µ2 (t), u(x, 0) = u0 (x).

Obtain a finite-difference approximation to this boundary-value problem and show that your finite-difference
method is consistent with the equation, i.e. that the local truncation errors tend to zero as step sizes in x and
in t go to zero.

You might also like