TITLE: $\int \frac{dx}{x\log(x)}$
QUESTION [6 upvotes]: I think I'm having a bad day. I was just trying to use integration by parts on the following integral: 
$$\int \frac{dx}{x\log(x)}$$
Which yields
$$\int \frac{dx}{x\log(x)} = 1 + \int \frac{dx}{x\log(x)}$$
Now, if I were to subtract 
$$\int \frac{dx}{x\log(x)}$$
from both sides, it would seem that $0 = 1$. What is going on here?
Aside: I do know the integral evaluates to 
$$\log(\log(x))$$
plus a constant.

REPLY [3 votes]: In a general case we have
$$\int\frac{f'(x)}{f(x)}dx=\log|f(x)|+C,$$
and in our case, take $f(x)=\log(x)$ so $f'(x)=\frac{1}{x}$ to find the desired result.