Integrate $\int \frac {\ln x}{x^2}$ by U-Substitution I've got a question regarding "improper" u-substitution integrals.
How would we solve
$\int \frac {\ln(x)}{x^2}dx$
using the u-substitution $u = \ln(x)$?
I know that it might be easier to solve it by parts instead, but just humor me, please.
Going by u-substitution, we'd get
$$\int \frac {u}{x^2}dx, u = \ln(x), du = \frac1x dx$$
That would lead us to 
$$\int (\frac 1x \bullet u)\ du$$
The issue is with the $\frac 1x$ in that integral. I'm not entirely sure how to proceed from here.
My thoughts are to go with
$$u = ln(x) => e^u = e^{\ln(x)} = x$$
then 
$$\int (\frac 1x \bullet u)\ du = \int (e^{-u} \bullet u) \ du$$
Integrating by parts
$$f = u , \ df = 1, \ g = -e^{-u}, \ dg = e^{-u}$$
$$\int (u \bullet e^{-u}) \ du = -e^{-u} \bullet u \ - \int (-e^{-u}) \ du$$
$$\int (u \bullet e^{-u}) \ du = -e^{-u} \bullet u \ + \int (e^{-u}) \ du$$
$$\int (u \bullet e^{-u}) \ du = -e^{-u} \bullet u \ - \ (e^{-u}) \ du$$
$$\int (u \bullet e^{-u}) \ du = -e^{-u} (u + 1) = -\frac {(u + 1)}{e^u}$$
Substituting $u = ln(x)$ back in,
$$-\frac {(u + 1)}{e^u} = - \frac{\ln(x) + 1}{x}$$
Does everything look right with what I did? Solving the integral by parts does get the final answer by u-substitution, but I want to make sure I'm done everything right.
Thanks a lot!
 A: I'm not sure why starting with a substitution, since you have to use integration by parts anyway.
However, you should remove $x$ altogether, otherwise you might overlook something: if $u=\ln x$, then $x=e^u$ and $dx=e^u\,du$, so you get
$$
\int \frac{u}{e^{2u}}e^u\,du=\int ue^{-u}\,du
$$
Integrating by parts,
$$
\int ue^{-u}\,du=-ue^{-u}+\int e^{-u}\,du=
-\frac{u}{e^u}-\frac{1}{e^u}+C=-\frac{1+\ln x}{x}+C
$$
Directly integrating by parts is easier:
$$
\int\frac{\ln x}{x^2}\,dx=-\frac{1}{x}\ln x+\int\frac{1}{x^2}\,dx
=-\frac{1}{x}\ln x-\frac{1}{x}+C
$$
and you can see that the substitution is just adding noise, because you do exactly the same steps. You gain nothing at all or, maybe, some occasion for making a mistake. ;-)
A better substitution could be $\frac{1}{x}=u$, so $x=u^{-1}$ and the integral becomes
$$
\int u^2\ln(u^{-1})\frac{-1}{u^2}\,du=\int\ln u\,du
$$
that can again be done by parts, but is surely among the “known” ones.
A: Yes, this is correct (sort of). However, I have three points to make.


*

*Most importantly, you forgot the $+C$. Any antiderivative should have a constant on the end, with an unknown value (given other information, it may be possible to find this value).

*I would be careful with how you write out your calculations where doing $u$-substitution. I tend to write it in two lines, like so:

$$f=u\quad \mathrm{d}f=1\cdot\mathrm{d}u\\\mathrm{d}g=e^{-u}\mathrm{d}u,\quad g=-e^{-u}$$

This makes it just a bit neater. Of course, this is just my personal preference, but I find that it's a bit more organized.

*I agree with kccu that it might be good to not have $x$ and $u$ in the same integral. Sure, $u$ is a function of $x$ (and vice versa, here), but taken out of context, that might not be the case. Again, this is just something minor, but it makes the expression a bit neater.
