Two apparently different antiderivatives of $\frac{1}{2 x}$ What is right way to calculate this integral and why?

$$
\int\frac{1}{2x}\text dx
$$

I thought, that this substitution is right:
$$
t = 2x
$$
$$
\text dt = 2\text dx
$$
$$
\frac{\text dt}{2} = \text dx
$$
$$
\int\frac{1}{2x}\text dx=\int\frac{1}{t}\frac{\text dt}{2}=\frac{1}{2}\ln|2x| + C .
$$
But it's not right, because this is the correct answer:
$$
\int\frac{1}{2x}\text dx=\frac{1}{2}\int\frac{1}{x}\text dx=\frac{1}{2}\ln|x| + C .
$$
Can someone explain me, why is the first way wrong? When I derive both results, I get the same result.
 A: You are correct.  
Since $\ln|2x|=\ln|x|+\ln 2$
$$
\int \frac{1}{2x} \ dx = \ln|2x| + C_1 =  \ln|x| + \overset{\text{New Const}}{\overbrace{\ln 2 +  C_1}} = \ln|x| + C
$$
A: Both answers are the same up to an additive constant (they differ in their choices of $C$).
This is because of two laws: $$|ab| = |a|~|b|$$ and $$\ln(a b) = \ln a + \ln b$$hence,$$\ln |2x| = \ln (2~ |x|) = \ln 2 + \ln |x|.$$So one of them just has an extra $\frac 1 2 \ln 2$ living in the arbitrary additive constant, and that's why you get the same derivative for both of them.
A: The two answers actually agree, that is, the first calculation really does produce an antiderivative of $\frac{1}{2 x}$ as expected, at least provided we interpret $C$ to be a general constant in both cases.
Expanding the first antiderivative gives
$$\frac{1}{2} \ln |2x| + C = \frac{1}{2} (\log |x| + \log 2) + C = \frac{1}{2} \log |x| + \left(C + \frac{1}{2} \log 2\right).$$
So, if we denote $C' := C + \frac{1}{2} \log 2$, this antiderivative is
$$\frac{1}{2} \ln |x| + C',$$
which (again, regarded as a family of functions, all equal up to an over constant) coincides with the second antiderivative.
This exemplifies the statement that an antiderivative of a given function is unique up to addition of an overall constant. (Actually, this only need be true when the domain of the function is connected, which in particular is not the case for the given integrand, but this isn't essential to the question at hand.)
A: Note that in most cases, a good practice is to factor out the constants in front of the integral. Except for the case when the constant is zero, then the integral is also zero. 
A: The difference is the constant $+C$:
$$\ln(2x)=\ln(x)+\ln(2)$$
In other words, both methods and both answers are correct.
A: Both answers are correct, because $(\frac{1}{2}\cdot \ln(2x))'=\frac{1}{2}\cdot \frac{2}{2x}=\frac{1}{2x}=(\frac{1}{2}\cdot ln(x))'$ 
