# Different answer for integral for two different methods

I am trying to integrate $\frac{1-x}{(x+1)^2}$, but I get to answers for two different methods:

First, $\frac{1-x}{(x+1)^2} = \frac{1-x+1-1}{(x+1)^2} = \frac{2}{(x+1)^2} - \frac{x+1}{(x+1)^2} = \frac{2}{(x+1)^2} - \frac{1}{(x+1)}$. Integrating this easily gives $\frac{-2}{(x+1)} - \ln|x+1|$.

Second method: Integration by parts. $u = (1-x)$, $dv = \frac{1}{(1+x)^2}$. $uv - \int v du$ is then equal to $\frac{x-1}{(x+1)} - \ln|x+1|$.

How do I resolve this contradictory conclusions?

You made a mistake in the second method:

For the integration by parts you calculated $udv -\int v du$ instead of $uv -\int v du$.

$$\frac{x-1}{(x+1)} - \ln|x+1|+ C=1-\frac{2}{(x+1)}- \ln|x+1| +C=-\frac{2}{(x+1)}- \ln|x+1| +C$$
• @SarayevoClemens They are the same, you forgot the $+C$. Note that $\frac{x-1}{x+1}=\frac{x+1-2}{x+1}=1-\frac{2}{x+1}$ and $1$ goes inside $+C$. – N. S. Jan 19 '15 at 1:28