$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,
 A: Assuming the question is : $2\int_{0}^{\pi}(sin(x) + sin(x)cos(x))dx$
It is not 2$\int_{0}^{\pi} 2u. du$ on simplification.
It is  2$\int_{0}^{\pi} udx + udu$
Instead of substituting, you can just divide the integration into two and proceed as follows:
$$=2\int_{0}^{\pi}sinx .dx + \int_{0}^{\pi} sin(2x).dx $$
$$=2(-cos(x)) + \dfrac{(-cos(2x))}{2}$$ Then apply the limit from $0$ to $\pi$:
$$=2(1-(-1)) + 0$$
$$=4$$
Hope the answer is clear !
A: 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$
A: You lost the first summand there.
$$
2\int_0^\pi \sin x + \sin x \cos x\,dx
= 2\int_0^\pi \sin x\,dx + 2\int_0^\pi \sin x \cos x\,dx
$$
Now integrate both summands separately; you don't need to substitute in the first.
