Definite integral evaluation by means of Fourier series Does anybody know how to compute the definite integral $\int\limits_0^{2\pi} \dfrac{x\cos{(mx)}}{1-a\cos{x}}dx$, where $|a|<1$, using Fourier series? Help is required. Thanks!
 A: For first, we need to compute:
$$ \int_{0}^{2\pi}x\cos(mx)\cos(x)^n\,dx.\tag{1}$$
Since $\cos x=\frac{e^{ix}+e^{-ix}}{2}$ we have that $\cos(x)^n$ can be written as a linear combination of $1,\cos(x),\ldots,\cos(nx)$. However,
$$ \int_{0}^{2\pi} x \cos(mx)\cos(nx)\,dx = \pi^2\cdot\delta(m,n)\tag{2}$$
hence in order to compute $(1)$ we just need to compute the coefficient of $\cos(mx)$ in the Fourier cosine series of $\cos(x)^n$.
$$\left(\frac{e^{ix}+e^{-ix}}{2}\right)^n = \frac{1}{2^n}\sum_{j=0}^{n}\binom{n}{j}e^{jix}e^{(j-n)ix}\tag{3}$$
so such a coefficient is non-zero only if $m+n$ is even, and in such a case we have:
$$\int_{0}^{2\pi}x\cos(mx)\cos^n(x)\,dx = \frac{\pi^2}{2^{n-1}}\binom{n}{\frac{n+m}{2}}.\tag{4}$$
Exploiting $(4)$ it follows that:
$$\int_{0}^{2\pi}\frac{x\cos(mx)}{1-a\cos x}\,dx=\pi^2\cdot\!\!\!\!\!\sum_{\substack{n\geq 0\\n\equiv m\!\!\pmod{\!\!2}}}\frac{a^n}{2^{n-1}}\binom{n}{\frac{n+m}{2}}.\tag{5}$$
In the basic case $m=0$, the RHS of $(5)$ equals $\frac{2\pi^2}{a\sqrt{1-a^2}}$. Hope you can finish from there.
