Consider the function $f$ defined by
$f(x)=\left\{ \begin{array}{rcl} 0 & \mbox{for} & x=\frac{1}{2}\mbox{ }\mbox{ or } \mbox{ }x=\frac{3}{2}\\ 1 & \mbox{o.c.} \end{array}\right.$
prove that $f(x)$ is integrable on $[0,2]$. Compute the integral.
Proof. Let $\epsilon>0$. Set $\delta=min\{1/2,\epsilon/2\}$.
Then $P=\{0,\delta,2\}$
Then $U(f,P)=M_{1}(\delta)+M_{2}(1-\delta)$ and
$L(f,P)=m_{1}(\delta)+m_{2}(1-\delta)$.
Since $f(x)=0$ when $x=1/2 \mbox{ or } x=3/2$ and $f(x)=1 \mbox{ when } o.c.$
Then $M_{1}=M_{2}=m_{2}=1$ and $m_{1}=0$ (This is correct??)
Because if this correct Thus
$U(f,P)-L(f,P)=1(\delta) + 1(1-\delta)-0(\delta) - 1(1-\delta)$
$=\delta - \delta + 1 - 1 + \delta$
$=\delta$
$<\epsilon/2<\epsilon$
How can i prove that the integral of $f(x)=2$ to $[0,2]$??
Any partition $P=\{x_{0},...,x_{n}\}$ of $[0,2]$, the supremum of $f$ on each subinterval $[x_{i-1},x_{i}]$, $i=1,...,n$ is no more than $1$, so $U(f,P)\leq\displaystyle\sum_{i=1}^{n}(x_{i}-x_{i-1})=2$. Now on such subinterval $[x_{i-1},x_{i}]$, no matter if $1/2$ or $3/2$ lies inside, $f$ can always take the value $1$, so $U(f,P)\geq\displaystyle\sum_{i=1}^{n}(x_{i}-x_{i-1})=2$, so the upper integral is $2$, since you have showed that it is integrable, the integral is equal to the upper integral.