I have recently been introduced with integrals for measurable functions. I have the following definitions:
Definition 1: For a measurable functions $f:S\to[0,\infty]$ and a sequence of simple functions $(f_n)_{n\geq 1}$ with $0\leq f_n\uparrow f$ we define the integral of $f$ over $E\in\mathcal{A}$ as $$\int_E fd\mu = \lim\limits_{n\to\infty}\int_E f_n d\mu, \text{ in } [0,\infty],$$ where $\mathcal{A}$ is the $\sigma$-algebra of $S$.
Definition 2: A measurable function $f:S\to\overline{\mathbb{R}}$ is called integrable when both $\int_S f^{+}d\mu$ and $\int_S f^{-}d\mu$ are finite. In this case the integral of $f$ over $E\in\mathcal{A}$ is defined as $$\int_E fd\mu = \int_E f^{+}d\mu - \int_E f^{-}d\mu.$$
I have to solve the following exercise:
Exercise: Let $f:S\to[0,\infty]$ be a integrable function. Show that $f<\infty$ almost everywhere.
What I think I should do: I think that I need to show that $\int_S f^{+}d\mu$ and $\int_S f^{-}d\mu$ finite implies that $f<\infty$ almost everywhere.
Questions:
How do I show that $\int_S f^{+}d\mu$ and $\int_S f^{-}d\mu$ finite implies that $f<\infty$ almost everywhere? I'm particularly confused by the part almost everywhere. If $f \nless \infty$ somewhere, wouldn't this imply that $\int_S f^{+}d\mu$ is infinite?
How do integrals for measurable functions differ from the Riemann integral? I've learned about the Riemann integral before and I don't really understand what the difference is.
Thanks in advance!
If $f:S\to[0,\infty]$ is integrable, then $f \ge 0$ , thus $f=f^{+}$ and $f^{-}=0$.
Let $A:=\{x \in S: f(x)= + \infty\}$. For each natural $n$ we have $n \cdot 1_ A \le f$, hence
$n \mu(A)=\int_S n \cdot 1_ A d \mu \le \int_s f d \mu < \infty$ for all $n$. This gives $\mu(A)=0$.
Your second question: consider $f=1_{\mathbb Q}$. $f$ is Lebesgue integrable over $[0,1]$, but not Riemann integrable over $[0,1]$