How do I test the convergence of this integral? $$\int_{-\infty}^{+\infty} \frac{dx}{x(x+1)}$$
I divided the integral and I have to first evaluate $\int_{-\infty}^{-1}dx/(x (x-1))$. Upon substituting $x = -y$, what do I replace the limits of integration with? Am I correct in writing $= -\int_{1}^\infty dy/(y+1)$?
 A: The integrand have poles at $x=-1$ and $x=0$ that can lead to a divergent result when we integrate over them (which comes on top of the possible divergence that comes over integrating to infinity) and this is in fact the case here.
We should therefore divide the integral into three regions: 1) the tail going to $-\infty$ from the $x=-1$ pole 3) the integral from the $x=-1$ pole to the $x=0$ pole 4) the integral from the $x=0$ pole and towards $\infty$:
$$\int_{-\infty}^\infty\frac{dx}{x(1+x)} = \int_{-\infty}^{-1}\frac{dx}{x(1+x)} + \int_{-1}^0\frac{dx}{x(1+x)} + \int_{0}^\infty\frac{dx}{x(1+x)}$$
All of the integrals on the right hand side must be finite if the integral on the left is to exist. We can evaluate them as follows:
$$\int_{-\infty}^{-1}\frac{dx}{x(1+x)} = \lim_{R\to -\infty}\lim_{r\to -1^-}\int_{R}^{r}\frac{dx}{x(1+x)}$$
$$\int_{-1}^0\frac{dx}{x(1+x)} = \lim_{R\to -1^+}\lim_{r\to 0^-}\int_{R}^{r}\frac{dx}{x(1+x)}$$
$$\int_{0}^\infty\frac{dx}{x(1+x)} = \lim_{R\to 0^+}\lim_{r\to \infty}\int_{R}^{r}\frac{dx}{x(1+x)}$$
Lets focus on the middle integral. We find
$$\lim_{R\to -1^+}\lim_{r\to 0^-}\int_{R}^{r}\frac{dx}{x(1+x)} = \lim_{R\to -1^+}\lim_{r\to 0^-}\left( \log(r) - \log(R) + \log(1+R) - \log(1+r)\right)$$
and since $\lim_{r\to 0-}\log(r) - \log(R) + \log(1+R) - \log(1+r) = -\infty$ this integral does not exist and it follows that the integral $\int_{-\infty}^\infty\frac{dx}{x(1+x)} $ is therefore divergent.
