Solving a first order linear differential equation Find all functions $f (x) $ defined on $(-\frac {\pi }{2},\frac {\pi}{2}) $ which has a primitive $F(x)$ such that
$$f (x)+\cos (x) F (x)=\frac {\sin (2x)}{(1+\sin(x))^2}.$$ 
Hence $F$ satisfies a first order linear  differential equation in $F$ with integrating factor $e^{\sin (x)} $. 
So I have to integrate 
$$\frac {2e^{\sin (x)} \sin (x) \cos (x)}{(1+\sin (x))^2}.$$ 
By putting $t=\sin (x) $, it reduces to $\frac {t e^t}{(1+t^2)}$ but now I am not getting it. Any hints. Thanks!

Note that you have to integrate
$\frac {te^t}{(1+t)^2}$ which yields $\frac {e^t}{(1+t)}$.
Hence we obtain
$$F(x)=\frac{2}{1+\sin(x)}+Ce^{-\sin(x)}$$
and $f(x)=F'(x)$.
