PDE Problems & Solutions
PDE Problems & Solutions
∂ u(x,t) ∂ 2 u(x,t)
= ; 0 ≤ t ≤ 0.1, 0 ≤ x ≤ 2
∂t ∂ x2
Where
u(0,t) = u(2,t) = 0
πx
u(x, 0) = sin
2
(13 marks)
b) Find the absolute percentage errors of your numerical solution at t = 0.05
where the corresponding analytical solution is given as,
π2
πx
u(x,t) = e− 4 t sin
2
(5 marks)
(Total marks:25)
End of Question Paper
4
4.
One dimensional diffusion equation is given by
∂ u(x,t) ∂ 2 u(x,t)
= α2 ; t > 0, 0 ≤ x ≤ l
∂t ∂ x2
Where α ∈ R.
i Using the finite central difference approximation for spatial derivative with
sub-interval size h and back-ward difference approximation for time derivative
with sub-interval size k, obtain the Crank-Nicolson numerical scheme.
(5 marks)
ii
a) Use the above derived Crank-Nicolson scheme to solve the following
problem where the sizes of space and time sub-intervals are h = 0.25 and
k = 0.05,respectively.
∂ u(x,t) 1 ∂ 2 u(x,t)
= ; 0 ≤ t ≤ 0.1, 0 ≤ x ≤ 1
∂t 16 ∂ x2
Where
u(0,t) = u(1,t) = 0
u(x, 0) = 2 sin(2πx)
(15 marks)
b) Find the absolute percentage errors of your numerical solution at t = 0.05
where the corresponding analytical solution is given as,
2
u(x,t) = 2e−0.25π t sin(2πx)
(5 marks)
(Total marks:25)
End of Question Paper
1
1. i Use the above derived Crank-Nicolson scheme to solve the following prob-
lem where the sizes of space and time sub-intervals are h = 0.25 and k =
0.04,respectively.
∂ u(x,t) 1 ∂ 2 u(x,t)
= ;t > 0, 0 ≤ x ≤ 1
∂t π ∂ x2
Where
u(0,t) = u(1,t) = 0
1
u(x, 0) = cos π(x − )
2
ii Find the absolute percentage errors of your numerical solution at t = 0.12
where the corresponding analytical solution is given as,
1
u(x,t) = e−t cos π(x − )
2