(a) A function f(x) is periodic with period ̄̄̄̄ if f(x) = f(x + ̄̄̄̄), -∑ < x < ∑ and this relation should not be true with any smaller value of ̄̄̄̄. For example, f(x) = e^cos(x) is periodic with period ̄̄̄̄ = 2̄̄̄̄. If f(x) is periodic and differentiable, then its derivatives are also periodic with period ̄̄̄̄. In addition, something special occurs when we use the Trapezoidal rule to integrate periodic functions over an interval which is an integer multiple of the period ̄̄̄̄. To illustrate this, consider the definite integral
I(f) = ∫_0^{2̄̄̄̄} e^cos(x) dx.
(The exact value of this integral is 2̄̄̄̄I_0(1) ≈ 7.9549265210128452...; here I_0(x) is a special function known as the Modified Bessel Function of the First Kind.)
(i) Write out the Trapezoidal rule and compute the numerical integration using a step size of h = ̄̄̄̄/2. What is the absolute value of the approximation error?
(ii) Write out the Trapezoidal rule and compute the numerical integration using a step size of h = ̄̄̄̄/4. What is the absolute value of the approximation error?
(iii) Using the Trapezoidal rule error bound, write down the predicted upper bound on the approximation error for parts (a) and (b). How do they compare with the actual errors?
(Note: To read more about why this is the case, search online for "The Euler-Maclaurin Summation Formula" and note the special form of the terms in its sum.)