I have been trying to evaluate the following integral by using integration by parts, but I contine to yield the incorrect answer.
$$\int \frac{x}{(x+1)^2} dx$$
I choose $u=x$, $dv=\frac{1}{(x+1)^2}dx => du=dx$, $v=\frac{-1}{x+1}$. The integration by parts formula, $\int udv = uv - \int vdu$ yields
$$\int \frac{x}{(x+1)^2} dx = \frac{-x}{x+1} - \int \frac{-1}{x+1}dx = \frac{-x}{x+1}+ ln(x+1)+C$$
However, the integral should be
$$\frac{1}{x+1} + ln(x+1) + C$$
Where did I go wrong? This is my first ask on math stack exchange, so please be kind.
You didn’t do anything wrong. Just notice,
$$\frac{-x}{x+1}=\frac{-x-1+1}{x+1}$$
$$=\frac{1}{x+1}-1$$