Integral with constant u-substitution

This is a simple integral.

$$ \int \frac{1}{3x}dx $$

with an equally simple solution of

$$ \frac{1}{3}\ln|x| +c $$

My question is that if you chose to use u-substitution and used u = 3x, the solution appears to work out as follow:

$$ \int \frac{1}{u} \frac {du}{3} $$ $$ \frac{1}{3} \ln|3x|+c $$

which seems correct as well. Is this in fact correct? The 2 graphs appear nothing alike.


Solution 1:

It's the same since you have a constant of integration.. $$ \frac{1}{3} \ln|3x|+c= \frac 13\ln |x|+ \underbrace{\frac{1}{3} \ln|3|+c}_{ \text { is a constant } }=\frac{1}{3} \ln|x|+K$$

Solution 2:

Hint: use that $$\ln(3x)=\ln(3)+\ln(x)$$

Solution 3:

If you choose the substitution $u=3x\implies du=3\,dx$, then $$\int\frac{dx}{3x}=\int\frac{3\,dx}{3\cdot3x}=\frac13\int\frac{du}{3u}=\frac13\ln|3u|+C=\frac13\ln3+\frac13\ln|u|+C=\color{red}{\frac13\ln|u|+C_1}$$ where $C_1=\frac13\ln3+C$ is another constant.