Prove that the function $f(x)=\sin\frac{1}{x} \ (x\ne 0); f(0)=0$ is integrable on $[0,1]$. I am trying to approach this integral using the Riemann criterion. For that being, I need to prove that there is a partition of the interval where the upper sum - lower sum is less than epsilon. However I do not understand which partition I should take. 
 A: Your function $ f(x) = \sin (1/x)$ is bounded between $-1$ and $1$
The contribution of your function over an interval of length $\epsilon$ to the Reimann's sum is at most $2\epsilon$
Note that your function is continuous over $[0,1-\epsilon]$ for any small  $\epsilon >0$ 
Your partition is the union of a partition on $[0,1-\epsilon]$ and $[1-\epsilon,0]$
Can you take over from here?    
A: A bounded function that is continuous everywhere on a compact interval, except at one point, is Riemann integrable.
We will use the following criterium of integrability. 
$f:[a,b]\to \mathbb{R}$ is Riemann-integrable if the following condition is satisfied:
For all $\epsilon > 0$, there is a partition $P$ of $[a,b]$ such that $U(f,P) - L(f,P) < \epsilon$.
Proof: Let $z$ be the point of discontinuity. We assume without loss of generality that $z$ is not a boundary point of $[a,b]$, otherwise the proof must be slightly adapted.  Let $\epsilon >0$.  Put $x_{n-1} = z- \mu, x_{n+1} = z+ \mu$ where $\mu$ is so small that $x_{n\pm1} \in (a,b)$ and such that the distance between these points is small.
Because $f\vert_{[a, x_{n-1}]}$ is continuous, it is integrable, so there is a partition $P_1:= (x_0 = a, \dots, x_{n-1})$ of $[a,x_{n-1}]$ such that $U(f\vert_{[a,x_{n-1}]},P_1) - L(f\vert_{[a,x_{n-1}]},P_1)$ is small . Similarly, there is a partition $P_2 = (x_{n+1}, \dots x_r=b)$ of $[x_{n+1}, b]$ with a similar condition.
Consider the partition $P:= P_1 \cup P_2 \cup \{z\}$.
Then $$U(f,P) - L(f,P) = \sum_{i=1}^{n-1} (M_i - m_i)(x_i - x_{i-1} ) + (M_n-m_n)(x_n - x_{n-1}) + (M_{n+1}-m_{n+1})(x_{n+1} - x_{n}) + \sum_{i=n+2}^r (M_i - m_i)(x_i - x_{i-1} )$$
and all these terms can be made small.
A: This function is continuous and therefore according to Reimann-Lebesgue theorem is integrable.
A: Suppose $f$ is bounded on $[a,b]$ and Riemann integrable on $[c,b]$ for each $c, a<c\le b.$ Then $f$ is  Riemann integrable on $[a,b].$
Proof: Suppose $|f|\le M$ on $[a,b].$ (Assume $M>0.$) Choose $c\in (a,b]$ such that $c-a< \epsilon/(2M).$ Because $f$ is Riemann integrable on $[c,b],$ there is a partition $P$ of $[c,b]$ such that
$$U(P,f,[c,b]) - L(P,f,[c,b]) < \epsilon/2.$$ Define $P'= P \cup \{a\}.$ Then
$$U(P',f,[a,b]) - L(P',f,[a,b])$$ $$ \le 2M(c-a) + U(P,f,[c,b]) - L(P,f,[c,b]) < \epsilon/2 + \epsilon/2.$$
This proves the result, which implies your result for $\sin(1/x).$
