How to handle measurements and Lebesgue integrals? (with concrete example) Question
Define the measure $\mu$ on the measurable space $(\mathbb{R}, \mathcal{B})$ as follows.
$$
\mu\left( (a, b] \right) = \int_a^b \frac{1}{1+x^2}dx\ \ \mathrm{for\ all\ interval\ (a,b]}.
$$
Then, I want to calculate the following:
$$
\int_{(-1, 1)} gd\mu,\ (g:=|x|)
$$
What I know
I'm getting the flow of the equation transformation, but I don't understand the transformation of the question mark part.
$$
\int_{(-1, 1)} |x|d\mu(x) = \int_\mathbb{R} |x|\chi_{(-1, 1)} d\mu \overset{?}{=} |x|\mu((-1, 1)) \overset{?}{=} \int_{-1}^1 |x|\frac{1}{1+x^2}dx = \log 2.
$$
The definition of measurement is understood as follows.
setup: $(X, m, \mu); \textrm{measure spaces}, s = \sum_{i=1}^n \alpha_i \chi_{A_i}, A_i = \{ x\in X; s(x) = \alpha_i \}, \alpha_i \geq 0, E \in m$.
$$
\int_E s d\mu := \sum_{i=1}^n \alpha_i \mu(A_i \cap E)
$$
In other words, the integral can be calculated for measurable single functions, but I believe the others are undefined...
 A: Well, if you only have the definition of the integral of simple functions so far, then clearly you cannot evaluate the integral of a non-simple function yet. Perhaps you've yet to encounter some additional material needed for this exercise?
If you have encountered the extension of the definition of the integral to non-simple functions, then that definition also suggests a method of computing such an integral. Namely, you would approximate your integrand by a well-chosen limiting sequence of simple functions $f_n$, then claim that $\int f~d\mu = \lim_n \int f_n~d\mu$ where the RHS can be computed using the definition of the integral of simple functions. For instance, in this case one could (as a purely hypothetical example) approximate $|x|$ by a step function $f_n$ discretized along the mesh $\{\frac{j}{n}: -N\leq j \leq N\}$. Such a step function can be expressed as a simple function. The integral of this function with respect to $\mu$ should be computable in principle, and you can do some additional work to show that the limit of the integrals is the integral of $|x|$.
A: This is how I would approach this. Also, I remember being surprised by how approximating with simple functions was rarely used when actually asked to calculate an integral.
Dislaimer: I am also currently studying measure theory, in fact my exam is tomorrow. I appreciate any feedback.
First of all I would use that for any non negative function $f$, define $g(t) := \mu(\{x \in \mathbb{R}: f(x) > t\}) $ we have
$$\int_\mathbb{R} f d\mu(x) = \int_{[0, \infty)} gd\lambda(t) $$
This is not trivial to show, but can be useful. In the next step I restrict $[0, \infty)$ to $[0, 1)$ since for $t >1$ $g(t) = 0$.
$$ \int_{(-1,1)}|x |d \mu(x) = \int_{[0,1)} \mu(\{x \in \mathbb{R}: |x| > t\})d\lambda(t)$$
$$ = 2 \int_{[0,1)} \mu(\{x \in \mathbb{R}: x > t\})d\lambda(t) $$
$$= 2 \int_{[0,1)} \mu([t, 1))d\lambda(t)$$
$$= 2 \int_0^1 d\lambda(t) \int_t^1 \frac{1}{1+x^2}dx$$
If we change limits from $0 < t < 1 , t <x <1$ to $0<t<x,  0<x<1$ (and Fubini)
$$= 2 \int_0^1 dx \int_0^x \frac{1}{1+x^2}dt$$
$$= 2 \int_0^1 \frac{x}{1+x^2}dx$$
$$=\ln(2)$$
