# Evaluation of $\int\limits_{0}^{2\pi}\frac{a\cos x -1}{(a^2+1-2a\cos x)^{3/2}}dx.$

$$\int\limits_{0}^{2\pi}\frac{a \cos x -1}{(a^2+1-2a \cos x)^{3/2}}dx = 2\int\limits_{0}^{\pi}\frac{a \cos x -1}{(a^2+1-2a\cos x)^{3/2}}dx.$$

If a<1, this integral doesn't converge. How to evaluate it for any other a? I think it can be expressed as elliptic integral $I(a^2)$ or calculated using series, but stuck using both ways.

Note that $$I\left(a\right)=2\int_{0}^{\pi}\frac{a\cos\left(x\right)-1}{\left(a^{2}+1-2a\cos\left(x\right)\right)^{3/2}}dx$$ $$=\frac{d}{da}\left(-2a\int_{0}^{\pi}\frac{1}{\sqrt{a^{2}+1-2a\cos\left(x\right)}}dx\right)$$ and, since $a>1$, $$\int_{0}^{\pi}\frac{1}{\sqrt{\left(a+1\right)^{2}-2a-2a\cos\left(x\right)}}dx=\int_{0}^{\pi}\frac{1}{\sqrt{\left(a+1\right)^{2}-2a\left(1+\cos\left(x\right)\right)}}dx$$ $$\stackrel{x=2u}{=}\int_{0}^{\pi/2}\frac{1}{\sqrt{\left(a+1\right)^{2}-2a\left(1+\cos\left(2u\right)\right)}}du=\frac{2}{a+1}\int_{0}^{\pi/2}\frac{1}{\sqrt{1-\frac{4a}{\left(a+1\right)^{2}}\cos^{2}\left(u\right)}}du$$ $$\stackrel{u\rightarrow\pi/2-u}{=}\frac{2}{a+1}\int_{0}^{\pi/2}\frac{1}{\sqrt{1-\frac{4a}{\left(a+1\right)^{2}}\sin^{2}\left(u\right)}}du =\frac{2}{a+1}K\left(\frac{4a}{\left(a+1\right)^{2}}\right)$$ where $K(z)$ is the complete elliptic integral of the first kind. Hence we have $$I\left(a\right)=\frac{d}{da}\left(\frac{-4a}{a+1}K\left(\frac{4a}{\left(a+1\right)^{2}}\right)\right)=\color{red}{\frac{2\left((a+1)E\left(\frac{4a}{\left(a+1\right)^{2}}\right)-\left(a-1\right)K\left(\frac{4a}{\left(a+1\right)^{2}}\right)\right)}{a^{2}-1}}$$ for $a>1,$ where $E(z)$ is complete elliptic integral of the second kind.
• It looks good, but as far as I can see from WA output (for some particular values of a) it can be expressed as $A\cdot E(t)+B\cdot K(t)$ where $E$ is second kind of complete elliptic integral. But i think i can evaluate the deriviative that way(not sure). Nov 13 '16 at 4:02
• Just I need to be able to calculate $I(a)$ as some real number(numerically). Nov 13 '16 at 4:09
• @EzWin Indeed, the derivative of $K(z)$ is a combination of $K(z)$ and $E(z)$. See functions.wolfram.com/EllipticIntegrals/EllipticK/20/01 Nov 13 '16 at 9:05