You are on page 1of 2

Num. Anal. in Mech. Eng.

Handout #3
Fall 2013
H. Choi

HOMEWORK 1
Due: October 7, 2013

1. Obtain operation counts for solving Ax = b, where A is a pentadiagonal matrix.

2. The following finite difference scheme has been suggested for approximating

∂ 2u ∂ 2u
+ :
∂x2 ∂y 2

1
(ui−1,j+1 + 4ui,j+1 + ui+1,j+1 + 4ui+1,j
6h2
+ui+1.j−1 + 4ui,j−1 + ui−1,j−1 + 4ui−1,j − 20ui,j )
Show that the corresponding system of algebraic equations for the equation:

∂ 2u ∂ 2u
+ = f (x, y)
∂x2 ∂y 2

is of block banded form and give the block matrices.


( )
2 1 1
3. Given A = 4 1 0 , decompose A into L (lower triangular matrix) and U
−2 2 1
(upper triangular matrix) with your pencils and computer, respectively, and compare
the results. The computer program is available from Numerical Recipes. (also uploaded
at the course homepage)

4. The following figures from the Census Bureau give the population of Korea (in Millions)
(Source: Korea National Statistical Office)
Year Population
1930 21.058
1940 23.547
1949 20.167
1955 21.502
1960 24.989
1970 30.852
1980 37.407
1990 43.390
2000 45.985
2005 47.041
2010 49.268
(a) Plot the points and interpolate a smooth curve by intuition.
(b) Interpolate the data by a Lagrange Polynomial. Plot the Polynomial using its values
at the data points and at several intermediate points. Use this polynomial to predict
(extrapolate) the population at one year intervals up to 2020. Tabulate and plot the
population prediction. Discuss the significance/limitation of your results.
(c) Suppose due to some circumstances the Census data for the year 2010 was lost. Use
Lagrange interpolation and the remaining data to estimate (interpolate) the population
up to 2020. Plot the resulting polynomial. How accurate is the prediction of the new
polynomial for the missing data. (You may see zero population at some point. When
is the DOOMSDAY?)
(d) Repeat parts (b) and (c) using a cubic spline with your own end condition. Discuss
your results.

5. Find the most accurate formula and the corresponding leading error term for the
first derivative at xi given the values of the function at xi , xi−3 , xi−2 , xi−1 and xi+1 .
Assume the points are uniformly spaced. In case a Padé scheme is used with the same
points, what are the most accurate formula and the leading error term? Discuss your
results.

6. Verify that the modified wavenumber for the fourth-order Padé scheme for the first
derivative is
3 sin(kh)
k′ = .
h(2 + cos(kh))

7. Obtain the modified wavenumber for the following non-central finite difference scheme:

−3fj + 4fj+1 − fj+2


fj′ = .
2h
Plot its real and imaginary parts separately and discuss your results.

8. Compute f ′ (2) and f ′ (0.2) for f (x) = x 3 using 1st-order forward difference, 2nd-order
1

central difference and fourth-order Padé scheme, respectively, with h (= ∆x) = 0.2, 0.1
and 0.05. Compare the resutls with exact solutions, and plot the errors vs. h. Discuss
your results (you may want to calculate the magnitudes of leading error terms and
compare them with your errors).

You might also like