Docsity

Numerical Solutions for PDE Boundary Value Problems with Finite Difference Method - Prof. , Assignments of Mathematics

Toggle sidebar
bg1
AMSC 612 Fall 2008
NUMERICAL METHODS FOR PDE
HOMEWORK # 1 (due Tu Sep 23)
1 (25 pts). Problem 2.4 of Larsson and Thom´ee.
2 (25 pts). Problem 2.8 of Larsson and Thom´ee.
3 (20 pts). Problem 4.3 of Larsson and Thom´ee
4 (30 pts). Consider the two-point boundary value problem with parameter b:
−u00 +bu0+u= 2xin (0,1),with u(0) = u(1) = 0.(1)
(a) Find the exact solution u(x) in terms of the parameter b.
(b) Write the finite difference approximation of (1) using centered differences and upwind
differences on a uniform mesh with meshsize h. Write the matrix form of the system and
examine how the equations would change if u(1) = α6= 0.
(c) Implement the finite difference method using MATLAB. To this end use the command
diag to construct the corresponding tridiagonal matrix (type help diag to learn about
this command). Use the backslash command \to find the solution to Ax=b as x=A\b.
(d) Solve the linear system for h=1
52−kfor 0 ≤k≤5 and b= 0,100. Compute the
maximum norm error at the nodes and plot it vs hin a log-log plot. Explain your findings.
(e) Plot the exact solution u(x) and the computed solution as a piecewise linear function
over the corresponding grid for h= 1/20,1/80 and b= 0,100. Draw conclusions.

Partial preview of the text

Download Numerical Solutions for PDE Boundary Value Problems with Finite Difference Method - Prof. and more Assignments Mathematics in PDF only on Docsity!

AMSC 612 Fall 2008 NUMERICAL METHODS FOR PDE

HOMEWORK # 1 (due Tu Sep 23)

1 (25 pts). Problem 2.4 of Larsson and Thom´ee.

2 (25 pts). Problem 2.8 of Larsson and Thom´ee.

3 (20 pts). Problem 4.3 of Larsson and Thom´ee

4 (30 pts). Consider the two-point boundary value problem with parameter b:

−u′′^ + bu′^ + u = 2x in (0, 1), with u(0) = u(1) = 0. (1)

(a) Find the exact solution u(x) in terms of the parameter b.

(b) Write the finite difference approximation of (1) using centered differences and upwind differences on a uniform mesh with meshsize h. Write the matrix form of the system and examine how the equations would change if u(1) = α 6 = 0.

(c) Implement the finite difference method using MATLAB. To this end use the command diag to construct the corresponding tridiagonal matrix (type help diag to learn about this command). Use the backslash command \ to find the solution to Ax=b as x = A\b.

(d) Solve the linear system for h = 15 2 −k^ for 0 ≤ k ≤ 5 and b = 0, 100. Compute the maximum norm error at the nodes and plot it vs h in a log-log plot. Explain your findings.

(e) Plot the exact solution u(x) and the computed solution as a piecewise linear function over the corresponding grid for h = 1/ 20 , 1 /80 and b = 0, 100. Draw conclusions.