You are on page 1of 4

Mahindra University, Hyderabad

MA 3115: Computational Methods for PDE

Problem sheet-III
Problem 1. Find Newton’s divided difference approximating polynomial to the data
x: x1 x2 x3
u(x) : u(x1 ) u(x2 ) u(x3 )
then show that
d2 u(x2 )
≈ c1 u(x1 ) + c2 u(x2 ) + c3 u(x3 )
dx2
2 2 2
where c1 = , c2 = − , c3 = , h1 = x2 − x1 , h2 = x3 − x2 .
h1 (h1 + h2 ) h1 h2 h2 (h1 + h2 )
Problem 2. Find constants A, B and C such that the following rule is exact for the
highest degree polynomial
du
≈ A u(x) + B u(x − h) + C u(x − 2h),
dx
where h = ∆x.
Problem 3. Show that the following BVPs (Boundary Value Problem) have a unique
solution
d2 y 0
(a) 2
+ e−xy + sin(y ) = 0, 0 ≤ x ≤ 2, y(1) = y(2) = 0.
dx
d2 y
(b) = y + x, 0 ≤ x ≤ 1, y(0) = 0, y(1) = 0
dx2
Problem 4. Solve the BVP (Boundary Value Problem)
d2 y
= y + x, y(0) = 0, y(1) = 0
dx2
1
using finite difference method with h = . Then compare with exact values.
4
Problem 5. Solve the following boundary value problem using finite difference method,
with ∆x = ∆y = 13

∂ 2u ∂ 2u
+ = 0, 0 < x < 1, 0 < y < 1
∂x2 ∂y 2
u(x, 0) = u(0, y) = 0, u(x, 1) = x, u(1, y) = y, 0 ≤ x ≤ 1, 0 ≤ y ≤ 1
Problem 6. Solve the following BVP
∇2 u = 0, 0 ≤ r ≤ 1, 0 ≤ θ ≤ π
4
u(1, θ) = (πθ − θ2 ), u(r, 0) = u(r, π) = 0, u(0, θ) < ∞.
π
1
with ∆r = 2
and ∆θ = π4 .
Problem 7. Perform two iterations to solve the following one dimensional heat equation
using FTCS and Crank−Nicolson scheme, with ∆x = 41 .

∂u ∂ 2u
= , 0 < x < 2, t > 0.
∂t ∂x2
u(0, t) = 0, ux (2, t) = 1, t ≥ 0 and u(x, 0) = x, 0 ≤ x ≤ 2.
Problem 8. Discuss the stability and consistency of the following DuFort-Frankel scheme
for solving 1D heat equation
Ui,j+1 − Ui,j−1 Ui+1,j − Ui,j+1 − Ui,j−1 + Ui−1,j
=
2∆t (∆x)2
Problem 9. The equation
∂u ∂u
α + − f (x, t) = 0, α ∈ R
∂t ∂x
is approximated at the point (i∆x, j∆t) in the xt− plane by the following difference
scheme,

α(Ui,j+1 − 0.5(Ui+1,j + Ui−1,j )) Ui+1,j − Ui−1,j


+ − fi,j = 0.
∆t 2∆x
Then investigate the consistency of this scheme for (a) ∆t = r∆x and (b) ∆t = r(∆x)2 , r ∈
R+ .
Problem 10. Discuss the consistency of the following numerical scheme for solving 1D
wave equation
Ui,j+1 − 2Ui,j + Ui,j−1 Ui+1,j − 2Ui,j + Ui−1,j
2
= c2 .
(∆t) (∆x)2
Problem 11. Solve the following PDE

∂ 2u ∂ 2u
= , 0 < x < 1, t > 0.
∂t2 ∂x2
 
∂u
u(x, 0) = sin(πx), = 0, 0 ≤ x ≤ 1
∂t (x,0)
u(0, t) = u(1, t) = 0, t ≥ 0.
Problem 12. Discuss the stability of Lax-Wendroff explicit scheme to solve the following
PDE,
∂u ∂u
+a = 0, a > 0
∂t ∂x
Problem 13. Use Lax-Wendroff explicit scheme to solve the following PDE,
∂u ∂u
+ = 0, u(0, t) = t, t > 0
∂t ∂x
u(x, 0) = x(x − 1), 0 ≤ x ≤ 1; u(x, 0) = 1 − x, x ≥ 1.

2
PROJECT (Weightage 10 % ) (Date of submission: December 10, 2022 )

Problem 14. Write a MATLAB program to the method of undetermined coefficients


dk u(xr )
for approximating , k = 1, 2, 3 and xr is a reference point.
dxk
Problem 15. Write a MATLAB code to solve a tri-diagonal system of equations

Then test the code for following system with n = 10 and n = 25,
4x1 − x2 = −20, xj−1 − 4xj + xj+1 = 40 (2 ≤ j ≤ n − 1), −xn−1 + 4xn = −20.
Problem 16. Write a MATLAB program to solve the following two-point boundary
value problems and then compare numerical solutions graphically.
d2 θ
(a) = −θ(t), 0 < t < 2π, θ(0) = 0.7, θ(2π) = 0.7.
dt2
d2 θ
(b) = − sin(θ(t)), 0 < t < 2π, θ(0) = 0.7, θ(2π) = 0.7.
dt2
Problem 17. Write a MATLAB program to solve the following BVPs

(a) Problem 4
(b) Problem 5
(b) Problem 6
(d) Problem 7
(e) Problem 11
(f) Problem 13

Practice Problems

Problem 18. Find values of a, b, c and d such that the following finite difference scheme
gives the best possible discritization to first order derivative for a fixed step size h.
du
≈ a u(x + h) + b u(x) + c u(x − h) + d u(x − 2h)
dx
Problem 19. Find constants A, B, C, D and E such that the following rule is exact for
the highest degree polynomial and find truncation error

d2 u
≈ A u(x − 2h) + B u(x − h) + C u(x) + D u(x + h) + E u(x + 2h),
dx2
where h = ∆x.

3
Problem 20. Perform two iterations to solve the following one dimensional heat equation
using FTCS and Crank−Nicolson scheme, with ∆x = 41 .

∂u ∂ 2u
=4 , 0 < x < 1, t > 0.
∂t ∂x2
u(0, t) = u(1, t) = 0, t ≥ 0 and u(x, 0) = x(1 − x), 0 < x < 1.

Problem 21. Discuss the stability of following numerical scheme for solving 1D heat
equation
Ui,j+1 − Ui,j−1 Ui+1,j − 2Ui,j + Ui−1,j
=
2∆t (∆x)2
Problem 22. Discuss the stability and consistency of the following implicit scheme for
solving 1D heat equation
Ui,j − Ui,j−1 Ui+1,j − 2Ui,j + Ui−1,j
=
∆t (∆x)2

Problem 23. Discuss the stability of the following numerical scheme for solving 1D wave
equation

c2 Ui+1,j − 2Ui,j + Ui−1,j Ui+1,j+1 − 2Ui,j+1 + Ui−1,j+1


 
Ui,j+1 − 2Ui,j + Ui,j−1
= + .
(∆t)2 2 (∆x)2 (∆x)2

Problem 24. Solve the following PDEs

∂ 2u ∂ 2u
= , 0 < x < 1, t > 0.
∂t2 ∂x2
 
∂u
u(x, 0) = 0, = sin3 (πx), 0 ≤ x ≤ 1
∂t (x,0)
u(0, t) = u(1, t) = 0, t ≥ 0.

You might also like