Numerical methods
For Questions 1-4 below, write computer code in C+ or MATHLAB to estimate
∫ 𝑑𝑥
√𝑥2 − 4
5
3
using the given method. Then calculate the absolute and relative errors for each. Use exact value p =
0.6044:
1. Composite Midpoint Rule with N = 8.
2. Composite Trapezoidal Rule with N = 6.
3. Composite Simpson’s Rule with N = 8.
4. Romberg Integration with N = 4.