# Why is the integral of $0.5/x = 1/2 \ln x$ and not $1/2 \ln 2x$?

When you calculate $\int\frac{1}{2x}dx$ you get $\frac{1}{2}\ln(x)$ and when you calculate $\int\frac{1}{2x}dx$ you don't get $\frac{1}{2}\ln(2x)$.

$\frac{1}{2x}$ is the same as $\frac{1}{2x}$

why do you get different answers?

-
" $\frac{1}{2x}$ is the same as $\frac{1}{2x}$ ". And $\frac{1}{2} \ln (x) \$ is the same as $\frac{1}{2} \ln (2x) \ ,$ with a "vertical shift" when you graph the two functions. When we calculate indefinite integrals, we are not finding a single function, but an entire "family" of functions which differ only by a constant; so, they all have the same derivative function. That is the meaning of the arbitrary constant, as the posters are describing in their answers. – RecklessReckoner Mar 28 '14 at 13:18

$$\frac{1}{2}\ln(2x) = \frac{1}{2}(\ln 2 + \ln x) = \frac{\ln2}{2} + \frac12\ln x$$

When you integrate $$\frac{\frac12}{x},$$ you get $\frac12 \ln x + C$ ($C$ is the constant you are always nagged about!), not just $\frac12\ln x$

-
+1. Never forget the constant of integration when doing indefinite integrals. – Arthur Mar 28 '14 at 12:59
Questions like this are very good in my oppinion, as they really show that the $+C$ is not just for show. – 5xum Mar 28 '14 at 12:59
(+1) Good answer. – Thomas Mar 28 '14 at 13:11

I think that @5xum has already said it, but to make it super clear:

The integral of $1 / (2x)$ is not equal to $\frac{1}{2}\ln(x)$ or $\frac{1}{2}\ln(2x)$. you have $$\int \frac{1}{2x} \; dx = \frac{1}{2}\ln(x) + C.$$ As noted in the other answer and in the comments, this $+C$ isn't just a pretty thing. It is very important because without it, the answer is wrong. The example that you have given shows exactly why it is important. So you have, for example, $$\int \frac{1}{2x} \; dx = \frac{1}{2}\ln(x) + C_1 = \frac{1}{2}\ln(2x) + C_2$$ where $C_1$ and $C_2$ are different constants. The reason that this is true is because of the definition. Remember that we say that $$\int f(x)\; dx = F(x) + C$$ exactly when $F'(x) = f(x)$. And indeed you have that \begin{align*} \frac{d}{dx} \frac{1}{2}\ln(x) = \frac{d}{dx} \frac{1}{2}\ln(2x) = \frac{1}{2x}. \end{align*}

-
It's not so much that the answer is "wrong", as that the result is incomplete. An indefinite integral produces an infinite set of anti-derivative functions, all having the same derivative function, which is the integrand. – RecklessReckoner Mar 28 '14 at 13:24
already accepted answer but this is great :) +1 – Yusaf Mar 28 '14 at 13:34