# Thread: error for composite trapezoidal rule

1. ## error for composite trapezoidal rule

Suppose the tradpezoidal rule $\int$from a to b = ((b-a)/2)(f(a)+f(b))-(((b-a)^3)/12) f"( $\eta$) for f $\in$ $C^2$, $\eta$ $\in$[a,b]. Derive the error estimate for the composite trapezoidal rule with equal spaced: $\int$from a to b f(x)dx= (h/2)[f(a)+f(b)+2 $\sum$ for i=1 to N-1 f( $x_i$)-((b-a)/12) $h^2$f"( $\xi$) where h= (b-a)/N, $x_i$=a+ih, $\xi$ $\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) $h^2$f"( $\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 $\int_a^b\! f(x)\, dx$. This can be rewritten as
$\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...