# Thread: error for composite trapezoidal rule

1. ## error for composite trapezoidal rule

Suppose the tradpezoidal rule $\displaystyle \int$from a to b = ((b-a)/2)(f(a)+f(b))-(((b-a)^3)/12) f"($\displaystyle \eta$) for f$\displaystyle \in$$\displaystyle C^2, \displaystyle \eta$$\displaystyle \in$[a,b]. Derive the error estimate for the composite trapezoidal rule with equal spaced: $\displaystyle \int$from a to b f(x)dx= (h/2)[f(a)+f(b)+2$\displaystyle \sum$ for i=1 to N-1 f($\displaystyle x_i$)-((b-a)/12)$\displaystyle h^2$f"($\displaystyle \xi$) where h= (b-a)/N, $\displaystyle x_i$=a+ih, $\displaystyle \xi$$\displaystyle \in$[a,b]. I hope some one can help more or at least lead me in some sort of direction because I thought that the error for comp. trap. rule was ((b-a)/12)$\displaystyle h^2$f"($\displaystyle \xi$) so I'm not sure at all of what to do in this problem. Thank you

2. Have you learned Peano Kernel? Otherwise, you can look at the Taylor Series for f(a) and f(b) and then the taylor series for each one of those functions in the summation. This is tedious, but I can't think of another way.

EDIT: Ah! Never mind. Consider the integral $\displaystyle \int_a^b\! f(x)\, dx$. This can be rewritten as
$\displaystyle \int_a^b\! f(x)\, dx = \sum_{i=0}^{N-1}\int_{x_i}^{x_{i+1}}\! f(x)\, dx$.
Now apply the trapezoidal rule (with error) to each integral...