<s>[INST] $2\int_0^\pi \sin x + \sin x \cos x\,dx$. Where am I going wrong? 
$2\displaystyle\int_0^\pi \sin x + \sin x \cos x\,dx$

I let $u=\sin x \implies \dfrac{du}{dx}=\cos x \implies dx=\dfrac{du}{\cos x}$
$2\displaystyle\int_{x=0}^{x=\pi} 2u\,du$
When I try to change the limits I just get 0 and 0: Lower limit $=\sin 0 = 0$, upper limit $=\sin \pi=0$
$2\left[u^2\right]^0_0 = 0$. The answer should be 4, not 0.
Thanks,
 [/INST] As $$\int_a^b f(x)dx=\int_a^b f(a+b-x)dx$$
If $f(x)=\sin x+\sin x\cos x,$
$f(\pi+0-x)=\sin(\pi+0-x)+\sin(\pi+0-x)\cos(\pi+0-x)=\sin x-\sin x\cos x$ as $\sin(\pi-x)=\sin x,\cos(\pi-x)=-\cos x$
So, $$\int_0^\pi (\sin x + \sin x \cos x)dx=\int_0^\pi (\sin x - \sin x \cos x)dx=I\text{ say}$$
So, $$2I=\int_0^\pi (\sin x + \sin x \cos x)dx+\int_0^\pi (\sin x - \sin x \cos x)dx=2 \int_0^\pi\sin xdx$$
So, $$I=\int_0^\pi\sin xdx=(-\cos x)|_0^\pi=-\cos\pi-(-\cos  0)=2$$

Alternatively, $$\int_0^\pi (\sin x + \sin x \cos x)dx=\int_0^\pi \left(\sin x +\frac{\sin2x}2\right)dx=\left(-\cos x -\frac{\cos2x}4\right)_0^\pi$$
$$=\left(\cos x +\frac{\cos2x}4\right)_\pi^0=\cos0+\frac{\cos0}4-\left(\cos\pi+\frac{\cos\pi}4\right)=1+\frac14-\left(-1+\frac14\right)=2$$
In fact, $\int_0^\pi\sin2xdx=\int_0^{2\pi}\sin ydy=(-\cos y)_0^{2\pi}=1-1=0$
</s>