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.

While this problem is also doable with complex integration, I would like to show a method that requires fairly standard integration and some patience, since you also included a tag "integration". First observe that the area under the curve does not change if you replace the sine with a cosine.
Due to symmetry, we have $2\int_0^{\pi} \frac{dx}{3+\sin(x)}$, subbing $x=2t$, we get $4\int_0^{0.5\pi} \frac{dt}{3+\cos(2t)}$=$4\int_0^{0.5\pi} \frac{dt}{3+\cos^2t-1}$=$4\int_0^{0.5\pi} \frac{dt}{2+2\cos^2t}$=$2\int_0^{0.5\pi} \frac{dt}{1+\cos^2t}$=$2\int_0^{0.5\pi} \frac{sec^2t}{sec^2t+1}dt$=$2\int_0^{0.5\pi} \frac{sec^2t}{2+tan^2t}dt$, now set $tant=v$ to get: $2\int_0^{\infty} \frac{1}{2+v^2}dv$ . This is of course standard from which you get $\frac{\pi}{\sqrt{2}}$
