$\int_{-\infty}^\infty f(x)dx$ vs. $\lim_{b\rightarrow\infty}\int_{-b}^b f(x)dx$ for odd $f(x)$. I think the below one is a problem which demonstrates a beautiful subtlety (at least for someone like me who's a beginner).
Show that
$$
\int_{-\infty}^\infty \frac{2x}{1+x^2}dx
$$
diverges and
$$
\lim_{b\rightarrow\infty}\int_{-b}^b \frac{2x}{1+x^2}dx=0
$$
My Solution/Proof:
Let's start with
$$
\begin{aligned}
\lim_{b\rightarrow\infty}\int_{-b}^b \frac{2x}{1+x^2}dx &= \lim_{b\rightarrow\infty} \left[\ln(1+x^2)\right]_{-b}^b \\
&= \lim_{b\rightarrow\infty}(0) \\
&= 0
\end{aligned}
$$
That's one part. Next we have
$$
\begin{aligned}
\int_0^\infty \frac{2x}{1+x^2}dx &= \lim_{a\rightarrow\infty}\int_0^a\frac{2x}{1+x^2}dx \\
&= \lim_{a\rightarrow\infty}\ln(1+a^2) \\
&= \infty
\end{aligned}
$$
and also
$$
\begin{aligned}
\int_{-\infty}^0\frac{2x}{1+x^2}dx &= \lim_{b\rightarrow-\infty}\int_b^0\frac{2x}{1+x^2}dx \\
&= \lim_{b\rightarrow-\infty}\left[-\ln(1+b^2)\right] \\
&= -\infty
\end{aligned}
$$
Therefore
$$
\begin{aligned}
\int_{-\infty}^\infty \frac{2x}{1+x^2}dx &= \int_{-\infty}^0\frac{2x}{1+x^2}dx+\int_0^\infty \frac{2x}{1+x^2}dx \\
&= \lim_{b\rightarrow-\infty}\int_b^0\frac{2x}{1+x^2}dx+\lim_{a\rightarrow\infty}\int_0^a\frac{2x}{1+x^2}dx \\
&= -\infty+\infty \\
&= \text{undefined}
\end{aligned}
$$
and hence the assertion is proven. But...but...but...
But consider
$$
\begin{aligned}
\lim_{b\rightarrow-\infty}\int_b^0\frac{2x}{1+x^2}dx+\lim_{a\rightarrow\infty}\int_0^a\frac{2x}{1+x^2}dx &= \lim_{b\rightarrow-\infty}\left[-\ln(1+b^2)\right]+\lim_{a\rightarrow\infty}\ln(1+a^2) \\
& = \lim_{\color{red}{b\rightarrow\infty}}\left[-\ln(1+b^2)\right]+\lim_{a\rightarrow\infty}\ln(1+a^2)
\end{aligned}
$$
because $\ln(1+x^2)$ is even. Now, if $a=b$, this limit would become zero. Right?
If so, what exactly is stopping me from considering $a=b$ and hence the second limit as zero? I mean what's stopping the second integral from converging?
 A: No. The symbols $a$ and $b$ are just variables. You could also write
$$
\int_{-\infty}^{\infty} \frac{2 x}{1 + x^2} \ \text{d}x= \left(\lim_{c \to \infty} - \ln(1 + c^2)\right) 
+ \left(\lim_{c \to \infty} \ln(1 + c^2)\right).
$$
But this is not equal to
$$
\lim_{c \to \infty} \left(- \ln(1 + c^2) + \ln(1 + c^2)\right)
= \lim_{c \to \infty} 0
= 0.
$$
The sum of the limits is only the limit of the sum, if both limits exist and are finite, which is not the case here.
A more simple example for this statement is the following:
$$
0
= \lim_{n \to \infty} 0 
= \lim_{n \to \infty} \left(n + \left(- n\right)\right)
\ne \left(\lim_{n \to \infty} n\right) + \left(\lim_{n \to \infty} - n\right)
= \infty + (- \infty)
= \text{undefined.}
$$
A: Let us, hypothetically, for the sake of discussion, assume that $$\int_{-\infty}^{\infty}\frac{2x}{x^2+1}\,\mathrm{d}x$$ converges. If this is true, then it must be true that $$\int_{-\infty}^{\infty}\frac{2x}{x^2+1}\,\mathrm{d}x=\lim_{R\to\infty}\int_{-R}^R\frac{2x}{x^2+1}\,\mathrm{d}x=0.$$ However, if it converges, then it must also be true that $$\int_{-\infty}^{\infty}\frac{2x}{x^2+1}\,\mathrm{d}x=\lim_{R\to\infty}\int_{-R}^{2R}\frac{2x}{x^2+1}\,\mathrm{d}x.$$ The problem is that $$\lim_{R\to\infty}\int_{-R}^{2R}\frac{2x}{x^2+1}\,\mathrm{d}x=\lim_{R\to\infty}\int_R^{2R}\frac{2x}{x^2+1}\,\mathrm{d}x=\lim_{R\to\infty}\left[\ln(4R^2+1)-\ln(R^2+1)\right]=\lim_{R\to\infty}\left[\ln(4)+\ln\left(R^2+\frac14\right)-\ln(R^2+1)\right]=\ln(4)\neq0.$$ This contradicts our assumption that $$\int_{-\infty}^{\infty}\frac{2x}{x^2+1}\,\mathrm{d}x$$ converges. This is why we conclude that it diverges. In general, $$\int_{-\infty}^{\infty}f(x)\,\mathrm{d}x:=\lim_{S\to-\infty,\,T\to\infty}\int_S^Tf(x)\,\mathrm{d}x$$ is a definition, so if the latter does not exist, then neither does the former. This is the only way our definitions can stay consistent.
Also, I should not that your statement that $$\lim_{x\to{x'}}\left[f(x)-f(x)\right]=\lim_{x\to{x'}}f(x)+\lim_{x\to{x'}}-f(x)$$ is not true in general.
