Riemann-integrability of $f(x)=2x\sin\frac{1}{x}-\cos\frac{1}{x}$ on $[0,1]$ Determine whether  $\displaystyle f(x)=2x\sin\frac{1}{x}-\cos\frac{1}{x}$ 
is Riemann-integrable on $\displaystyle [0,1]$

Attempt: I can clearly see that $\displaystyle f$ is derivative of $\displaystyle g(x)=x^2\sin\frac{1}{x}$ 

$\displaystyle g(1)-\lim_{x \to 0} g(x)=\sin(1)$

Is it correct? Given function $f(x)$ is discontinuous only at $x=0$ in $[0,1]$. So, it should be Riemann-integrable.
clearly $f(x)$ is bounded in $[0, 1]$ and continuous also except for $x = 0$. Hence it is Riemann integrable in $[0, 1]$. and you don't need to worry about the anti-derivative of $f(x)$.
How I think about this: suppose I divide $[0, 1]$ into $N$ equal partitions indexed from $0$ to $N - 1$.  Then partition $i$ goes from $i \over N$ to $i + 1 \over N$.

For reasonable resolution on $\cos({1\over x})$ we need the fractional change in $x$ to be less than some threshold $\delta$, so $(i + 1) &lt; i (1 + \delta)$ or $i &gt; {1 \over \delta}$.  So assume the portion of the integral for $i &gt; {1 \over \delta}$ is good and the portion $i &lt; {1 \over \delta}$ is "bad".

$i$ goes from $0$ to $N - 1$ so the portion for which $i &lt; {1 \over \delta}$ is approximately ${1 \over \delta N}$ .  $\delta$ is finitely small, $N$ goes to the limit of $+\infty$, so the fraction of the integral which is "bad" goes to $0^+$.  Since the value is bounded the contribution of the "bad" fraction to the integral thus has limit $0$.  That means as the number of samples goes to $\infty$ the integral will converge on the correct value.