Is $f(x)=\sin(1/x),\;x\ne0$, $f(0)=0$, Riemann integrable on $[0,1]$? Is the function $\sin \frac{1}{x}$ Riemann integrable on an interval containing $0$?
 A: This is late but will be useful for future readers.
PROOF
Let $\epsilon>0$ be given  but arbitrarily small. Choose $x_1\in(0,1]$ such that $1-x_1<\epsilon/2.$ Then, the set $P=\{0,x_1,1\} $ is a patition. The upper and lower Darboux sums are given by  
\begin{align}U(f,P)=\sum^{2}_{k=1}M_k (x_k-x_{k+1}),\;\;\text{where}\;\;M_{k}= \sup\{f(x):\;x_{k-1}\leq x<x_{k}\},\end{align}
\begin{align}L(f,P)=\sum^{2}_{k=1}m_k (x_k-x_{k+1}),\;\;\text{where}\;\;m_{k}= \inf\{f(x):\;x_{k-1}\leq x<x_{k}\}.\end{align}
By computation
\begin{align}U(f,P)&=\sum^{2}_{k=1}M_k (x_k-x_{k+1})\\&=M_1 (x_1-x_{0})+M_2 (x_2-x_{1})\\&= 1-x_{1},\;\;\text{where}\;\;M_{1}=0,\,M_{2}=1,\end{align}
\begin{align}L(f,P)&=\sum^{2}_{k=1}m_k (x_k-x_{k+1})\\&=m_1 (x_1-x_{0})+m_2 (x_2-x_{1})\\&=-(1-x_{1}),\;\;\text{where}\;\;m_{1}=0,\,m_{2}=-1.\end{align}
Thus,
\begin{align}U(f,P)-L(f,P)&=2(1-x_{1})<\epsilon.\end{align}
So, given any $\epsilon$, choose $P=\{0,x_1,1\} $ such that $1-x_1<\epsilon/2.$ Then,
\begin{align}U(f,P)-L(f,P)<\epsilon.\end{align}
Hence, $f$ is integrable.
A: There are two proofs: a short one and a longer one.
First Proof: $f$ is bounded on $[0, 1]$ since $\left| \sin \frac{1}{x} \right| \leq 1$. $f$ is continuous except at $x = 0$ (since limit as $x \to 0$ doesn’t exist), so the set of discontinuities is the single point $x = 0$ and this set has measure zero. There is a well known theorem stating that if a function is bounded and continuous except on a set of measure zero it is (Riemann) integrable. If you’re not familiar with measure, this answer probably won’t help you much, however.
The second proof is based on the upper $U$ and lower $L$ sums. $f$ is integrable if given any $\varepsilon > 0$ there is a partition such that $U – L < \varepsilon$. So given $\varepsilon > 0$, consider the intervals $[0, \varepsilon]$ and $[\varepsilon, 1]$. Since $f$ is bounded and continuous on $[\varepsilon, 1]$ it is integrable, so there is a partition $P_1$ such that $U - L < \varepsilon$. On $[0, \varepsilon]$, the most $U - L$ could be (for any partition, $P_\varepsilon$) is $2 \varepsilon$ (since $\max_{x \in \mathbb{R}} \sin x = 1$, $\min_{x \in \mathbb{R}} \sin x = - 1$, and length of the interval is $\varepsilon$). Now consider the partition of $[0, 1]$ given by $P_1$ union $P_e$ and look at $U - L$. We have $|U - L|$ for $[0, 1]$ is less than or equal to the sum of $U - L$ for the two partitions $P_1$ and $P_e$, which is less than $\varepsilon + 2 \varepsilon = 3 \varepsilon$. So $U - L < 3\varepsilon$, which means it can be made arbitrarily small. Thus $f$ is integrable on $[0, 1]$.
