# Compute $\int\frac{x}{x+1}dx$

My textbook uses the following method:

$$\int \frac{x}{x+1} dx = \int \frac{x +1-1}{x+1}dx=\int 1-\frac{1}{x+1}=x-\ln|x+1|$$

It seemed obvious after seeing it solved, but I didn't spot that first step of splitting the fraction.

So I attempted it using u substitution:

$u = x+1$
$x = u-1$
$dx = du$

$$\int \frac{u-1}{u} du = \int 1-\frac{1}{u}=u-\ln|u| = (x+1) - \ln|x+1|$$

The two expressions after using subsitution are equivalent aren't they?

$$\int \frac{u-1}{u} = \int \frac{x +1-1}{x+1}$$

So when doing the u substitution, it appears that I'm getting to the same stage where they split the fraction. Can anyone explain what I'm doing wrong?

• Don't forget the $+C$. Different methods can give seemingly different answers which differ only by constants. – JMoravitz Feb 16 '18 at 15:48
• Riiiiiight!! I think I got it, 1 is just a constant so it will get "assimilated" by C. (That was a really dumb question) Thank you! – Scb Feb 16 '18 at 15:51
• The first step you did not see is just to add zero in the numerator. – Piquito Feb 16 '18 at 15:55

Note that

$$\int \frac{x}{x+1} dx = \int \frac{x +1-1}{x+1}dx=\int 1-\frac{1}{x+1}=x-\ln|x+1|\color{red}{+C}$$

• That whole expressions is precisely the second line of my post. Perhaps I was not clear, but my goal here is to try to understand why using u-substitution doesn't seem to work – Scb Feb 16 '18 at 15:49
• @SeanCobb now is clear, it works since they differ by a constant! – user Feb 16 '18 at 15:50
• Yes, I got it now. Than you! – Scb Feb 16 '18 at 15:52

The two expressions you listed above ie (x+1) - log(x+1) +C and x - log(x+1)+C, are in fact the same and equal because, in the first expression you can simply consider the (+1) as a part of the arbitrary constant C.

Since, the indefinite integrals represent the family of curves and not the exact equation, BOTH EXPRESSIONS SHALL BE CONSIDERED OF THE SAME FAMILY and hence the same. Thanks for asking mate!

• Welcome to MSE. What's the point of repeating an answer which furthermore was accepted by the OP? – José Carlos Santos Feb 16 '18 at 16:41