Let $f:[-1,1]\to\mathbb{R}$ be the function defined by
$f(x)=\begin{cases} 1&\text{ if }x=0\\ 0&\text{ if }x\neq 0.\end{cases}$
Prove that the upper integral $\int_{-1}^1f(x)dx$ is equal to $0$.
Here is my attempt:
fix $\epsilon > 0$. If we compute the upper Darboux sum using the division $D=\{-1,-\frac{\epsilon}{2},\frac{\epsilon}{2},1\}$ we get:
$S(D) = \sum_{i=1}^{3} \delta_i F_i$ where $F_i = sup\{f(x): x_{i-1} < x < x_i\}$
$\sum_{i=1}^{3} \delta_i F_i = (-\frac{\epsilon}{2} - (-1))F_1 + (\frac{\epsilon}{2} - (-\frac{\epsilon}{2}))F_2 + (1 -\frac{\epsilon}{2})F_3 $
since $ 0 \notin[-1, -\frac{\epsilon}{2}]$ and $ 0 \notin[\frac{\epsilon}{2}, 1], F_1 = F_3= 0$. Since $0 \in[-\frac{\epsilon}{2}, \frac{\epsilon}{2}]$, then $F_2 = 1$.
Then we have that:$(-\frac{\epsilon}{2} - (-1))F_1 + (\frac{\epsilon}{2} - (-\frac{\epsilon}{2}))F_2 + (1 -\frac{\epsilon}{2})F_3 = (1-\frac{\epsilon}{2})(0) + (2\frac{\epsilon}{2})(1) + (1-\frac{\epsilon}{2})(0) = 0 + \epsilon$.
It follows that $\forall_{\epsilon>0}$ there exists a division such that $0 < S(D) < \epsilon$. Also $f(x) \geq 0$ so $S(D) \geq 0$ for any division. Therefore, from the definition of the infimum $inf\{S(D): D \text{ is a division of }[-1,1]\} = 0 = \text{ upper}\int_{-1}^1f(x)dx$
is this proof OK?