How to solve $\int_0^{2\pi} \frac{dt}{3+\sin(t)}$? Got stuck with the integral.
I rewrote it as $$I=\int_0^{2\pi} \frac{2idt}{6i+e^{it}-e^{-it}},$$
then I took $z:=e^{it}\implies dz=ie^{it}dt\implies dt = -\frac{idz}{z}$, so I'd get:
$$\int_\gamma \frac{2dz}{6i+z-\frac{1}{z}}=\int_\gamma \frac{2zdz}{6iz+z^2-1}.$$
It can be observed that $-i(2\sqrt{2}\pm 3)$ are the singular points of the integrand.
Then the residues are $\pm \frac{i}{4\sqrt{2}}$. And the integral would become:
$$ I=0 $$
as per the Cauchy Residue Theorem.
Where am I mistaken? Appreciate your input.

You did almost right. You have to use just the pole inside the unit circle:
$$\int_0^{2\pi} \frac{dt}{3+\sin(t)}=\int_{|z|=1} \frac{2dz}{z^2+6iz-1}=2\pi i\cdot  \mbox{Res}\left (\frac{2}{z^2+6iz-1},i(2\sqrt{2}- 3)\right)=\frac{\pi}{\sqrt{2}}$$
