Generalization of Improper Integral
Suppose a function $f$ is Riemann integrable over any interval $[0,b]$. By definition the improper integral is convergent if there is a real number $I$ such that
$$\lim_{b \to \infty}\int_0^b f(x) dx= I := \int_0^\infty f(x)dx.$$
I have shown that if $f$ is nonnegative then this is equivalent for $n \in \mathbb{N}$ to
$$\lim_{n \to \infty}\int_0^n f(x) dx = I.$$
Now I would like to know for general $f$ (not just nonnegative) if the following proposition holds.
Suppose the improper integral of $f$ over $[0,\infty)$ is convergent. Let $A_n \subset [0, \infty)$ be a nested sequence of compact sets such that $A_1 \subset A_2 \subset A_3 \subset ...$ and $\cup_n A_n =[0,\infty)$, and where the Riemann integral is defined on each $A_n$. Then
$$\lim_{n \to \infty} \int_{A_n}f(x) dx = \int_0^\infty f(x) dx.$$
This question is not about Lebesgue integration. Thank you for any help you can give me.
If the improper integral converges conditionally and not absolutely, then the limit of $\int_{A_n} f$ need not exist. This is somewhat surprising since $A_n \subset A_{n+1}$ and $A_n \uparrow [0,\infty).$
For example, it is well known that the improper integral of $f(x) = \sin x / x$ converges conditionally with
$$\lim_{c \to \infty}\int_0^c \frac{\sin x}{x} \, dx = \frac{\pi}{2}.$$
A counterexample to your conjecture is provided by the following sequence $A_n$ where each set is a finite union of intervals with gaps, of the form
$$A_n = [0, 2n\pi - \pi] \cup \bigcup_{k=n}^{2n}[2k\pi,2k\pi + \pi].$$
It is easy to show that $A_n \subset A_{n+1}$ for all $n$. Furthermore for any $c > 0$ there exists $n$ such that $2n\pi - \pi > c$ and $[0,c] \subset A_n$. This implies $\cup_n A_n = [0,\infty)$.
The integral over $A_n$ is
$$\int_{A_n}\frac{\sin x }{x} \, dx = \int_0^{2n\pi - \pi}\frac{\sin x }{x} \, dx + \sum_{k=n}^{2n} \int_{2k \pi}^{2k \pi + \pi} \frac{\sin x} {x} \, dx,$$
which can be shown to converge to a value greater than $\pi/2 + \log 2 /\pi$.
The first integral on the right-hand side converges to $\pi/2$ and, since $\sin x \geqslant 0$ for $x \in [2k \pi,2k \pi + \pi]$, it follows that
$$\int_{2k \pi}^{2k \pi + \pi} \frac{\sin x} {x} \, dx > \frac{1}{2k\pi + \pi}\int_{2k \pi}^{2k \pi + \pi} \sin x \, dx = \frac{2}{2k\pi + \pi} > \frac{1}{\pi}\frac{1}{k+1}.$$
Thus,
$$\lim_{n \to \infty}\int_{A_n} \frac{\sin x }{x} \, dx > \frac{\pi}{2} + \lim_{n \to \infty} \frac{1}{\pi} \sum_{k = n}^{2n}\frac{1}{k+1}. $$
There can be no unique value of the limit of the integral for every choice of sequence $(A_n).$
Not true. You can choose the $A_n$ in a biased way. Consider $f(x)=\sin(x)$ and $A_n=[0,n\pi/2]$.