Let $\{a_n\}$ be a sequence of real numbers that converges to $1$. Define $f:[0,2]\to \mathbb{R} $ by $$ f(x)= \begin{cases} 1&\text{if }\, x\in \{a_n\}\\ 0& \text{otherwise}\\ \end{cases} $$ Prove $f$ is Riemann integrable on $[0,2]$
I was trying to solve this question and got stuck on exactly how to prove the function is integrable. I tried to use the fact that a convergent sequence has content $0$, and that a bounded real valued function is Riemann integrable if its discontinuities have content $0$. However, I'm not sure where to go from there. Any help or hints is greatly appreciated!
Given $\varepsilon>0,$ one has infinitely many members of the sequence within the set $[1,1+\varepsilon/2],$ and only finitely many members of the sequence outside of that interval but still within the interval $[1,2].$ Each of those finitely many is within an open interval whose length is so small that the sum of all of those finitely many lengths does not exceed $\varepsilon/2.$ Use a partition of the interval $[1,2]$ whose points are the endpoints of those intervals. Then the upper sum is no more than $\varepsilon.$ Thus no matter how small $\varepsilon>0$ is, there is a partition whose upper sum is not more than $\varepsilon.$