I am trying to evaluate
$$\int \frac{x+1}{x^2+2x}dx$$
Sounds like $$\int \frac{x+1}{x^2+2x}dx=\int \frac{(x+1)}{(x+1)^2-1}dx\\u=x+1 \implies\int\frac{u}{u^2-1}du\\t=u^2 \implies \frac{1}{2}\int\frac{1}{t-1}dt $$ Which is also known as $$\frac{1}{2}\ln|t-1|=\frac{1}{2}\ln|x^2+2x|$$But before I tried that, I had tried $$\int \frac{x+1}{x^2+2x}dx=\int \frac{1}{x+2}dx+\int \frac{1}{x^2+2x}dx\\=\ln|x+2| + \int \frac{1}{(x+1)^2-1}dx$$ Recalling that $\int \frac{1}{u^2-1}du=-\tanh^{-1}(u)$ or $-\coth^{-1}(u)$, $$\ln|x+2| + \int \frac{1}{(x+1)^2-1}dx=\ln|x+2|-\tanh^{-1}(x+1)$$ or $\ln|x+2|-\coth^{-1}(x+1)$ on the different parts of the domain.
Why did I get two different answers for the two different methods? Thanks.
Edit: They are not different. Just from the logarithmic definition of $\coth^{-1}$ and $\tanh^{-1}$ they are the same thing.