# A more elegant way to do: $\int \frac{\sin^2x}{1+\sin^2x} \ dx$

So I have come across this integral:

$$I=\int \frac{\sin^2x}{1+\sin^2 x}\,\mathrm dx$$

What I did was, split the integral, then used Pythagorean identity and split up the fraction.

$$I= x - \frac{1}{2\sqrt{2}} \int \left(\frac{1}{\sqrt{2} - \cos x} + \frac{1}{\sqrt{2} + \cos x} \right) \,\mathrm dx$$

Then using the Weiserstrass Substitution ($t= \tan x/2$), but I only ever use that if its a last resort and in this case I cannot find a more elegant way to solve this integral.

Is there a more elegant/faster way to do this integral (maintaining elementary methods). I have tried to find a clever way to multiply by 1 but nothing occurs to me at this moment

Thank You.

$$\frac{\sin^2x}{1+\sin^2x}=1-\frac1{1+\sin^2x}=1-\frac{\sec^2x}{\sec^2x+\tan^2x}==1-\frac{\sec^2x}{1+2\tan^2x}$$
Put $\tan x=u$
• @Sy123, my pleasure. Using $\cos2x=1-2\sin^2x,$ $$\int \frac{\sin^2x}{1+\sin^2 x} \ dx=\int\frac{1-\cos2x}{3-\cos2x}\ dx$$ then we can use Weiserstrass Substitution $t=\tan x,$ to reach at the same destination in a longer way – lab bhattacharjee Jun 26 '13 at 10:04