Existence, finiteness of Lebesgue integral on $(0,\infty)$ of $f(x)=\frac{1-e^{-x}}{x}-\frac{1}{1+x}$ Ok, here is the function at hand:
$$
f(x)=\frac{1-e^{-x}}{x}-\frac{1}{1+x}
$$
My problem is to determine if the Lebesgue integral on the interval $(0,\infty)$ exists, and if it does, whether or not it is finite.
My first issue is some confusion on what it means for the integral to exist in the first place. I feel like finiteness implies existence and vice versa, but the question would not be posed in such a manner if it did not allow for infinite integrals.
In doing these types of problems, I am less interested in the tools to explicitly calculate the integral, but more in understanding the theory. So, if someone could help a self-studier like myself with breaking this problem down, I would be forever grateful.
Specifically, any detail as to the specific justification of why the integral exists (sequences of simple functions, continuous function on a finite interval, etc.) is especially helpful.
From here I am going to attempt a number of similar exercises, but it would go a long way to see how one such exercise can be done.
 A: Your function is clearly measurable by continuity.
$$\begin{align}\int_0^{+\infty}\left|\frac{1-e^{-x}}{x}-\frac{1}{1+x}\right|dx&=\int_0^{+\infty}\left|\frac{1-e^{-x}-xe^{-x}}{x(1+x)}\right|dx\\&\le\int_0^{+\infty}\left|\frac{1-e^{-x}}{x(1+x)}\right|dx+\int_0^{+\infty}\left|\frac{e^{-x}}{1+x}\right|dx\\&=\int_0^{+\infty}\frac{1-e^{-x}}{x(1+x)}dx+\int_0^{+\infty}\frac{e^{-x}}{1+x}dx\end{align}$$
Notice that $1-e^{-x}\sim_0x$, then $\frac{1-e^{-x}}{x(1+x)}\sim_0\frac{1}{1+x}$, so the first integral is convergent at $0$. And $\frac{1-e^{-x}}{x(1+x)}\sim_\infty\frac{1}{x^2}$, so the first integral is convergent at $+\infty$.
The second integral is clearly finite : $\frac{e^{-x}}{1+x}\le e^{-x}$ and $\int_0^{+\infty}e^{-x}dx<\infty$.
Conclusion : $$\int_0^{+\infty}\left|\frac{1-e^{-x}}{x}-\frac{1}{1+x}\right|dx<\infty$$
So the lebesgue integral exists and is finite.

Remarks :


*

*We first define the Lebesgue integral for measurable functions valued in $[0,\infty]$ (which always exist, but may be $+\infty$).

*For measurable functions with values in $\mathbb R$, we say that $f$ is Lebesgue integrable if $\int|f|<+\infty$ and then $\int f=\int f_+-\int f_-$ where $f_+=\max(0,f)$ and $f_-=\max(0,-f)$ (we show that if $f$ is measurable then $|f|$, $f_+$ and $f_-$ are too).

*Let $I=[a,b[$ ($b$ can be $+\infty$) and $f:I\rightarrow\mathbb R$ such as $f$ is Riemann integrable on $[a,x]$ for all $a<x<b$, then $\int_I|f|<\infty$ if and only if $\lim_{x\rightarrow b^-}\int_a^x|f|<\infty$. In this case $\int_I|f|=\lim\int_a^x |f|$ and $\lim\int_a^xf$ exists and is equal to $\int_If$.


So for your exercise we have to check 2 using 3.
