In my maths class we are learning about indefinite integrals, this is the problem we were working on:
$$ \int \frac{1}{2x+1}dx $$
Using u-substitution we obtain:
$$ \frac{1}{2}\ln\left | 2x+1 \right | + C $$
But why does it not work to pull out a $\frac{1}{2}$ so that we don't have to do u-substitution
$$ \frac{1}{2}\int \frac{1}{x+\frac{1}{2}}dx $$
This yields a completely different result $$ \frac{1}{2}\ln \left |x+\frac{1}{2}\right | + C_1 \neq \frac{1}{2}\ln\left | 2x+1 \right | + C_2 $$
Pulling out the $\frac{1}{2}$ seems like a completely valid move, so why does it get a completely different result?