I need to evaluate
$$\int_0^{2\pi}\frac{d\theta}{a+\sin^2\theta}.$$
I immediately noticed how this is an integral of the form $\int_0^{2\pi} f(\cos(\theta),\sin(\theta))d\theta$. I first tried to choose a closed contour in $\mathbb C$ and a related integrand such that $z(\theta) = e^{i\theta}$ with $0<\theta<2\pi$, but I am not really sure how to proceed with the function
$$h(\theta) = a + \sin^2\theta$$
so that I can evaluate such a closed contour with the Residue Theorem for the contour integral.
Hint: Use the so-called Weierstrass substitution: $$\sin(x)=\frac{2t}{1+t^2}$$ and $$dx=\frac{2dt}{1+t^2}$$