$ x \sin(\frac{1}{x}) $ Riemann integrable on [-1,1]? $$ g(x) = x \sin(\frac{1}{x}) \text{ if } x \neq 0 \text {, and } 0 \text{ otherwise } $$
Is $ g $ Riemann Integrable on the interval $ [-1, 1] $?
Since $ g $ is continuous at $ 0 $ , it holds that $ g $ is continuous on the compact domain $ [-1,1] $. Therefore $ g $ is Riemann Integrable. However, when I try to give a $ \epsilon, \delta $ proof, I somehow manage to find a bound independent of $ \delta $.
$$ \forall \epsilon > 0, \exists \delta > 0, \text{ s.t } \forall P, m(P) < \delta \implies |R(g, P) - l | < \epsilon $$
$ |R(g, P) - l | = |\sum_{x_j \in P} x_j \sin(\frac{1}{x_j}) (x_j - x_{j-1}) - l | $
$ \leq |\sum_{x_j \in P} x_j \sin(\frac{1}{x_j}) (x_j - x_{j-1})| +  | l | $ (by Triangle Inequality)
$ \leq \sum_{x_j \in P} | x_j \sin(\frac{1}{x_j}) (x_j - x_{j-1})|  + | l | $ (by Triangle Inequality)
$ \leq \sum_{x_j \in P} | x_j| |x_j - x_{j-1}|  + | l | $ (since $ -1 \leq \sin(x) \leq 1 $)
$ \leq \sum_{x_j \in P} |x_j - x_{j-1}|  + | l | $ (since $ x_j \in P $ and points in P are between $ -1 $ and $ 1 $)
$ = 1 - (-1) + |l|  = 2 + |l| = \epsilon \ ???$
What should I "choose" delta to be here?
 A: If $$g(x):=\begin{cases} x\sin\left(\frac{1}{x}\right), &\quad x\not=0\\ 0, &\quad x=0\end{cases},$$ and since that $\displaystyle \lim_{x\searrow 0}g(x)=g(0)$, so we have that $g$ is continous on $[-1,1]$. Now, for all $\varepsilon>0$ and since that $g$ is continous on compact set $[-1,1]$, then we have that $g$ is uniformly continous on $[-1,1]$. So, there exists $\delta>0$ such that if $x_{1},x_{2}\in [-1,1]$ and $|x_{1}-x_{2}|<\delta$, then $|g(x_{1})-g(x_{2})|<\varepsilon/(1-(-1))=\varepsilon/2$. Now, you can choose $n$ such that $\frac{2}{n}<\delta$. Let $P: x_{0}=-1<x_{2}<\ldots<x_{n}=1$, where $x_{j}=x_{j-1}+\frac{2}{n}$. Then, $M_{j}-m_{j}<\varepsilon/2$. Therefore, $$U(g,P)-L(g,P)\leqslant \sum_{j=1}^{n}(M_{j}-m_{j})\Delta x_{j}<\frac{\varepsilon}{2}\sum_{i=1}^{n}\Delta x_{i}=\varepsilon.$$
Now, you can complete the details.

If $f$ is a bounded function on $[a,b]$, so first we need consider a partition $\mathcal{P}$ for interval $[a,b]$ as follows $$\mathcal{P}: x_{0}=a<x_{1}<\ldots<b=x_{n},$$with $$||\mathcal{P}||=\max_{1\leqslant i \leqslant n} \Delta x_{i} \quad \text{and} \Delta x_{i}=x_{i}-x_{i-1}.$$
Setting $$m_{i}(f)=\inf_{x_{i-1}<x<x_{i}}f(x) \quad \text{and} \quad M_{i}(f)=\sup_{x_{i-1}\leqslant x <x_{i}} f(x).$$
So, we can define the lower partial sum $L(f,\mathcal{P})$ and upper partial sum $U(f,\mathcal{P})$ as $$L(f,\mathcal{P}):=\sum_{1\leqslant i \leqslant n}m_{i}(f)\Delta x_{i} \quad \text{and} \quad U(f,\mathcal{P}):=\sum_{1\leqslant i \leqslant n}M_{i}(f)\Delta x_{i}.$$
