Prove that $f$ is integrable on $[a,b] $ Suppose that $f(x)=0$ for all $x$ in $[a,b]$ except for some $ z $ in $[a,b]$ Prove that $f$ is integrable on $[a,b] $.
My try:If we can show that $f$ is continuous in $[a,b]$,then the result will follow.Thank you.
 A: Hint
consider a partition of the form $P = \{a, z-\delta, z+\delta, b\}$
You can calculate $U(f, P)$ and $L(f, P)$ using this partition, and show that $U(f, P) - L(f, P) < \epsilon$ for some epsilon that depends on delta. If you can make $U(f, P) - L(f, P) < \epsilon$ for any $\epsilon$ by choosing the right partition, it shows that $U(f) = L(f)$ and the function is integrable.
Now to write a "formal" proof, reformulate it so that delta depends on epsilon instead. i.e. 
Let $\epsilon > 0$. Choose $\delta =$ (whatever you worked out above, working backwards). Then the result will follow! Good luck.
A: It's a good try to show continuity at $z$, but instead you would be better off via definition itself.
We can prove the upper and lower Riemann integrals are zero, by using the same partition : pick $\epsilon > 0$ small enough so that $z - \epsilon \in [a,b]$ and $ z+\epsilon\in  [a,b]$.
Now consider the parition of $[a,b] = [a,z-\epsilon] \cup [z-\epsilon,z+\epsilon] \cup [z+\epsilon,b]$.
Note that $\inf f$ is $0$ in all  these intervals (so the lower Riemann sum for this partition is $0$), while $\sup f$ is zero except in the interval $[z-\epsilon,z+\epsilon]$ (hence, the upper Riemann sum is $2\epsilon f(z)$, since we consider the contribution only from that interval, which has length $2\epsilon$ and maximum value $f(z)$).
Now, as $\epsilon \to 0$, the upper Riemann sum also converges to $0$, while the lower Riemann sum was zero anyway. Hence, the integral is well defined and it's value is zero.
A: Continuity would give integrability, but this function cannot be continuous since $\displaystyle \lim_{x \rightarrow z} f(x) = 0 \neq f(z)$, and this condition must be true for every $y \in [a,b]$ if $f$ is indeed continuous on this interval.  However, it isn't too difficult to tackle the problem directly from the definition:
A function is Riemann integrable on $[a,b] \iff$ for any $\varepsilon > 0$, there exists a partition $ \mathcal{P} = [a\!=\!x_1, \ x_2, \ \cdots, \ x_n\!=\!b]$ of $[a,b]$ such that $U(f, \mathcal{P}) - L(f, \mathcal{P}) < \varepsilon$, where:
$$\displaystyle L(f, \mathcal{P}) = \sum_{i} (x_{i+1} - x_i)\inf \Big( \{f(x) \ | \ x \in [x_i, x_{i+1}] \} \Big)$$ 
$$\displaystyle U(f, \mathcal{P}) = \sum_i (x_{i+1} - x_i)\sup \Big( \{ f(x) \ | \ x \in [x_i, x_{i+1}] \} \Big)$$
and $x_i \in \mathcal{P}$.  Now consider any partition $\mathcal{P}$ of $[a,b]$.  The lower sum is always zero because the infimum of the function values along any interval, even the interval containing $z$, is zero.  Further, the supremum of the function values along any interval is $0$ except for the interval containing $z$.  Therefore:
$$U(f, \mathcal{P}) - L(f, \mathcal{P}) = U(f, \mathcal{P}) = \text{width of the interval containing z}$$
So, is $f$ integrable on $[a,b]$?
A: The result that continuous functions are Riemann integrable on a closed interval is a much more difficult result than the following:
If $f$ is monotone on $[a, b]$ then $f$ is Riemann integrable on $[a, b] $. 
Now your function $f$ is monotone on intervals $[a, z] $ and $[z, b] $ and hence it is Riemann integrable on both these intervals and hence it is Riemann integrable on $[a, b] $.
It can be directly proved using upper and lower Darboux sums that changing the value of a function at a finite number of points does not affect its Riemann integrability nor does it affect the value of its Riemann integral. 
