Integral of a simple function 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$ ?

 A: The concept of the simple function becomes clearer if you take the following definition.
Definition: A simple function is a function of real value such that $Im(f)=\{\alpha_0,\alpha_1, \cdots, \alpha_n\}$.
Now, Let $(X,\Sigma)$ a measurable space, you need to prove the following:

$f$ is a simple measurable function if and only if it is written as a
finite linear combination of characteristic functions of measurable
sets.

Suppose first that $f$ is a simple measurable function, then we write:
\begin{equation}
f=\sum_{i=0}^{n}\alpha_{i}\mathcal{X}{f^{-}(\alpha_i)}
\end{equation}
where $\alpha_i\not=\alpha_j$ if $i\not=j$, this implies that $f^{-}(\alpha_i)\cap f^{-}(\alpha_j)=\emptyset$.
And since $f$ is measurable:
$$f^{-}(\alpha_i)=\{x\in X: f(x)\geq \alpha_i\}\cap\{x\in X: f(x)\leq \alpha_i\}\in\Sigma$$
Now, suppose that $f$ is written as a
finite linear combination of characteristic functions of measurable sets:
$$f=\sum_{i=0}^{m}c_{i}\mathcal{X}E_i$$ where $E_i$ are not necessarily disjoint.
If we choose arbitrary x, it has finite possibilities where to place within the intersections of $ E_i $, therefore there will be finite values ​​as output.
So regarding your questions

*

*The constants are the same, but keep in mind that no matter what representation $f$ has, the integral always gives the same result.

*When taking the integral to a simple measurable function, the domain is already divided into pieces, these become $f^{-}(\alpha_i)\cap E$
A: 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$.
