TITLE: Integrate $\frac{1}{x\,\log{x}}$ by parts
QUESTION [8 upvotes]: A naive indefinite integration of the function $\dfrac{1}{x\,\log{x}}$ can be performed as follows:
Let 
$
\begin{eqnarray}
I  &=& \int\dfrac{dx}{x\,\log{x}}\\
\therefore I &=& \dfrac{1}{\log{x}}\int\dfrac{dx}{x} - \int\left\{\dfrac{d}{dx} \left(\dfrac{1}{\log{x}}\right) \int \dfrac{dx}{x} \right\}dx\\
&=& \dfrac{1}{\log{x}} \cdot \log{x}-\int - \dfrac{1}{(\log{x})^2}\cdot\dfrac{1}{x}\cdot\log{x}\,dx\\
&=& 1 + \int\dfrac{dx}{x\,\log{x}}\\
&=& 1+I
\end{eqnarray}
$
This obviously leads to something like $1=0$. Can anyone please tell me what is going wrong? Thanks in advance. 
PS. I know that the corrct answer would be $\log(\log{x})$.

REPLY [2 votes]: If you replace the undefinite integrals by definite ones, you end up with
$$I=0+I,$$
which is harmless. The devil is the integration constant.
You may rescue the reasoning by writing
$$I=\frac{\log x}{\log x}+C+I$$ and you conclude that $C=-1$ (and there remains another integration constant in $I$).