Complex integral $\int^{2\pi}_0 e^{i\tan^{-1}\frac{r\sin(t-t_0)}{1+r\cos(t-t_0)}-i\tan^{-1}\frac{1-r \cos( t-t_0)}{r\sin(t-t_0)}}dt$ Is there a way to evaluate the following integral by simplifying the exponent?
$$\int^{2\pi}_0 \exp \left(i\tan^{-1}\frac{r\sin(\phi-\phi_0)}{1+r\cos(\phi-\phi_0)}-i\tan^{-1}\frac{1-r \cos( \phi-\phi_0)}{r\sin(\phi-\phi_0)}\right) \, d\phi$$
where $r$ and $\phi_0$ are constants.
 A: It doesn't seem pretty friendly. However one may start with the commutation of the arctangent into logarithm:
$$\arctan(x) = \frac{i}{2}\left(\ln(1 - ix) - \ln(1 + ix)\right)$$
Yet a similar method I don't know if will simplify the integral. Consider that, for the first exponential arctangent, thou hast
$$\frac{1}{2} i \left(\log \left(\frac{2 e^{i A} \left(e^{i A} r+e^{i \phi }\right)}{e^{2 i A} r+2 e^{i (A+\phi )}+r e^{2 i \phi }}\right)-\log \left(\frac{2 e^{i \phi } \left(e^{i A}+r e^{i \phi }\right)}{e^{2 i A} r+2 e^{i (A+\phi )}+r e^{2 i \phi }}\right)\right)$$
Where I called $A = \phi_{\xi}$ for simplicity.
Then the exponential of a logarithm will turn it directly into the argument of the latter. Taking again only the first arctangent term, we end up with 
$$\large e^{i\left(\frac{1}{2} i \left(\log \left(\frac{2 e^{i A} \left(e^{i A} r+e^{i \phi }\right)}{e^{2 i A} r+2 e^{i (A+\phi )}+r e^{2 i \phi }}\right)-\log \left(\frac{2 e^{i \phi } \left(e^{i A}+r e^{i \phi }\right)}{e^{2 i A} r+2 e^{i (A+\phi )}+r e^{2 i \phi }}\right)\right)\right)}$$
That is
$$\large e^{\left(-\frac{1}{2}\left(\log \left(\frac{2 e^{i A} \left(e^{i A} r+e^{i \phi }\right)}{e^{2 i A} r+2 e^{i (A+\phi )}+r e^{2 i \phi }}\right)-\log \left(\frac{2 e^{i \phi } \left(e^{i A}+r e^{i \phi }\right)}{e^{2 i A} r+2 e^{i (A+\phi )}+r e^{2 i \phi }}\right)\right)\right)}$$
Which can be split into two exponentials if you prefer, and in the end into the two arguments:
$$ \left(\frac{2 e^{i A} \left(e^{i A} r+e^{i \phi }\right)}{e^{2 i A} r+2 e^{i (A+\phi )}+r e^{2 i \phi }}\right)^{-1/2}\cdot \left(\frac{2 e^{i \phi } \left(e^{i A}+r e^{i \phi }\right)}{e^{2 i A} r+2 e^{i (A+\phi )}+r e^{2 i \phi }}\right)^{1/2} $$
NOTE
Those two terms represent ONLY the first arctangent terms into the initial exponential! You may try to convert also the other one, which will produce two terms like these, which will be multiplied by them.
A: Proceed as follows\begin{align}
&\int^{2\pi}_0 \exp \left(i\tan^{-1}\frac{r\sin(\varphi-\varphi_0)}{1+r\cos(\varphi-\varphi_0)}-i\tan^{-1}\frac{1-r \cos( \varphi-\varphi_0)}{r\sin(\varphi-\varphi_{0})}\right) \, d\varphi\\
=& \int^{2\pi}_0 \exp \left(i\tan^{-1}\frac{r\sin\varphi}{1+r\cos\varphi}-i\tan^{-1}\frac{1-r \cos\varphi}{r\sin\varphi}\right) \, d\varphi\\
=& \int^{2\pi}_0 \exp \left(i\tan^{-1}\frac{r^2-1}{2r\sin\varphi}\right) \, d\varphi
 =\int^{2\pi}_0 \cos\left(\tan^{-1}\frac{r^2-1}{2r\sin\varphi}\right) \, d\varphi\\
=& \int_0^{\frac\pi2}\frac{8r\sin \varphi}{\sqrt{(r^2+1)^2-4r^2\cos^2\varphi}}d\varphi=4\sin^{-1}\frac{2r}{r^2+1}
\end{align}
where $\cos\>(\tan^{-1}x)= \frac1{\sqrt{1+x^2}}$ is recognized.
A: $$
\arctan u + \arctan v = \arctan \frac{u+v}{1-uv} \tag 1
$$
\begin{align}
& \arctan \frac A {1+B} - \arctan\frac{1-B} A = \arctan \frac{\frac A{1+B} - \frac{1-B} A}{1 + \frac{A(1-B)}{A(1+B)}} \\[10pt]
= {} & \arctan\frac{A^2 - (1-B^2)}{A(1+B) + A(1-B)} = \arctan \frac{A^2+B^2 - 1}{2A}
\end{align}
In your case $A^2+B^2 = r^2$ and $2A = 2r\sin(\varphi - \varphi_\xi).$
But you need to think through the question of when $(1)$ holds, since "arctan" is multiple-valued unless the domain of the tangent function is restricted.
