Is the function $\frac{x \cos x}{1+x^2}$ improperly integrable function? I was wondering if the function $\frac{x \cos x}{1+x^2}$ is improperly integrable on $[0,\infty)$, i.e., $\int_0^\infty \frac{x \cos x}{1+x^2}dx$ exists in the sense of improper integration. More precisely, 

$\displaystyle \lim_{R \to \infty} \int_0^R \frac{x \cos x}{1+x^2}dx$ converges in $\mathbb{R}.$

Clearly, the Cauchy principal value $\int_{-\infty}^{\infty} \frac{x \cos x}{1+x^2}dx$ is $0,$ since $\frac{x \cos x}{1+x^2}$ is an odd function.
By similar argument as in the answer of Per Manne [Convergence/absolute convergence of $\int_0^\infty \frac{\cos x}{1+x}dx$ (Baby Rudin P6.9), I can conclude
$\displaystyle \lim_{n \to \infty} \int_{\frac{\pi}{2}}^{(n+\frac{1}{2})\pi}\frac{x \cos x}{1+x^2}dx$ converges. Here $n \in \mathbb{N}$ is crucial for the proof, since the alternating series test was used in the proof. But, I was wondering if it implies the convergence of $\displaystyle \lim_{R \to \infty} \int_0^R \frac{x \cos x}{1+x^2}dx$.
Please give me any comment for my question. Thanks in advance!
 A: You are making a good observation. 
It happens in this case that the improper integral is truly convergent and
$$\lim_{R \to \infty}\int_{\frac{\pi}{2}}^R \frac{x \cos x}{1 + x^2} \, dx = \lim_{n \to \infty}\int_{\frac{\pi}{2}}^{(n + \frac{1}{2})\pi} \frac{x \cos x}{1 + x^2} \, dx, $$
In general, convergence of $\int_a^R f(x) \, dx $ as the (real) upper limit $R \to \infty$ implies convergence of $\int_a^n f(x) \, dx$ as the (integer) upper limit $n \to \infty$. 
However, the converse is not true unless $f$ is eventually nonnegative or nonpositive so that $F(x) = \int_a^x f(t) \, dt$ is monotonic.
For a counterexample, take $f(x) = \cos \pi x$ where 
$$\lim_{n \to \infty} \int_0^n \cos \pi x \, dx = \lim_{n \to \infty} \frac{1}{\pi}\sin \pi n = 0,$$
but for $R \in \mathbb{R}^+ \setminus \mathbb{N}$,
$$\lim_{R \to \infty} \int_0^R \cos \pi x \, dx = \lim_{R \to \infty} \frac{1}{\pi}\sin \pi R\quad \text{does not exist}$$.
We can prove the improper integral in this question converges in a variety of ways -- for example,  by showing that the Cauchy criterion is satisfied.  For all $x > 1$ the function $x \mapsto x/(1+x^2)$ is decreasing. For any $b > a > 1$, there exists by the second mean value for integrals $\xi \in (a,b)$ such that
$$\left|\int_a^b \frac{x \cos x}{1 + x^2} \, dx  \right| = \left|\frac{a}{1 + a^2}\int_a^\xi \cos x  \, dx  \right| = \frac{a}{1+a^2} |\sin \xi - \sin a| \leqslant \frac{2a}{1+a^2}$$
Since the RHS converges to $0$ as $a \to \infty$, the Cauchy convergence criterion is satisfied.  That is, for any $\epsilon > 0$ we have for all sufficiently large $a$,
$$\left|\int_a^b \frac{x \cos x}{1 + x^2} \, dx  \right| < \epsilon$$
A: Yes it does imply the desired convergence, and to the same value.
More general result: Suppose  $f$ is continuous on $[0,\infty).$ Set $I(R) = \int_0^R f.$ Assume $R_1 < R_2 < \cdots \to \infty.$ If i) $I(R_n)\to L$ as $n\to \infty,$ and ii) $\int_{R_n}^{R_{n+1}}|f| \to 0,$ then $\int_0^\infty f$ converges to $L.$
This is pretty easy to prove; I'll leave it to you for now. In your problem we would apply this with $f(x)=x\cos x/(1+x^2)$ and $R_n = (n+1/2)\pi.$
