Prove the existence of $\int_0^{\infty} f(x)dx$. Suppose $g(x)$ and $f(x)$ are defined on $(0, \infty)$ and are Riemann-integrable on $[t, T]$ whenever $0<t<T<\infty$, $|f(x)|\leq g(x)$ and $\int_0^{\infty} g(x)dx<\infty$. Show that $\int_0^{\infty} f(x)dx$ is also finite.
Proof: We have
$|\int_t^{T}f(x)dx|\leq\int_t^{T}|f(x)|dx\leq \int_t^{T}g(x)dx$ for all $0<t<T$ .    (*)
Then the convergence of $\int_0^{\infty} f(x)dx$ follows immediately from the fact that $\int_0^{\infty} g(x)dx<\infty$ and  by letting $t\to0$ and $T\to\infty$ one by one in (*).
My question: I can see how $\int_0^{\infty}|f(x)|dx$ exists since $\int_0^{T}|f(x)|dx$ is monotonically increasing; but I struggle to deduce the existence of $\int_0^{\infty}f(x)dx$.
I understand that this seems like a silly place to get stuck in. Any hint would be appreciated.
 A: Could we have done it like this?
If $h$ and $g$ are non-negative and that $h(x)\leq g(x)$ on $a\leq x < \infty$, then it is quite clear that $\int\limits_{a}^{\infty} h(x) dx$ exists whenever $\int\limits_{a}^{\infty} g(x) dx$ exists.
You have already noted in the given case that, $\int\limits_{t}^{\infty}|f(x)| dx$ exists for any $t>0$. Now we can write,
$$f(x) = (f(x)+|f(x)|) -|f(x)|.$$
Now $0\leq f(x)+|f(x)| \leq 2|f(x)|.$ We also know that if $\int\limits_{a}^{\infty} h(x) dx$ and $\int\limits_{a}^{\infty} k(x) dx$ exist, then $\int\limits_{a}^{\infty} (h(x)- k(x)) dx$ also exists. The conclusion now easily follows.
A: The answer here explains beautifully why $\int_a^{\infty}f(x)dx$ exists.
For the case of $\int_0^bf(x)dx$, consider a sequence $\{t_n\}$ in $(0, b)$ such that $\{t_n\}\to0$ and $t_{n+1}>t_{n}$ for all $n\in\mathbb{N}$. Define $c_1:=\int_{t_1}^bg(x)dx$, $c_2:=\int_{t_2}^{t_1}g(x)dx$, and so on.
Define $a_1:=\int_{t_1}^bf(x)dx$, $a_2:=\int_{t_2}^{t_1}f(x)dx$, and so on. It is easy to see that $\sum_{i=1}^{\infty}c_i$ converges to $\int_0^bg(x)dx$.
Clearly $|a_n|\leq c_n$ for all $n\in\mathbb{N}$; hence $\sum_{i=1}^{\infty}a_i$ also converges, say to $l$.
Claim: $\int_0^{b}f(x)dx$ exists and $\int_0^{b}f(x)dx=l$.
Proof: Suppose $\epsilon>0$, then there exists a $N_0\in\mathbb{N}$ such that:

*

*$|\sum_{i=1}^{N_0}a_i-l|<\epsilon/2$, and


*$|\sum_{i=N_0}^{\infty}c_i|<\epsilon/2$.
Now, let $\delta=t_{N_0}$. Suppose $t\in(0, \delta)$, then there exists some $N_1\in\mathbb{N}$ such that $0<t_{N_1}<t$ and $N_1\geq N_0+1$. Thus
$|\int_t^bf(x)dx-l|=|\int_t^bf(x)dx-\int_{t_{N_0}}^bf(x)dx+\int_{t_{N_0}}^bf(x)dx-l|\leq|\int_t^bf(x)dx-\int_{t_{N_0}}^bf(x)dx|+|\int_{t_{N_0}}^bf(x)dx-l|=|\int_t^{t_{N_0}}f(x)dx|+|\sum_{i=1}^{N_0}a_i-l|<\int_{t}^{t_{N_0}}g(x)dx+\epsilon/2\leq\int_{t_{N_1}}^{t_{N_0}}g(x)dx+\epsilon/2=\sum_{N_0+1}^{N_1}c_i+\epsilon/2\leq|\sum_{N_0}^{\infty}c_i|+\epsilon/2<\epsilon/2+\epsilon/2<\epsilon$.
