Does existence of anti-derivative imply integrability?

The function $f$ need not be Riemann integrable over any non-trivial interval! It can be even arranged that $f$ is bounded. See Volterra's Function.


Take $f(x)=\begin{cases} x^2\sin (1/x^2), &x\ne 0, \\ 0, &x=0. \end{cases}\quad$ Then $g=f'$ exists everywhere but is unbounded over $[-1,1]$. $g$ thus has a primitive but is not Riemann integrable.