The definition of a simple function is that let ($\Omega$,F, $\mu$) be a measure space and for let $\Omega$ be written as disjoint union of $A_i$'s where $i=0,1,..,n$ . A function $f$ from $\Omega$ to R is called simple if there exist real constants $\alpha_i$'s such that $f$ can be written in the form
$$f=\sum^n_{i=0} \alpha_i \space \chi_{A_i}$$
for all values of $\omega $'s in $\Omega$ where $\chi_{A_i}$ is the indicator function.
The integral of $f$ over a measurable set $E$ is defined as $\sum \alpha _i \cdot\mu(E ∩A_i)$
I have two questions:
- Do we use the same constants $\alpha _i$?
- How can we take the integral of a function by dividing the domain into finite "pieces" $A_i$ ?
For the first question, yes they are the same constants. See below.
For the second question, we aren't taking the integral by first dividing the domain into finite pieces. What we have is a simple function, which is a function whose range is finite. That means the domain is naturally already divided for us. Since functions are well-defined, if $i \neq j$, the set of $x$ where $f(x) = \alpha_{i}$ is disjoint from the set of $x$ where $f(x) = \alpha_{j}$ (otherwise, if they weren't disjoint, a single input would result in two outputs!).
Think about why this definition for the integral of a simple function makes sense. We want this integral to agree with our Riemann integral (if we are using Lebesgue measure). What if you had the following simple function $f: \Bbb R \to \Bbb R$ defined by $$f(x) = \begin{cases} 1 & 0 \leq x < 1 \\ 2 & 1 \leq x < 2 \\ 3 & 2 \leq x < 3 \\ 4 & 3 \leq x < 4 \\ 0 & \text{else} \\ \end{cases}.$$
If you were to draw this out, and think about the integral of this function over $\mathbb{R}$, it would amount to drawing rectangles and finding their areas, and adding them up. For example, one rectangle would have area $1( 1 - 0) = 1 \mu([0,1)]$, if $\mu$ is Lebesgue measure. Another rectangle would have area $2(2 - 1) = 2 \mu([1,2))$. You would add the areas of the rectangles (alternatively, just calculate the Riemann integral of this function -- you'll get the same sum of areas of these rectangles).
Anyway, the point is, we want our definition of integral of a simple function to be consistent with this, and we also want to extend this definition to simple functions whose domain isn't split nicely into intervals as above. For example, think about the characteristic function $\chi_{\Bbb Q} (x) = \begin{cases} 1 & x \in \Bbb Q \\ 0 & x \in \Bbb R - \Bbb Q \\ \end{cases}$. This function is not Riemann integrable since its set of discontinuities does not have measure $0$, but it is Lebesgue integrable based on our definition of integral for simple functions, and the integral is easy to compute. $\int \limits_{\Bbb R} \chi_{\Bbb Q}(x) \,d\mu = 1 \mu(\Bbb Q) + 0 \mu(\Bbb R - \Bbb Q) = 1* 0 + 0* \infty = 0 + 0 = 0$.