Why is $\int 2\sin(x)\cos(x)\,dx ≠ 2\int \sin(x)\cos(x)\,dx$ I calculated the following results:
$\int 2\sin(x)\cos(x)\,dx = -\frac{1}{2} \cos(2x) + C_1$
$2\int \sin(x)\cos(x)\,dx = -\cos^2(x) + C_2$
Why is it not possible to move the constant $2$ outside? Which of the following three steps violates a rule I'm not aware of?
\begin{align}
\int 2\sin(x)\cos(x)\,dx
&= \int (\sin(x)\cos(x) + \sin(x)\cos(x))\,dx \\
&= \int \sin(x)\cos(x)\,dx + \int \sin(x)\cos(x)\,dx\\
&= 2\int \sin(x)\cos(x)\,dx
\end{align}
 A: Just see it!
$$-\frac{1}{2}cos(2x) = -\frac{1}{2}(cos^2(x) - sin^2(x))$$
$$-\frac{1}{2}(cos^2(x) - 1 + cos^2(x)) = -cos^2(x) + K  $$
It is just the job to adjust the constant $K$, so the calculus is correct!
A: Your two integrals are the same actually. Use double angle formula to check. Include an arbitrary constant so that you can absorb the constants into it. I will post the full working after a while if you still can't get it.
A: You can use the formula: $2\cos^2\theta-1=\cos(2\theta)$ to see that after you add the integration constant those 2 are equal.

I don't remember how to prove that formula​ using only basic rules of trigonometry so I won't include that proof but If you know a little about complex numbers there is an easy way to prove that formula, ignore that part if you don't know about complex numbers and you don't want confusion:
${e^{i\theta}}^2=\\(1):\,(\cos \theta+i\sin\theta)^2=\cos^2\theta+2i\cos\theta\sin\theta-\sin^2\theta\\(2):\,e^{i2\theta}=\cos(2\theta)+i\sin(2\theta)$
$$(1)=(2)\implies\\\cos^2\theta-\sin^2\theta=\cos(2\theta)\implies\\\cos^2\theta-\sin^2\theta-\cos^2\theta=\cos(2\theta)-\cos^2\theta\implies\\\cos^2\theta-1=\cos(2\theta)-\cos^2\theta\implies\\2\cos^2\theta-1=\cos(2\theta)$$
