I have to numerically calculate many integrals similar to this:
$$\int_0^\pi \cosh{\left(\frac{a_1\cos{x}+a_2\cos{2x}+a_3\cos{3x}+\ldots}{10}\right)}\cos{jx}\cos{kx}\space dx$$ Right now I am using the trapezoidal rule with 41 integration points when $0\leq j,k\leq6$ and 201 integration points when $0\leq j,k\leq40$. Therefore, I need 41-201 function evaluations of the integrand. Are there better alternatives for my calculations to attain better or comparable accuracy with fewer function evaluations? Is Simpson's rule a better alternative? What about other formulas? The number of integration points probably can't be reduced too much because there should be points within each cycle of the cosine function specially when the wavelength is short (such as $\cos{30x}$).