trigonometric function integration I have this integral: $$ \int \dfrac{\sin(2x)}{1+\sin^2(x)}\,dx$$ and I need hint solving it. I tried using the trigonometric identities and let $$u=\sin(x)$$ but I got $$\int ... =\int \dfrac{2u}{1+u^2}\, du$$ which I don't know how to solve. I also tried letting $$u=tg\left(\frac{x}{2}\right)$$ but that leads to $$\int ...=\int \frac{8t(1-t^2)}{(1+t^2)(t^4+6t^2+1)} du$$ which again I can't solve. I'll be glad for help.

@Git Gud's answer is absolutely complete but there is a good point about these kinds of integral:

If you have $\int R(\sin x,\cos x)dx$ and $R(-\sin x,-\cos x)=R(\sin x,\cos x)$ then use $\tan x=t$ as a good substitution.

