How to show the following function is Riemann Integrable We have not covered and thus it is not valid to use ideas such as Lebesgue integration, measure, etc. I was given a hint to use either squeeze theorem, or the criterion about if Riemann integrable functions are equal except on a finite set then they have the same integral.
id like to be able to show that the following function is Riemann integrable on $[0,1]$
$$f_{2}(x)=\begin{cases} 1/n &\text{if $ \frac{1}{n+1} \lt x \lt \frac{1}{n}$} \\ 0 &\text{else} \\ \end{cases}$$
My thoughts,
$f_{2}(x)$ is zero at all rational points with numerator 1,
it is only non zero at irrational for example
$$f_{2}(\pi/6)=\frac{1}{2}$$
$$f_{2}(e/11)=\frac{1}{4}$$
But I dont know how to comine this via comparing functions/squeeze theorem etc.
I already proved that $$f_{1}(x)=\begin{cases} 1/n &\text{if  $x=\frac{1}{n}$} \\ 0 &\text{else} \\ \end{cases}$$ is Riemann integrable on $[0,1]$ with a value of zero. Maybe this could come in some use. I dont need to use it though its just a thought. How else could I go about showing it though? I am overall confused though and looking for help. Thanks
 A: You can start by showing that if $f \colon [a,b] \rightarrow \mathbb{R}$ is a bounded function and $c \in (a,b)$ such that both $f|_{[a,c]}$ and $f|_{[c,b]}$ are Riemann integrable, then $f$ is Riemann integrable and
$$ \int_a^b f(x)\, dx = \int_a^c f(x)\, dx + \int_c^b f(x) \, dx. $$
Then, prove that for any $a < x_0 < b$ and $y_0 \in \mathbb{R}$, the function
$$ f_{x_0,y_0}(x) := \begin{cases} y_0 & x = x_0 \\ 0 & x \neq x_0 \end{cases} $$
is Riemann integrable on $[a,b]$ with integral zero. The argument will be the same argument as for your $f_1$.
Now, choose some $\frac{1}{2} < a_1 < 1$. On $[a_1,1]$, your function $f$ is just $1 - f_{1,1}(x)$ and thus, is Riemann integrable. On $[\frac{1}{2},a_1]$, your function is just $1 - f_{\frac{1}{2},1}$ and thus is also Riemann integrable. By the result above, $f|_{[\frac{1}{2},1]}$ is Riemann integrable. Continuing this way inductively, you can see that $f|_{[\frac{1}{n},1]}$ is Riemann integrable for all $n \in \mathbb{N}$. Alternatively, if you already know that a function with finitely many discontinuities is Riemann integrable, you can skip all of the above.
Finally, using the definition of the Riemann integrable directly, show that if $f \colon [a,b] \rightarrow \mathbb{R}$ is a bounded function such that $f|_{[a + \frac{1}{n},b]}$ is Riemann integrable for all sufficiently large $n$, then $f$ is Riemann integrable and
$$ \int_a^b f(x) \, dx = \lim_{n \to \infty} \int_{a + \frac{1}{n}}^b f(x)\, dx. $$
