# What is the indefinite integral of $\int \left(-\frac{1}{5x}\right) dx$?

Why does $$\int \left(-\frac{1}{5x}\right) dx = -\frac{1}{5}\ln(x)+c$$ and not $$-\frac{1}{5}\ln(5x)+c$$ instead?

When I differentiate both solutions I get the same answer, $$-\frac{1}{5x}$$.

Can anyone give me an explanation as to why? Thank you.

• $\int -\frac{1}{5x} dx=-\frac{1}{5}\int\frac{1}{x}dx$ Jul 18, 2020 at 14:48
• The expressions are equivalent since $\ln(x)$ and $\ln(5x)=\ln(5)+\ln(x)$ differ by a constant. Jul 18, 2020 at 14:53
• Also note that you are implicitly assuming that the domain is the positive real numbers. You need a different antiderivative for the negative real numbers. Jul 18, 2020 at 14:55

## 5 Answers

Both are correct: on one side, $$\int -\frac{1}{5x}dx = -\frac15 \int \frac{1}{x}dx = -\frac15\ln(x) + c,$$ because of the linearity of integrals $$\int af(x) dx = a\int f(x) dx$$ for every constant number $$a$$ (in particular $$a = -\frac15$$ in this case).

On the other side, you might also change variable, and set $$u = 5x$$, if you wish, but in that case $$du = 5dx$$ and therefore $$\begin{split} \int - \frac{1}{5x} dx &= - \int \frac{1}{u} \frac{du}{5} \\ &= -\frac{1}{5} \ln(u) + c’ \\ &= -\frac15\ln(5x) + c’ = -\frac15 \ln(x) - \frac15\ln(5) + c’ \end{split}$$ Since $$\ln(5x) = \ln(5) + \ln(x)$$ it’s just a metter of choosing a different constant $$c$$ or $$c’$$.

They clearly both give the same function if you differentiate, for they differ for a constant value $$\ln(5)$$ whose derivative is zero.

• Thank you, this really helped. Jul 18, 2020 at 15:37
• We need to include the absolute value sign in $\ln|x|$ since we don't know if $x>0$. Jul 19, 2020 at 3:31
• @Axion004 in which case you need also to use two constants $c$ for $x>0$ and $x<0$ as they could be different. I have assumed $x>0$, albeit implicitly, in order to show why there are two possible solutions which look different but they are the same. Jul 19, 2020 at 9:15

Well, notice that:

$$\int-\frac{1}{\text{n}x}\space\text{d}x=-\frac{1}{\text{n}}\int\frac{1}{x}\space\text{d}x=\text{C}-\frac{\ln\left|x\right|}{\text{n}}\tag1$$

• Yeah i get that but is the other way still right? I mean, I got a different answer. Jul 18, 2020 at 14:51

Both answers are equivalent.

Through the logarithm product rule,

$$-\frac15\ln(5x) + C = -\frac15(\ln(x) + \ln(5)) + C$$

Then simplifying:

$$\text{LHS} = -\frac15\ln(x) + \left( -\frac15\ln(5) + C \right)$$

Since $$C$$ is a constant, $$-\dfrac15\ln(5) + C$$ is a different constant.

Then let $$-\dfrac15\ln(5) + C = C_1$$. Then

$$\text{LHS} = -\frac15\ln(x) + C_1$$

Which is the first expression in your question.

The reason why they both have the same derivative is because they differ by a constant.

Your answer is probably not considered the best answer because it is less “simplified” than the other.

$$\bullet$$ See this $$\int -\frac{dt}{5t} = -\frac{1}{5} \int \frac{dt}{t} = -\frac{1}{5} \ln\lvert t \rvert + C$$

And also this:

$$\bullet$$ Let $$u = 5t \implies du = 5 dt$$, and the substitution makes sense as the function is bijective on the whole of $$\mathbb{R}$$.

therefore, \begin{align*} -\frac{1}{5} \int \frac{du}{u} = -\frac{1}{5} \ln\lvert u \rvert + C = -\frac{1}{5} \ln\lvert 5t \rvert + C \end{align*} Now is it fine @mikejacob ?

$$\int\frac1x\,dx=\ln\lvert x\rvert+c=\ln\lvert x\rvert+\ln a+c^\prime=\ln\lvert ax\rvert+c^\prime$$

, where $$c,c^\prime\in\mathbb R,a\in\mathbb R^+$$.