Taylor Expansion for Numerical Integration

Hey,

I'm looking for the error of the Trapezoidal method applied to the integral $\displaystyle \int_0^1 sin(\pi x) \, dx$

The actual value of this integral in $\displaystyle 2/\pi$. Applying the trapezoidal method to the integral results for a small step size $\displaystyle h$ results in: $\displaystyle h \frac{sin(\pi h)}{1 - cos(\pi h)}$. (I've checked this result and for small h, this is approximately equal to $\displaystyle 2/\pi$. (to precision above 5 decimal places in MATLAB))

So now I have to check the error of the method, which in general, for an integral $\displaystyle \int_a^b f(x) \, dx$ is $\displaystyle \epsilon(h) = h^2/12 ( f'(b) - f'(a) ) + O(h^4)$.

So I'm having trouble finding the taylor expansion of $\displaystyle h \frac{sin(\pi h)}{1 - cos(\pi h)}$, but i know the coefficent of the h^2 term should be $\displaystyle (f'(b) -f'(a))/12 = \frac{-\pi}{6} $.

Thanks!!