I am dealing with the function $f(x)=\begin{cases} \frac{1}{n} & \text{if }\frac{1}{n+1}<x<\frac{1}{n},\:n\in\mathbb{N},\\ 0 & \text{ otherwise.} \end{cases}$ I want to show it is Riemann integrable without using the fact that every bounded function containing at most countably many discontinuities is Riemann integrable.
I have considered using the fact that the composition of a function $g$ that is Riemann integrable on $[a,b]$ with $g([a,b])\subset[c,d]$ and $h$ that is continuous on $[c,d]$ is Riemann integrable, ie. $h\circ g\in\mathcal{R}$. I think using Thomae's function as the $g$ is in the solution by I couldn't find a suitable $h$.
Other options include the squeeze theorem for integrals (although I am told the solution for this should be simple, and I find squeeze theorem is often lengthy), as well as linearity of the integral, the fact that the product of two Riemann integrable functions is Riemann integrable, and the additivity of the Riemann integrable.
Consider a partition $P$ with subintervals of the form
$$[1/(n+1), 1/(n+1) + \epsilon/2^{n}],\,\,[1/(n+1) + \epsilon/2^{n},1/n - \epsilon/2^{n}],\,\, [1/n - \epsilon/2^{n},1/n],$$
for $n = 1, 2, \ldots, m-1,$
along with $[0,\epsilon/2^{m}]$, $[\epsilon/2^{m}, 1/m - \epsilon/2^{m}]$, and $[1/m - \epsilon/2^{m},1/m]$
Then the upper sum is
$$U(P,f) = \sum_{n=1}^{m} \frac{1}{n}\left(\frac{1}{n}-\frac{1}{n+1}\right) + \frac{1}{m^2} \\ = \sum_{n=1}^{m} \frac{1}{n^2(n+1)} + \frac{1}{m^2},$$
and the lower sum is
$$L(P,f) = \sum_{n=1}^{m} \frac{1}{n}\left(\frac{1}{n}-\frac{1}{n+1} -\frac{2\epsilon}{2^n}\right) + \frac{1}{m}\left(\frac{1}{m} - \frac{2\epsilon}{2^m}\right) \\= \sum_{n=1}^{m} \frac{1}{n^2(n+1)} + \frac{1}{m^2} - \epsilon\sum_{n=1}^{m}\frac{1}{2^{n-1}}.$$
The difference satisfies
$$U(P,f) -L(P,f) < 2\epsilon.$$
Hence, $f$ is integrable by the Riemann criterion.