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
 A: My first guess would be to use the Euler-Maclaurin summation formula (Wikipedia article). This proves, amongst other things, that the error goes down exponentially if the integrand is a periodic function on [0,1].
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?
