# trapezoidal rule error approximation. What if f''(x)/12n^2 doesn't work?

Which method would you recommend for error estimation of the following approximation? $$\frac{1}{K} \sum_{j=0}^{K-1}\frac{cos(2\pi\frac{j}{K}u)}{P_{n}(\cos[\pi\frac{j}{K}])}\approx\int_{0}^{1}\frac{cos(2\pi xu)}{P_{n}(\cos[\pi x])}dx$$ Here $P_{n}$ some polynomial $u=1,2...K/2$

$\frac{1}{12k^2}f''(\psi)$ is a very bad estimator

-
Perhaps explain why the second derivative one is a bad estimator? – Willie Wong Jul 8 '10 at 12:39
I think the function is not smooth enough. Specially for u close to K/2. But even for u=1 the real error is a lot smaller then f''(x) – vilvarin Jul 8 '10 at 13:17
maybe I should look at it like at fourier series? – vilvarin Jul 8 '10 at 14:27
Do you have an explicit formula for the Polynomial? Or at least do you know where and to what order the roots are? – Willie Wong Jul 8 '10 at 17:21
Function $P_n(cos(\pi x))$ depends on some parameter . It can be whether convex, bounded with 0.5 and 1 (this case is more interesting for me) or concave, bounded with 1 and some A>1(depends on the parameter) – vilvarin Jul 9 '10 at 23:03

Added: After thinking about it a bit more, I'm wondering about some things. Firstly, the formula given in the question is not the trapezoidal rule (as promised in the title and suggested by the result for the error), but it is the rectangle rule which is only first order. Secondly, if the integrand has poles in [0,1] (that is, if $P_n(\cos(\pi x))=0$ for some $x\in[0,1]$), then the error estimate becomes meaningless; in this case you probably need different techniques like complex analysis to prove anything. A final remark: perhaps you can use the elementary techniques explained in: Weideman, "Numerical integration of periodic functions: a few examples", Amer. Math. Monthly 109 (2002), no. 1, 21-36 (MathSciNet).
I think I need some more background in order to have further help. In particular, do you know anything about the polynomials $P_n$, and what kind of result do you hope to get?