# Why $\int 2 \cdot \frac{\ln(x)}{x} dx$ is $\ln(x)^2 + C$?

Why the integral of $2 \cdot \frac{\ln(x)}{x}$ is $\ln(x)^2 + C$ (where $C$ is of course a constant) ?

After some years of my high school math classes, I am again doing derivatives and integrals, but I am confused again.

I am not seeing why exactly the integral of $\int{2 \cdot \frac{\ln(x)}{x}} dx$ is $\ln(x)^2 + C$. Apparently, it has used the chain rule, which should be (if I am not wrong) the rule for deriving composition of functions, but I am not seeing where and how the chain rule can be applied backwards to find the anti derivative.

• if you are interested in another way of proving: set $x=e^2y$ – tired May 17 '15 at 15:49

Let $f(x)=x^2$ and $g(x)=\ln(x)$. Then this is $f(g(x))$. So the derivative is $f'(g(x))g'(x)$ which is $2(\ln(x))\cdot\frac{1}{x}$.

• Yes, this shows that it is the correct solution, but what about if I have to find it, how would you reason to find the integral? – nbro May 17 '15 at 14:04
• You do a substitution of variables $u=\ln(x)$. Then $du=\frac1xdx$. Do you know how to do substitution of variables? The reverse operation of the chain rule in differentiation is substitution of variables in integration. – Gregory Grant May 17 '15 at 14:06
• Sorry, I don't remember anymore, why if you do $u = ln(x)$, then you have $du = \frac{1}{x}dx$? – nbro May 17 '15 at 14:12
• @Xenomorph Because the derivative of $\ln(x)$ is $\frac1x$. That's one of the basic derivatives you should memorize. – Gregory Grant May 17 '15 at 14:15
• That notation you can just think of as a convenience for keeping track of the bookkeeping of changing variables. You should read up on the general process of change of variables in your calculus book and look at the examples. You'll see after a few examples how it works. The trick is to notice that the integral has two parts and one is the derivative of the other. – Gregory Grant May 17 '15 at 14:18
• Substitute $t= \ln(x)$ then you have $dt = \frac{1}{x} \ dx$

• So now your integral is $2 \int t \ dt = 2 \cdot \frac{t^2}{2} + C =(\ln{x})^{2} + C$

• Or even $\int 2t dt=t^2+C$. +1 – Demosthene May 17 '15 at 14:06

Let $u = \ln x \implies du = \frac 1x\,dx$

Then $$\int \frac{2\ln x}{x} \,dx \;\;= \;2\int u\,du \;\;= \;2\cdot\frac{u^2}{2}+C= (\ln x)^2 + C$$

Hint: $ln'(x)=\frac{1}{x}$

Now let $\omega=ln(x)$ and I think you can continue here...

or:

$I=\int2\frac{ln(x)}{x}dx=2\int\ln(x)\cdot ln'(x)dx=2ln^2(x)-I$

$\Rightarrow 2I=2ln^2(x)+C$

$\Rightarrow I=ln^2(x)+C$

$\Rightarrow \int2\frac{ln(x)}{x}dx=ln^2(x)+C$

For this equation, using the chain rule $D f(g(x)) = f'(g(x)) \cdot g'(x)$, we will let $g(x) = \ln x$ (not being squared) and $f(x) = x^2$ (which squares g(x)). $f(g(x))$ is now $\ln(x)^2$ because $f(x)$ squares $g(x)$ or $\ln x$, so knowing $f'(x)$ is $2x$ and $g'(x)$ is $\frac{1}{x}$ we may do

$$\frac{\mathrm{d} }{\mathrm{d} x} \ln(x)^2 = \frac{\mathrm{d} }{\mathrm{d} x} 2 f(g(x)) = f'(g(x)) \cdot g'(x) = 2(\ln(x))\cdot 1/x = \color{green}{2 \cdot \frac{\ln x}{x}}$$

Therefore, the integral of $2 \ln(x) / x$ is $\ln(x)^2$

Sometimes its just as easy to make an implicit substitution, and not even bother with $u$.

$$\int2\cdot\frac{\ln x}{x}dx=\int2\cdot\frac{\ln x}{x}dx\cdot\frac{\frac{d\ln x}{dx}}{\color{blue}{\frac{d\ln x}{dx}}}=\int2\cdot\frac{\ln x}{x\cdot\color{blue}{\frac{1}{x}}}d\ln x=\color{green}{\int 2\ln x d\ln x} = 2\cdot\frac{(\ln x)^2}{2}+ C=(\ln x)^2+ C$$

Note that the $\color{green}{\text{green}}$ step could be replaced with $$\color{green}{\int 2\ln x d\ln x} = \color{green}{\int 2u du} = \dots$$