# Evaluating $\int_0^{2 \pi} (A+\cos(x))^c (A-\cos(x))^{-c} d x$

Can anybody help me with the values of the following integrals

$\int\limits_0^{2 \pi} (A+\cos(x))^c (A-\cos(x))^{-c} d x$

and more general this integral

$\int\limits_0^{2 \pi} (A+\cos(x))^c (A-\cos(x))^{-c} |\sin(x)|^s d x.$

Here $A \geq 0$, $c$ non-negative, and $s$ complex. A reference to a table with integrals will also be okay.

Thanks.

-
If $|A|<1$ and $c\geq 1$ the integrals do not converge! –  Fabian May 29 '12 at 19:55
integrals in the title and body of the post are not the same. which expressions are raised to the power $c$? –  Valentin May 29 '12 at 20:35

Not sure if the table will be of much help, but perhaps the following steps could get the ball rolling: $$\int_{0}^{2\pi}\frac{\left(A+\cos x\right)^{c}}{\left(A-\cos x\right)^{c}}dx= \int_{0}^{2\pi}\frac{\left(2A+e^{ix}+e^{-ix}\right)^{c}}{\left(2A-e^{ix}-e^{-ix}\right)^{c}}dx$$ $$e^{ix}=z$$ $$ie^{ix}dx=dz$$ $$dx=-i\frac{dz}{z}$$ $$I=-i\int_{\gamma}\frac{1}{z}\left(\frac{z^{2}+2A+1}{-z^{2}+2Az-1}\right)^{c}dz$$
Roots of the denominator in brackets $$z^{2}-2Az+1=0$$ $$z_{1,2}=A\pm\sqrt{A^{2}-1}$$ So residues at these points and the rigid need to be examined. However for $c<0$ you need to keep track of the branches so the keyhole-style contour may be required