Consider the function $f:[0,1] \to \mathbb{R}$ defined by $f(0)=0$ and $$ f(x)=2x\sin\left(\frac{1}{x}\right)-\cos\left(\frac{1}{x}\right). $$ Is $f$ integrable on $[0,1]$?
Ps. Clearly $f$ is discontinuous at $0$ and it has primitive $F(x)=x^2 \sin\left(\frac{1}{x}\right)$. But I don't know whether $\int_0^1 f(x)dx=F(1)-F(0)=\sin 1$. Also, I would say that $f$ is integrable if and only if $g(x)=\cos(1/x)$ for $x>0$ and $g(0)=0$ is integrable on $[0,1]$ (since the remaining term is continuous on $[0,1]$).