# 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?

## 2 Answers

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$.

Added: After fixing this error the answers are the same:

$$\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$$

• I fixed this error, but the answers are still different – Sarayevo Clemens Jan 19 '15 at 1:24
• @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

One of your answers is wrong. The way to verify an integration is to differentiate the alleged antiderivative, and see that it is the integrand.

• Yes, and I am aware that the first answer is the correct one. But I am not sure what is wrong in the second method. – Sarayevo Clemens Jan 19 '15 at 1:25