Prove that the function $f(x)=\sin\frac{1}{x} \ (x\ne 0); f(0)=0$ is integrable on $[-1,1]$.

Prove that the function$$f(x)=\begin{cases}\sin\dfrac{1}{x}; & x\ne 0\\ 0; & x = 0 \end{cases}$$ is integrable on $[-1,1]$.

I am studying Darboux integral, and I now know monotone functions and continuous functions are integrable on $[a,b]$.

How to prove it?

Hint

Let $f$ be a bounded function defined on $[a,b]$. Then, if $f$ is integrable on every interval of the form $[a+\epsilon,b]$, for every (appropriate) $\epsilon>0$, then $f$ is integrable on $[a,b]$.

Can you prove this at first? Then, how can you use it in the above situation?

Edit/Full proof:

Let $f$ be as supposed and let $\epsilon>0$. What we need to prove is that there exists a partition $\mathcal{P}=\{a=x_0<x_1<\dots<x_n=b\}$ of $[a,b]$ such that: $$U(f,\mathcal{P})-L(f,\mathcal{P})=\sum_{k=0}^{n-1}(M_k-m_k)(x_{k+1}-x_k)<\epsilon$$ where: \begin{align*} M_k&:=\sup\{f(x)|x\in[x_k,x_{k+1}]\}\\ m_k&:=\inf\{f(x)|x\in[x_k,x_{k+1}]\}\\ \end{align*} So, at first, let $M=\max\{1,\sup\{|f(x)||x\in[a,b]\}\}$ and consider that for $\epsilon'=\frac{\epsilon}{4M}$ there exists a partition $\mathcal{Q}=\{a+\epsilon'=x_1<x_2<\dots<x_n=b\}$ such that: $$\sum_{k=1}^{n-1}(M_k-m_k)(x_{k+1}-x_k)<\epsilon'$$ Now, let: $$\mathcal{P}=\{a\}\cup\mathcal{Q}=\{a=x_0<x_1<\dots<x_n=b\}$$ and note that: $$\sum_{k=0}^{n-1}(M_k-m_k)(x_{k+1}-x_k)=(M_0-m_0)(x_1-x_0)+\sum_{k=1}^{n-1}(M_k-m_k)(x_{k+1}-x_k)$$ Note now that: $$(M_0-m_0)(x_1-x_0)=(M_0-m_0)\epsilon'\leq(|M_0|+|m_0|)\epsilon'\leq2M\epsilon'=\frac{\epsilon}{2}$$ So, now we have that: $$\sum_{k=0}^{n-1}(M_k-m_k)(x_{k+1}-x_k)<\frac{\epsilon}{2}+\frac{\epsilon}{4M}\leq\frac{\epsilon}{2}+\frac{\epsilon}{4}<\epsilon$$ So, $f$ is integrable on $[a,b]$.

• I don't think that hint is true: the function $\;f(x)=\begin{cases}\cfrac1x, &x>0\\24,& x=0\end{cases}\;$ is integrable on $\;[\epsilon,1]\;$ , for every $\;\epsilon>0\;$ , yet it is not so in $\;[0,1]\;$ ...and you can define it at zero as you want. – DonAntonio Feb 8 '18 at 14:18
• You are right, $f$ needs to be bounded, as well. Thank you for highlighting this! – Βασίλης Μάρκος Feb 8 '18 at 14:22
• Thanks! I get the idea, but have difficulty formulating it in $\delta-\epsilon$ language. – Hongyan Feb 8 '18 at 14:24
• I updated the hint, I hope this proof helps. – Βασίλης Μάρκος Feb 8 '18 at 14:57