<s>[INST] Integrate $\int \frac {\sin (2x)}{(\sin x+\cos x)^2}\,dx$ Integrate 
$$\int \frac {\sin (2x)}{(\sin x+\cos x)^2} \,dx$$
My Attempt:
$$=\int \frac {\sin (2x)}{(\sin x + \cos x)^2} \,dx$$
$$=\int \frac {2\sin x \cos x}{(\sin x+ \cos x)^2} \,dx$$
Dividing the numerator and denominator by $\cos^2 x$
$$=\int \frac {2\tan x}{(1+\tan x)^2} \,dx$$
 [/INST] Note that
$$\begin{align}
\int \frac {\sin (2x)}{(\sin(x)+\cos(x))^2} dx
&=\int \frac {2\sin(x)\cos(x)}{\cos^2(x)(1+\tan(x))^2} dx\\
&=\int\frac {2\tan(x)}{(1+\tan(x))^2} dx\\
&=\int\left(1-\frac {1+\tan^2(x)}{(1+\tan(x))^2}\right) dx\\
&=x+\frac{1}{1+\tan(x)}+c.
\end{align}$$
</s>