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
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]$.