Integration Calculus Problem How to evaluate $$\int_{0}^{\frac{\pi}{2}}\frac{\sin^2{x}}{1+\sin^2x}dx$$
My Try:
I substituted $\displaystyle \sin^2x=\frac{(1-\cos2x)}{2}$ but it gave a complicated expression. 
Using the identity$\sin^2x+\cos^2x=1$, the integral becomes:
$$ \int_{0}^{\frac{\pi}{2}}\frac{\sin^2{x}}{1+\sin^2x}dx=\frac{\sin^2 x}{2\sin^2x+\cos^2x}dx=\frac{1}{2+\cot^2x}dx$$
I'm stuck beyond this point.
 A: Note 
$$ \int \frac{ \sin^2 x + 1 - 1}{1 + \sin^2 x } = \int dx - \int \frac{ dx }{1 + \sin^2 x} = x - \int \frac{ ( \sin^2 x + \cos^2 x ) dx }{1 + \sin^2 x} =  x - \int \frac{ \sin^2 x }{1 + \sin^2 x} - \int \frac{ \cos^2 x dx}{1 + \sin^2 x } $$
Thus, we have (now putting the limits of integration)
$$ 2 \int_0^{\pi/2} \frac{ \sin^2 x  dx }{1 + \sin^2 x} = \frac{\pi}{2} - \underbrace{ \int_0^{\pi/2} \frac{ \cos^2 x  dx }{1 + \sin^2 x} }_{I} $$
To integrate $I$, put $x = \tan t$. then $\sin x = \frac{ t }{\sqrt{1+t^2}}$, $\cos x = \frac{ 1}{ \sqrt{1+t^2}}$ and $dx = \frac{ dt }{1 + t^2}$. Thus, 
$$ I  = \int_0^{\infty} \frac{  \frac{1}{1 + t^2} \cdot \frac{ dt }{1 + t^2}  }{ 1 + \frac{ t^2 }{1+t^2}} = \int_0^{\infty} \frac{ dt }{1+2t^2} =  \frac{\sqrt{2} }{2} \tan^{-1} (\sqrt{2} t) \bigg|_0^{\infty} = \frac{ \sqrt{2} \pi }{4} $$
Therefore,
$$ \boxed{ \int\limits_0^{ \frac{ \pi }{2} } \frac{ \sin^2 x dx }{1 + \sin^2 x} = \frac{1}{2} \left( \frac{\pi}{2} - \frac{\sqrt{2} \pi }{4}  \right) } $$
A: Write it as $1-\frac {1}{1+\sin^2 (x)} $ from denominator taking $cos^2 (x) $ common integral becomes $\frac {\sec^2 (x)}{1+2\tan^2 (x)} $ now $\tan (x)=t $ thus $\sec^2 (x)dx=dt $ Note that in the conversion i have used $1+\tan^2 (x)=\sec^2 (x) $ thus now limits change to $0,\infty $ then take $2$ common from denominator to get $t^2+(1/\sqrt {2})^2$ which is integrated to $\sqrt {2}\arctan (x\sqrt {2}) $ plugging in limits we get integral as $\frac {\pi}{2\sqrt {2}} $. Also remember the fisrt part ie 1  is to be integrated 
