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?
Thanks in advance
Note that
$$\int \frac{x}{x+1} dx = \int \frac{x +1-1}{x+1}dx=\int \left(1-\frac{1}{x+1}\right)dx=x-\ln|x+1|\color{red}{+C}$$