# Solving Indefinite Integrals with U-Substitution

My book gave the following problem: $$\int\frac{\ln(x)}x \text{ dx}$$ It seems to be a simple u-substitution problem, but I had a slight difficulty:
I set $$u=\ln(x)$$. Then, I had $$\int\frac{u}x \text{ dx}$$ I took the derivative of ln($$x$$) which is $$\frac1x$$. Then, I got dx = $$x$$ du. If I plug this in, I still have an $$x$$ in my integral. Where did I go wrong?

• No, if you plug $dx=xdu$ into your integral $\int\frac uxdx$ you'll get $\int udu$, so no $x$ left. Jul 24 '19 at 14:07
• The $x$'s cancel each other out
– Burt
Jul 24 '19 at 14:10
• Another way of thinking about it is: $$u = \ln(x) \Longrightarrow du = \dfrac{dx}{x}$$ So, when substituting: $$\int \underbrace{\left( \ln(x)\right)}_{u} \underbrace{\left(\dfrac{dx}{x} \right) }_{du} = \int udu$$ Jul 24 '19 at 14:11

You have $$du = \frac{dx}x$$, so the integral becomes $$\int \frac{\ln(x)}{x} \, dx = \int u \, du.$$
If $$u=\ln x$$, then $$e^u=x$$. So $$\frac{\ln x}{x}$$ becomes $$\frac u{e^u}$$ and, since $$x=e^u$$, $$\mathrm dx$$ becomes $$e^u\,\mathrm du$$.
Using $$t=\ln(x)$$ then $$dt=\frac{1}{x}dx$$ then we get $$\int tdt=\frac{t^2}{2}+C$$