# Proving the integral of a bounded function with finite discontinuities exists? (example)

I have this problem:

Prove that if $f(x)>0$ for a finite number of points and f(x)=0 for all other points in $[0,1]$, $f$ is Riemann integrable and the integral equals $0$.

Intuitively, this seems clear to me. You can just make the intervals of the partition containing the non-zero points arbitrarily small and then since their width is small, the upper and lower sums are just $0$.

However, I'm really struggling to prove this rigorously. I've looked at similar proofs (including on this site) for the general case where there are a finite number of discontinuities, but they're not clicking with me. Any help would be greatly appreciated!

• The condition on $f$ looks strange. Should it rather be that $f(x)\gt0$ for a finite number of points $x$ and $f(y)=0$ for all other points $y$? – edm Dec 19 '17 at 4:31
• Yes, I'll edit that! – leecarvallo Dec 19 '17 at 15:10

Your idea is prefectly fine, and it is not difficult to implement it in full rigor.
If we have a finite number of points $x_1,x_2,\ldots,x_K$ in $[0,1]$, for any $N\in\mathbb{N}$ large enough the intervals with length $\frac{1}{N}$ centered at them do not overlap, hence for any uniform partition of $[0,1]$ in $2N$ subintervals, each subinterval contains at most one "troublesome" point. Let $M$ be the maximum of $f$ over $\{x_1,x_2,\ldots,x_K\}$. The lower Riemann sum associated with the previous partition is zero, and the value of the upper Riemann sum is bounded by $\frac{KM}{2N}$, which goes to zero as $N\to +\infty$. This proves that the Riemann integral of $f$ over $[0,1]$ is zero.

• Thank you! This makes a lot of sense to me. The only thing I don't get is why you chose to have 2N subintervals. Could you explain the intuition there? – leecarvallo Dec 19 '17 at 17:49
• @leecarvallo: just to be really sure that once a uniform partition (in a sufficiently large number of parts) is picked, there is at most one troublesome point for each subinterval, so at most $K$ troublesome subintervals. – Jack D'Aurizio Dec 19 '17 at 17:51

This is false. Define $f=0$ on $\mathbb Q\cap [0,1],$ $f(1/\sqrt 2)= 1,$ and $f=-1$ elsewhere. Then $f$ satisfies the hypotheses. But $U(f,P)-L(f,P) \ge1$ for every partition $P,$ hence $f$ is not Riemann integrable on $[0,1].$

• @egreg On the contrary, this is a perfectly valid counterexample for the question as stated. If the OP were to specify that the function is non-negative, this of course would not be up for consideration. – Alex Ortiz Dec 19 '17 at 7:23
• How to write a non overlapping finite family mathematically? – user1942348 Mar 1 '18 at 17:27

Since OP struggles for a formal proof, I think it'll be easier for him/her to understand this from the $\delta$-$\epsilon$ definition without using additional theorems.

The idea of my proof is that on a street $[0,1]$ with finitely many street lamps (discontinuities), I make their width as little as possible so that less space is occupied.

Let $f:[0,1]\to\Bbb{R}_{\ge 0}$ be a nonnegative function of finite support. (i.e. $|\mathrm{supp}(f)|<\infty$, where) $$\mathrm{supp}(f)=\{x\in[0,1]\mid f(x)\ne0\}$$ Let $\epsilon>0$ and $\mathcal{P}=\{0=x_0,\dots,x_n=1\}$ with tags $\{c_1,\dots,c_n\}$ be any tagged partition of $[0,1]$ such that $||\cal P||<\epsilon$. (i.e. each subdivision of $\cal P$ has maximum length controlled by $\epsilon$) The very definition of Riemann integrability suggests us to write the Riemann sum $$S(f,\mathcal{P})=\sum_{i=1}^n f(c_i)(x_i-x_{i-1})<\left(\sum_{i=1}^n f(c_i)\right) \epsilon$$ Note that since $f$ is nonnegative, we can take away the absolute value sign. Observe that the contribution to the Riemann sum by the tags outside $\mathrm{supp}(f)$ is zero. $$\require{cancel} S(f,\mathcal{P})<\left(\sum_{i=1}^n f(c_i)\right) \epsilon=\left(\sum_{i\in\mathrm{supp}(f)} f(c_i)+ \cancel{\sum_{i\notin\mathrm{supp}(f)} f(c_i)}\right) \epsilon \\ \le \underbrace{|\mathrm{supp}(f)| \sup_{x\in[0,1]} |f(x)|}_{< \infty}\,\epsilon$$ since $f$ is bounded.

Since the choice of $\epsilon$ and $\mathcal{P}$ is arbitrary, we conclude that $$\int_0^1 f=0.$$