Prove that $f$ is Riemann-integrable on $[a,b]$

Assume that $\{r_n\}$ is an index of rational numbers in the interval $[a,b]$ and $\{v_n\}$ is a sequence of non-zero real numbers which converges to $0$.

Define $f:[a,b] \to \mathbb R$ this way :
If $x=r_n$ , $f(x)=v_n$
If $x \notin \mathbb Q \cap [a,b]$ , $f(x)=0$

Prove that $f$ is Riemann-integrable on $[a,b]$.

My try :

I observed that $f$ is discontinuous on each interval and is not monotonic on any interval. That makes it hard to prove the statement above. I don't know what to do next...

• I assume you are not familiar with Lebesgue's integrability condition? – Clement C. Dec 27 '16 at 15:51
• @ClementC. That's true ! i don't know anything about it ... i just happened to hear the name of it !!! :D – Arman Malekzadeh Dec 27 '16 at 15:52
• What are $r_1,r_2$. – hamam_Abdallah Dec 27 '16 at 16:05
• @SalahFatima rational numbers can be ordered ... $r_1$ is the first rational number in $[a,b]$ and $r_2$ is the second one. – Arman Malekzadeh Dec 27 '16 at 16:07
• @ClementC. Sir, i thought you were trying to say something... what was it? about lebesgue's integrability condition... i'm asking about riemann integration ... – Arman Malekzadeh Dec 27 '16 at 16:13

I think in this way it should work:

Consider for the sake of simplicity $v_n >0$ for each $n \in \mathbb{N}$. Let $1 > \epsilon >0$ By definition there exists $n_m \in \mathbb{N}$ such that $v_n < \epsilon$ for each $n \ge n_m$. Now observe that one can assume that $a = r_1 < r_2 < . . . < r_{n_m} = b$. Take $\delta$ to be $\epsilon\min\{ | r_i - r_j |\}/2$ Consider the partition $P =r_1< r_1 + \delta/2 < r_2 . . . r_{n_m - 1} + \frac{\delta}{2^{n_m - 1}} < r_{n_m}$ which now i rename $x_{1}^0 < x_{1}^1 < . . . < x_{n_m}^0$. We have that $U(P) = \sum_{i=1}^{n_m-1} v_i ( x_{i}^1 - x_{i}^0) + \sum_{i=2}^{n_m} \sup_{[ x_{i-1}^1, x_{i}^0]}(f(x)) (x_{i}^0 - x_{i-1}^1)$ Now you can extimate this upper riemann sum observing:

1. our choose of $n_m$ gives $\sup_{[ x_{i-1}^1, x_{i}^0]}(f(x)) < \epsilon$
2. our choose of the partition gives $\sum_{i=1}^{n_m-1} v_i ( x_{i}^1 - x_{i}^0) \le \max\{v_1, . . .,v_{n_m}\}\ \epsilon$

Thus you get $U(P) \le \max\{v_1, . . .,v_{n_m}\}\ \epsilon + \epsilon (b - a)$ and you can conclude, because a convergent sequence of real numbers is bounded, that $U(P) \rightarrow 0$, thus the claim since it's obvious that $L(P) \ge 0$ (I supposed $v_n \ge 0$, otherwise you have to do the same thing for lower sums).

Lemma (not hard to prove): If $f_1,f_2,\dots$ are Riemann integrable (RI) on $[a,b],$ and $f_n\to f$ uniformly on $[a,b],$ then $f$ is RI on $[a,b].$

In our problem, we have

$$f(x) = \sum_{k=1}^{\infty}v_k\chi_{\{r_k\}}(x).$$

Now each summand above is RI, hence so is $S_n(x) =\sum_{k=1}^{n}v_k\chi_{\{r_k\}}(x)$ for any finite $n.$ For any $x\in [a,b],$ we have

$$|f(x) - S_n(x)| = \sum_{k=n+1}^{\infty}v_k\chi_{\{r_k\}}(x) \le \sup \{v_{n+1}, v_{n+2}, \dots \}.$$

The supremum on the right $\to 0$ by hypothesis. Hence $S_n \to f$ uniformly on $[a,b],$ and we're done by the lemma.

• Very smart way to avoid the deep Lebesgue's criterion for Riemann integrability. +1 – Paramanand Singh Dec 28 '16 at 4:43
• What is $\chi_{r_k}$? – Arman Malekzadeh Jan 10 '17 at 5:41
• It's the function that is $1$ at $r_k,$ and $0$ everywhere else. – zhw. Jan 10 '17 at 7:19

Let $x$ not in $Q\cap [0,1]$, suppose that $f$ is not continuous at $x$, there exists $c>0$ and a sequence $x_m$ such that $lim_nx_m=x$ and$|f(x_m)|>c$.

We have $x_n\in Q\cap [a,b]$, and $f(x_m)=v_{g(m)}$ where $x_m=r_{g(m)}$. The sequence of $x_m$ contains infinite distinct terms. This implies that for every $M>0$ there exists $L$ such that $m>L$ implies that $g(m)>M$. Since $lim_nv_n=0$, there exists $M_c$ such that $n>M_c, |v_n|<c$, we can choose $L_c$ such that $m>L_c$ implies that $g(m)>M_c$. We deduce that $m>L_c$ implies that $|f(x_m)|=|v_{g(m)}|<c$. Contradiction.

The Lebesgue integrability condition implies that $f$ is Riemann integrable.

• Read the comments below the question -- the OP does not know of Lebesgue's integrability condition. – Clement C. Dec 27 '16 at 17:17
• A good reference of Lebesgue integrability condition is given, and it contains even a proof, OP can read and learn it. – Tsemo Aristide Dec 27 '16 at 17:23
• Yes, I know what is in the comments: I wrote them. But this answer won't help the OP if, for instance (s)he is practicing for a test, or to get a better grip on the definition and basic properties of Riemann integration. You suggest a flamethrower to someone who is explicitly (at least in the comments) asking about how flints work. – Clement C. Dec 27 '16 at 17:26
• I don't know exactly the teacher who gives the test, but believe, OP may have to apply a result proved in class if such a question appears in his exam, anyway I don't have his course notes in front of me to show that they contain something similar than the Lebesgue integrability condition. – Tsemo Aristide Dec 27 '16 at 17:29