Department of Mathematics, IIT Madras
MA5892 Numerical Methods & Scientific computing
Assignment 1
1. Approximate the integral of 𝑓 (𝑥) = 𝑥 3 on the interval [1, 2] with four subintervals, using
Composite-Trapezoidal Rule.
2. Use (a) the Trapezoidal Rule, (b) the Midpoint Rule, and (c) Simpson’s Rule to approximate the
∫1
integral 𝐼 = 0 𝑥 2 𝑒 −𝑥 𝑑𝑥. (Round your answers to six decimal places.)
Ans. (a) 0.1839397 , (b) 0.16240168, (c) 0.1516327
3. Using the error analysis for the trapezoidal and rectangle rules, show that Simpson’s rule for
integration over the entire interval is fourth order accurate.
4. Explain the trapezoidal rule with end-correction. Compare the error of trapezoidal rule with
end-correction with that of the Simpson’s rule. Which rule is better?
5. Explain why the rectangle and trapezoidal rules can integrate a straight line exactly and the
Simpson’s rule can integrate a cubic exactly.
6. Using Taylor Series, derive the error term for Trapezoidal and Simpson rules by considering
grid points 𝑥 𝑗 ( 𝑗 = 0, . . . 𝑛). What happens to error if you consider only one interval?
7. Using Lagrange interpolating formula, derive
(a) Trapezoidal rule in one interval and associated the error
(b) Composite Trapezoidal rule and associated error
(c) Simpson rule in one interval and associated error
(d) Composite Simpson rule and associated error
8. Derive Simpson rule with end-correction.
9. Consider the evaluating
∫ 2
𝑑𝑥
𝐼= 2
𝑑𝑥
0 1+𝑥
using the trapezoidal rule. How large should 𝑛 be chosen in order to ensure that
|error| ≤ 5 × 10−6
Ans: 𝑛 ≥ 517
∫2 √
10. Approximate 0 𝑥2 𝑥2
1 + 𝑑𝑥 using the Romberg integration with 𝑛 = 4.
11. Describe in detail an adoptive quadrature method that uses the trapezoidal rule as its basic
integration scheme. Show in detail the error estimate.
∫ 𝜋/4
12. Approximate 𝐼 = 0 𝑥 2 sin 𝑥𝑑𝑥 using Gaussian quadrature with 𝑛 = 2 (i.e. two-point Gaussian
quadrature rule) and compare with exact value of the integral.