Evaluating $\int_{0}^{2 \pi} \frac{\sin \phi}{(\sin\theta-\sin\phi)^2+2a(1-\cos(\theta -\phi))} d\phi$ How Can I evaluate this integral ? $$\int_{0}^{2 \pi} \frac{\sin\phi}{(\sin\theta-\sin\phi)^2+2a(1-\cos(\theta -\phi))} d\phi$$
I have tried to write the denominator as
$$\sin( (\theta-\phi)/2 )[2\cos((\theta+\phi)/2)+4a\sin((\theta-\phi)/2)]$$
And writing the numerator as $$\sin(\phi)=2\sin((\phi-\theta)/2)\cos((\phi - \theta)/2)\cos(\theta)+\sin(\theta)(1-2\sin^2((\phi-\theta)/2)$$
Where $$\theta , \phi \in[0,2 \pi]$$
 A: Here $\theta=t$, $\phi=x$. Your integral is 
$$q(a,t)=\int_0^{2\pi}\frac{\sin x}{(\sin t-\sin x)^2+2a(1-\cos(t-x))}dx$$
Note that 
$$\sin\alpha-\sin\beta=2\sin\left(\frac{\alpha-\beta}2\right)\cos\left(\frac{\alpha+\beta}2\right)$$
and $$1-\cos(\alpha-\beta)=2\sin^2\left(\frac{\alpha-\beta}2\right)$$
So we have 
$$\begin{align}
q(a,t)=&\frac14\int_0^{2\pi}\frac{\sin x}{\sin^2(\frac{t-x}2)(2a+\cos^2(\frac{t-x}2))}dx\\
=&\frac14\int_0^{2\pi}\frac{\sin x}{\sin^2(\frac{x}2-\frac{t}2)\cos^2(\frac{x}2-\frac{t}2)+2a\sin^2(\frac{x}2-\frac{t}2)}dx\\
\overset{2u=x-t}=&\frac12\int_{-t/2}^{\pi-t/2}\frac{\sin(2u+t)}{\sin^2(u)\cos^2(u)+2a\sin^2(u)}du\\
=&\frac12\int_{-t/2}^{\pi-t/2}\frac{c\sin(2u)+s\cos(2u)}{\cos^2(u)\sin^2(u)+2a\sin^2(u)}du\\
=&-\frac12\int_{-t/2}^{\pi-t/2}\sec^2(u)\frac{s\tan^2(u)-2c\tan(u)-s}{\tan^2(u)(2a\tan^2(u)+2a+1)}du\\
\overset{x=\tan(u)}=&-\frac12\int_{x_1}^{x_2}\frac{sx^2-2cx-s}{x^2(2ax^2+2a+1)}dx
\end{align}$$
Where $s=\sin(t)$, $c=\cos(t)$, $x_1=\arctan(-t/2)$, and $x_2=\arctan(\pi-t/2)$. At this point we preform partial fractions to get
$$q(a,t)=-\frac1{2(2a+1)}\left[\int_{x_1}^{x_2}\frac{4acx+(4a+1)s}{2ax^2+2a+1}dx-2c\int_{x_1}^{x_2}\frac{dx}{x}-s\int_{x_1}^{x_2}\frac{dx}{x^2}\right]$$
Can you take it from here?
(12/9/19) Addendum:
I finally got around to the full simplification. It is horrible. 
We have 
$$\begin{align}
-2(2a+1)q(a,t)&=2\cos(t)\left[\ln\left|\frac{\arctan(t/2)}{\arctan(\pi-t/2)}\right|+2\ln\left|\frac{\arctan^2(\pi-t/2)+1+\frac1{2a}}{\arctan^2(t/2)+1+\frac1{2a}}\right|\right]\\
&+\frac{\sin(t)}{\arctan(\pi-t/2)}+\frac{\sin(t)}{\arctan(t/2)}\\
&+\frac{2\sqrt{2}}{\sqrt{a(2a+1)}}\arctan\left(\arctan(\pi-t/2)\sqrt{\frac{2a}{2a+1}}\right)\\
&+\frac{2\sqrt{2}}{\sqrt{a(2a+1)}}\arctan\left(\arctan(t/2)\sqrt{\frac{2a}{2a+1}}\right).
\end{align}$$
Which begs the question: How on Earth did you come up with this integral??
