Docsity

MATH 609-602 Assignment 5: Numerical Integration and Richardson Extrapolation - Prof. Rayt, Assignments of Mathematical Methods for Numerical Analysis and Optimization

Toggle sidebar
bg1
MATH 609-602 Numerical Analysis
Program assignment #5
Numerical Integration and Richardson Extrapolation
Write a program for evaluation of the following integrals with an error of 0.00001 using
composite trapezoidal rule and Richardson extrapolation technique by halving the integra-
tion interval. This is the Romberg algorithm from pp. 541-543 of Kincaid and Cheney’s
Numerical Analysis.
Specifications:
1. The program should be well commented and should use double precision.
2. For stopping criterion use |R(i, i)−R(i−1, i −1)| ≤ 0.000001|R(i−1, i −1)|where
R(i, j) are defined recursively using the error expansion of the trapezoidal rule (see p.
541- 544 of your textbook).
3. Write a short report in the usual format containing: (1) Table with all R(i, i) for the
integrals; (2) the requested plots.
Computational examples
(1) Evaluate the following integrals:
Z2
0
x2exdx, Z3
0
e−x2dx, 5(eπ−2)−1Zπ/2
0
e2xcosxdx.
(2) Use the program to plot the Bessel function of oder zero in the interval (0,4):
J0(x) = 1
πZπ
0
cos(xsint)dt.
Remark: There will be penalties for delay - for each day 5 points (out of 100).

Partial preview of the text

Download MATH 609-602 Assignment 5: Numerical Integration and Richardson Extrapolation - Prof. Rayt and more Assignments Mathematical Methods for Numerical Analysis and Optimization in PDF only on Docsity!

MATH 609-602 Numerical Analysis Program assignment # Numerical Integration and Richardson Extrapolation

Write a program for evaluation of the following integrals with an error of 0.00001 using composite trapezoidal rule and Richardson extrapolation technique by halving the integra- tion interval. This is the Romberg algorithm from pp. 541-543 of Kincaid and Cheney’s Numerical Analysis.

Specifications:

  1. The program should be well commented and should use double precision.
  2. For stopping criterion use |R(i, i) − R(i − 1 , i − 1)| ≤ 0. 000001 |R(i − 1 , i − 1)| where R(i, j) are defined recursively using the error expansion of the trapezoidal rule (see p. 541- 544 of your textbook).
  3. Write a short report in the usual format containing: (1) Table with all R(i, i) for the integrals; (2) the requested plots.

Computational examples

(1) Evaluate the following integrals: ∫ (^2)

0

x^2 exdx,

∫ (^3)

0

e−x

2 dx, 5(eπ^ − 2)−^1

∫ (^) π/ 2

0

e^2 xcosxdx.

(2) Use the program to plot the Bessel function of oder zero in the interval (0, 4):

J 0 (x) =

π

∫ (^) π

0

cos(xsint)dt.

Remark: There will be penalties for delay - for each day 5 points (out of 100).