Is it possible to calculate $\int_0^\pi\frac{dx}{2+\sin^2x}$ without residue theorem I came across the following integral:

Calculate $\int_0^\pi\frac{dx}{2+\sin^2x}$.

I know that you probably can solve it using residue theorem, but since we haven't proved it yet, I tried another approach:
I know that $\sin x=\frac{e^{ix}-e^{-ix}}{2i}$ and therefore $\sin^2x=\frac{e^{2ix}-2+e^{-2ix}}{-4}$. So the integral becomes: $$\int_0^\pi\frac{dx}{2+\frac{e^{2ix}-2+e^{-2ix}}{-4}}=-4\int_0^\pi \frac{dx}{e^{2ix}+e^{-2ix}-10}$$ Denoting by $\gamma:[0,\pi]\to\mathbb{C}$ the path $\gamma(x)=e^{2ix}$ and using change of variables $z=\gamma(x)$, we have: $$-4\int_0^\pi \frac{dx}{e^{2ix}+e^{-2ix}-10}=-4\int_\gamma\frac{1}{z+\frac{1}{z}-10}\frac{dz}{2iz}=\frac{-2}{i}\int_\gamma\frac{1}{z^2-10z+1}dz$$
But I couldn't solve the last one (I figured that I must find the zeroes of the function in the denominator and then use Cauchy's integral formula somehow).
Any help would be appreciated.

You could use a double angle identity to write $\sin^2 x = \frac 12 (1-\cos 2x)$, then apply a Weierstrass substitution. The final step will be of the form $\int \frac 1{1+t^2}dt$ which will give a simple arctangent result.
You will need a couple of linear substitutions along the way, but those are trivial.
