what's wrong with this integral by parts calculation?

Today, I just finda confusing quesiton. If I do this way:

$$\int { \frac { dx }{ x } } =x\left( \frac { 1 }{ x } \right) -\int { xd } \left( \frac { 1 }{ x } \right) =1+\int { \frac { dx }{ x } }$$

then, $0=1$

what's wrong with this calculation? in another words, why I cannot apply "integral by parts" method to this simple $\dfrac { 1 }{ x }$?

Thanks.

According to $\int{u}dv=uv-\int{v}du$, here I just want my $dv$ be $dx$. then the $u$ is$\dfrac{1}{x}$.

• Two valid integration methods can produce antiderivatives that differ by a non-zero constant. Don't forget about the $+{}C$. (There is currently a minus sign error/typo.) – André Nicolas Feb 6 '16 at 4:42
• Watch your sign. That minus should be a plus. With that correction, everything is correct. – Kaynex Feb 6 '16 at 4:48
• thanks. I corrected it. it's a "+". But with this correction, something is still wrong. – apollonian Feb 6 '16 at 4:57

First off, $$\int \frac{1}{x}\,dx = \ln x +C$$

Second, using integration by parts, if you let $u = 1$, and $dv = \frac{1}{x}$, then $$uv-\int v\,du = \ln x - \int 0\,du =\ln x - K = \ln x +C$$ if I let $C = -K$.

If you let $u = \frac{1}{x}$, and $dv = 1$, then $$uv-\int v\,du = \frac{1}{x}\cdot x - \int x\cdot \frac{-1}{x^2}\,dx = 1+\int\frac{1}{x}\,dx = 1+\ln x+K = \ln x + C$$ if I let $C = 1+K$.

I'm not sure how you conclude that

$$\int x \, d \left(\frac{1}{x}\right) = \int \frac{dx}{x}$$

You can let $u = \frac{1}{x}$, and then

\begin{align} \int x \, d \left(\frac{1}{x}\right) & = \int \frac{du}{u} \\ & = \ln u \\ & = -\ln x \end{align}

And now your LHS and RHS only differ by a constant, which as André Nicolas points out, is perfectly normal in integration.

• Because $d\frac { 1 }{ x } =-\frac { 1 }{ { x }^{ 2 } } dx$, then $\int { xd\left( \frac { 1 }{ x } \right) } =-\int { \frac { dx }{ x } }$. Sorry I forgot a "-". And I have corrected it. – apollonian Feb 6 '16 at 5:11
• Either way is fine. Anyway, your problem is mostly the sign. – Brian Tung Feb 6 '16 at 6:14

\begin{align*} \int_{a}^{b} \frac{dx}{x} &= \left[\frac{1}{x} \cdot x \right]_{a}^{b}- \int_{a}^{b} x\, d\left( \frac{1}{x} \right) \\ &= (1-1)+\int_{a}^{b} \frac{dx}{x} \\ &= \int_{a}^{b} \frac{dx}{x} \end{align*}