usind Residue theorem prove that :
$\displaystyle \int \frac {d \theta}{ 1+ {sin^2 x}} = \sqrt 2 \pi ,,, -\pi\to \pi $
First off, I think that you mean $\displaystyle \int_{-\pi}^\pi\frac{d\theta}{1+\sin^2\theta}$.
I would suggest try using $\displaystyle u=\tan\left(\frac{\theta}{2}\right)$. I haven't tried it out yet but it usually helps. After this you should have a normal rational function which is usually easier to integrate.
The redisue theorem will only work when you are integrating over some closed positively oriented contour where the function you want to integrate is analytic inside and on the contour except at say points $\displaystyle z_{1},z_{2}\dots z_{n}$
we can then write the answer in the following way
$\displaystyle \int f(z)dz=2\pi i \sum^{n}_{j}Res(z_{j})$
Now since the function you want to integrate $\displaystyle \frac{1}{1+\sin^{2}\theta}$ is analytic everywhere the answer to your integral should be zero but there might be trick here, try decomposing the function in the following way
$\displaystyle \frac{1}{1+\sin^{2}\theta}=\frac{1}{(1+i\sin\theta )(1-i\sin\theta)}$
To do this using the residue theorem, you need to make the substitution $\displaystyle z = e^{i\theta}$. Then $\displaystyle \sin\theta = \tfrac1{2i}(z-z^{-1})$, and $\displaystyle dz = ie^{i\theta}d\theta$ so that $\displaystyle d\theta = dz/iz$. The integral becomes $\displaystyle \oint\frac1{1-\frac14(z-z^{-1})^2}\,\frac{dz}{iz}$ (integral round the unit circle), which you can evaluate by computing residues.
First, by a bit of elementary algebra, simplify the integral to $\displaystyle \oint\frac{4zi}{z^4-6z^2+1}\,dz$. Next, identify the poles inside the unit circle by factorising the denominator. It is a quadratic in $\displaystyle z^2$, with roots $\displaystyle z^2 = 3\pm2\sqrt2$. As luck would have it, $\displaystyle 3\pm2\sqrt2 =(\pm\sqrt2\pm1)^2$, so the denominator has four roots $\displaystyle z=\pm\sqrt2\pm1$.
Now for a quotient of the form $\displaystyle \frac{f(z)}{g(z)}$, the residue at a simple root $\displaystyle z_0$ of $\displaystyle g(z)$ is given by $\displaystyle \frac{f(z_0)}{g'(z_0)}$. In this case $\displaystyle f(z) = 4zi$ and $\displaystyle g(z) = z^4-6z^2+1$. So the residue at $\displaystyle z_0$ is $\displaystyle \frac{4z_0i}{4z_0^3-12z_0} = \frac i{z_0^2-3}$. The poles inside the unit circle are given by $\displaystyle z_0 = \pm(\sqrt2-1)$. For both of these, $\displaystyle z_0^2 = 3-2\sqrt2$ and so the residue is $\displaystyle \frac i{-2\sqrt2}$.
Finally, the integral is equal to $\displaystyle 2\pi i$ times the sum of the two residues, namely $\displaystyle 2\pi i\Bigl(\frac{2i}{-2\sqrt2}\Bigr) = \sqrt2\pi$.