I wanted to compute $\int _0 ^{2π} \frac {2e^{it}} {1+(2e^{it})^2}dt$.
Here is what I tried. $\int _0 ^{2π} \frac {2e^{it}} {1+(2e^{it})^2}dt=\frac {1} i \int _0 ^{2π} \frac{1} {1+(2e^{it})^2}2ie^{it}dt=\frac 1 i [arctan(2e^{it})]_{t=0}^{2π}=0$
However, I've been feeling a little skeptical over my assumption that $\int _0 ^{2π} \frac{1} {1+(2e^{it})^2}2ie^{it}dt=[arctan(2e^{it})]_{t=0}^{2π}$. Nevertheless, is what I've done correct? Why or why not?
Although this doesn't quite answer your question, here's a none complex way to do this. Observe \begin{align} \frac{2e^{it}}{1+4e^{2it}}= \frac{10\cos(t)}{9\sin^2(t)+25\cos^2(t)}-i\frac{6\sin(t)}{9\sin^2(t)+25\cos^2(t)} \end{align} then we see that \begin{align} \int^{2\pi}_0 \frac{10\cos(t)}{9\sin^2(t)+25\cos^2(t)}\ dt= 0 \end{align} by symmetry about $t=\pi$, and likewise for the other integral.