Why the two integrals are equal? The equality
$$\int_{0}^{2\pi}\left(-\frac{1+e^{-i\theta}}{1+\rho^{2}e^{i\theta}}\right)^{\!n}d\theta=\int_{\phi_{\rho}}^{2\pi-\phi_{\rho}}e^{in t}\frac{\sin(t/2)}{\sqrt{\rho^{2}-\cos^{2}(t/2)}}\,dt,
$$
where $\phi_{\rho}=2\arccos(\rho)$, should hold for any $\rho\in(0,1)$ and $n\in\mathbb{N}$. Can anybody see a connection between the two integrals? Can one be transformed to the other? Thanks.
 A: The identity seems to hold. The following Wolfram Language code produces some interesting results:
FirstI[rho_,n_]=Integrate[(-(1+Exp[-I Theta])/(1+rho^2 Exp[I Theta]))^n,{Theta,0,2 Pi}]
SecondI[rho_,n_]=Integrate[Exp[I n t]Sin[t/2]/Sqrt[rho^2-(Cos[t/2])^2],{t,2 ArcCos[rho],2 Pi-2 ArcCos[rho]}]
FirstI[0.5,3]//N
SecondI[0.5,3]//N
The results are $1.76715-1.33227\times 10^{-15}i$ and $1.76454-0.000624587i$, which are quite close.
[EDIT] The following analysis is incorrect, as shown in the comments. However, I will not delete it, so that the comments still have context.
As for getting the link between the two integrals, it appears, via trig-substitution-on-steroids, that the substitution you want is the following:
\begin{align*}
\cos\left(\frac{t}{2}\right)&=\underbrace{\cos\left(\frac{\phi_{\rho}}{2}\right)}_{=\,\rho}\cos\left(\frac{\theta}{2}\right),\\
\sin\left(\frac{t}{2}\right)\,dt&=\cos\left(\frac{\phi_{\rho}}{2}\right)\sin\left(\frac{\theta}{2}\right)\,d\theta.
\end{align*}
You can see that $\theta=0$ corresponds to $t=\phi_{\rho}$, and $\theta=2\pi$ corresponds to $t=2\pi-\phi_{\rho}$. So that accounts for your interval of integration. When you substitute this into the RHS integral, you get some spectacular cancellations:
$$\int_{\phi_{\rho}}^{2\pi-\phi_{\rho}}e^{in t}\,\frac{\sin(t/2)}{\sqrt{\rho^{2}-\cos^{2}(t/2)}}\,dt=\int_{0}^{2\pi}e^{int}\,\frac{\cos(\phi_{\rho}/2)\sin(\theta/2)\,d\theta}{\cos(\phi_{\rho}/2)\sin(\theta/2)}=\int_{0}^{2\pi}e^{int}\,d\theta. $$
It remains to show that
$$e^{int}=\left(-\frac{1+e^{-i\theta}}{1+\rho^2e^{i\theta}}\right)^{\!n},$$
or equivalently that
$$e^{it}=-\frac{1+e^{-i\theta}}{1+\rho^2e^{i\theta}}.$$
This doesn't seem beyond the pale. Perhaps you can finish?
