Find $ \int \frac{\sin^2x}{1+\sin^2x}\hspace{1mm}\mathrm{d}x$ Find $$\int \dfrac{\sin^2x}{1+\sin^2x}\hspace{1mm}\mathrm{d}x$$
I cannot figure out how start this problem, can anyone explain  
 A: $$\frac{\sin^2x}{1+\sin^2x}=1-\frac1{1+\sin^2x}=1-\frac{\sec^2x}{2\tan^2x+1}$$
Set $\tan x=u$

Alternatively,
$$\frac{\sin^2x}{1+\sin^2x}=\frac{\tan^2x}{\sec^2x+\tan^2x}$$
$$=\frac{\tan^2x\sec^2x}{(\sec^2x+\tan^2x)\sec^2x}=\frac{\tan^2x\sec^2x}{(\tan^2x+1+\tan^2x)(\tan^2x+1)}$$
Set $\tan x=u$  to find $$\int\frac{\sin^2x}{1+\sin^2x}dx=\int\frac{u^2du}{(2u^2+1)(1+u^2)}$$
$$\frac{u^2}{(2u^2+1)(1+u^2)}=\frac{(2u^2+1)-(1+u^2)}{(2u^2+1)(1+u^2)}$$
A: Hints;
Write as $$\int \frac{\csc^2(x)}{\csc^4(x)+\csc^2(x)} \mathrm{d}x = \int \frac{\csc^2(x)}{2+3\cot^2(x)+\cot^4(x)} \mathrm{d}x$$
Then substitute $u=\cot(x)$. It is easy from there.
A: $$
\begin{aligned}
\int\frac{\sin^2 x}{1 + \sin^2 x}\,\mathrm{d}x&=\int\frac{1+\sin^2x - 1}{1+\sin^2 x}\,\mathrm{d}x\\
&=x - \int\frac{\mathrm{d}x}{1+\sin^2 x}\\
&=x+\int\frac{-\csc^2 x}{\csc^2 x + 1}\,\mathrm{d}x\\
&=x+\underbrace{\int\frac{-\csc^2 x}{2+\cot^2 x}\,\mathrm{d}x}_{t=\cot x\implies\mathrm{d}t=-\csc^2x\,\mathrm{d}x}\\
&=x+\int\frac{\mathrm{d}t}{2+t^2}\\
&=x+\frac{1}{\sqrt{2}}\arctan\!\left(\frac{t}{\sqrt{2}}\right)+C\\
&=x+\frac{1}{\sqrt{2}}\arctan\!\left(\frac{\cot x}{\sqrt{2}}\right)+C.
\end{aligned}
$$
