How do we conclude that $\int_{-\infty}^\infty x/(1+x^2)dx$ is not convergent? In computing the integral $\int_{-\infty}^\infty \frac{x}{1+x^2}dx$ I get the following answers:

*

*$0$ due to the symmetry of the integrand.

*$\left.\ln(\sqrt{1+x^2})\right|_{-\infty}^\infty$ from brute force integration, with the $u$ substitution $u=x^2+1$.

*$i\pi$ from the complex integral $$\oint_C\frac{z}{(z+i)(z-i)}dz = 2\pi i\lim_{z\rightarrow i}\frac{z}{z+i} = i\pi$$ where $C$ is semi-circular arc with a center at the origin and encloses the upper-half complex plane with radius $R\rightarrow \infty$.

Questions: How do we conclude that the integral is divergent? Is it due to the fact that we get different values of the integral? If so, is there any way we can make this conclusion without having to using all these different approaches? Is there some sort of uniqueness hypothesis for the integral?
 A: If we define $\int_{-\infty}^{\infty}$ as $\lim_{R\to+\infty}\int_{-R}^R,$ your symmetry argument would work. Indeed, it would work to show $\int_{-\infty}^{\infty} x\,dx=0.$
But this definition has a problem. In particular, it would mean:
$$\int_{-\infty}^{\infty} f(x+a)\,dx$$ would depend on $a,$ so a simple substitution $u=x+a, du=dx,$ would not be allowed in $\int_{-\infty}^{\infty}.$
In reality, $$\int_{-\infty}^{\infty}=\lim_{(R_1,R_2)\to(+\infty,+\infty)}\int_{-R_2}^{R_1}$$
If one of $R_1,R_2$ goes to infinity much faster than the other, the limit of your integral is not zero.
In your case, $$\int_{-R_2}^{R_1}\frac{x\,dx}{\sqrt{1+x^2}}=\ln\left(\frac{1+R_1^2}{1+R_2^2}\right)$$
If $R_1=cR_2$ for some positive constant $c,$ then $\lim_{R_2\to\infty}=2\ln(c).$
Even worse, if $R_1=R_2^2,$ the limit is $+\infty.$

In some sense, this is like a non-absolutely convergent series.
In particular, if $$\lim_{R\to +\infty}\int_{-R}^{R}|f(x)|\,dx<+\infty,$$ we get the easier limit $$\int_{-\infty}^{\infty}f(x)\,dx = \lim_{R\to\infty} \int_{-R}^{R} f(x)\,dx$$

Alternatively, we can define it as: $$\int_{-\infty}^{\infty} = \int_{-\infty}^0+\int_{0}^{+\infty}.$$
This will give for your function a sum $(-\infty)+(+\infty),$ which is not defined.
A: The integral of a continuous$^1$ function $f : \mathbb{R} \rightarrow \mathbb{R}$ may not be defined. However, the integral of $|f| : \mathbb{R} \rightarrow [0,\infty)$ is always defined, so long as you allow the value $\infty$. Indeed, the integral $\int_{-\infty}^{\infty} f(x) dx$ is only defined if $\int_{-\infty}^{\infty} |f(x)| dx < \infty$. In this case, we say the integral converges; otherwise, it diverges.
So, to show your integral diverges, you need to show that $\int_{-\infty}^\infty |f(x)| dx = \infty$. In your case, you can compute:
$$
\int_{-\infty}^\infty \left| \frac{x}{1+x^2} \right| dx
\geq \int_{1}^\infty \frac{x}{1+x^2} dx
\geq \int_1^\infty \frac{x}{x^2} dx
= \int_1^\infty \frac{1}{x} dx
= \infty
$$
So, the integral diverges.

I should note a slight caveat. There exist integrals (most notably, the Dirichlet integral) such that $\int_0^\infty |f(x)| dx = \infty$, but $\lim \limits_{t \rightarrow \infty} \int_0^t f(x) dx$ converges to some finite value $I$. Then some people may argue that the integral $\int_0^\infty f(x) dx$ should be defined to be $I$, while others may argue that it is undefined. It depends on how you are defining your integral. But in your case, we don't have this issue.

(1: I'm assuming $f$ is continuous here. This isn't necessary, but you do usually need some regularity assumptions on $f$. But, that's a whole other topic.)
