It has been a week that I am practicing integral, and I am stuck at this simple problem:
$$\int \frac{\ln(x+1)-\ln x}{x^2+x} \, dx$$
It has been a week that I am practicing integral, and I am stuck at this simple problem:
$$\int \frac{\ln(x+1)-\ln x}{x^2+x} \, dx$$
On
You can observe that the numerator is $$ \ln\left(1+\frac{1}{x}\right) $$ so you could try $$ t=1+\frac{1}{x} $$ that gives $$ x=\frac{1}{t-1} $$ so that $$ x^2+x=\frac{1}{(t-1)^2}+\frac{1}{t-1}=\frac{t}{(t-1)^2} $$ and $$ dx=-\frac{1}{(t-1)^2}\,dt $$ so the integral becomes $$ \int(\ln t)\frac{(t-1)^2}{t}\frac{-1}{(t-1)^2}\,dt=-\int\frac{\ln t}{t}\,dt $$ that should be easy.
On
$$\begin{align} \int \left(\frac{\log(x+1)-\log(x)}{x(x+1)}\right)\,dx&=\int \left(\frac1x-\frac{1}{x+1}\right)\left(\log(x+1)-\log(x)\right)\,dx\\\\ &=-\int \left(\log(x+1)-\log(x)\right)\left(\frac{d\left(\log(x+1)-\log(x)\right)}{dx}\right)\,dx\\\\ &=-\frac12 \left(\log(x+1)-\log(x)\right)^2+C \end{align}$$
Set $t=\ln(x+1)-\ln(x)$ and $dt=-\frac{1}{x^2+x}dx$
$$-\int t dt=-\frac{t^2}{2}+\mathcal C=\boxed{\color{blue}{-\frac 1 2(\ln(x)-\ln(x+1))^2+\mathcal C}}$$