# Partial Integration - Where did I go wrong?

For a Homework, I need $\int \frac{x}{(x-1)^2} dx$ as an intermediate result. Using partial integration, I derive $x$ and integrate $\frac{1}{(x-1)^2}$, getting: $$\frac{-x}{x-1} + \int \frac{1}{x-1} dx = \ln(x-1)+\frac{x}{x-1}$$ WolframAlpha tells me this is wrong (it gives me $\frac{1}{1-x}$ where I have $\frac{x}{x-1}$). If I and WA disagree the error is usually somewhere on my side. Unfortunately WA uses partial fractions there instead of partial integration, so I'm not sure which step I screwed up. Supposedly $\int f'g dx = fg - \int fg' dx$ right?

(I leave the constant +C out because it's not relevant for the problem I need this for).

-
You lost the $-$ in going from $-x/(x-1)$ to $x/(x-1)$. Apart from that, you and WA agree: note that $x/(x-1)$ and $1/(x-1)$ differ by a constant –  Robert Israel Jun 17 '12 at 15:53
$\dfrac{x}{x-1}$ is the same as $\dfrac{1}{x-1}+\text{constant}$, where the "constant" is $1$. –  Michael Hardy Jun 17 '12 at 17:41
By the way, it might have been easier to substitute $u=x-1$, then divide through and integrate. –  Mike Jun 17 '12 at 18:49

You’ve a sign error: you should have $$\ln(x-1)-\frac{x}{x-1}\;.$$

Now note that

$$\frac{x}{x-1}=1+\frac1{x-1}\;,$$

so your (corrected) answer can be written $$\ln(x-1)-1-\frac1{x-1}=\ln(x-1)+\frac1{1-x}-1\;.$$

Your (corrected) answer differs from WA’s by a constant, which is absorbed in the constant of integration; both are perfectly good antiderivatives of the given function.

-
Thanks. I "fixed" the sign when I wrote this by accident (I had it right in my notes, then for some reason when I wrote it here I thought it was wrong). –  Cubic Jun 17 '12 at 19:11

the result is : $\ln|x-1| - \frac x{x-1} + C$ where $C$ is some constant. If $C=1$ you get : $\ln |x-1| + \frac 1{1-x}$ The finaly result can be expressed : $$F(x) = \ln |x-1| + \frac 1{1-x} + \lambda$$ where $\lambda$ is some constant. Precesely : $$F(x) = \ln (x-1) + \frac 1{1-x} + \lambda$$ on the intervale $]1,+\infty[$ and: $$F(x) = \ln (1-x) + \frac 1{1-x} + \lambda$$ on the intervale: $]-\infty ,1[$

-