Is "integrability" equivalent to "having antiderivative"?

I am wondering if "a function $f(x)$ is integrable on a domain $D$" this proposition is equivalent to "$f(x)$ has antiderivative on domain $D$". If it is not the case, give me a counter example. Thank you.


There is an even simpler example. Take, e.g.,

$$ f(x) = \begin{cases} 1 & x \geq 0 \\ -1 & x < 0 \end{cases} $$

This function is Riemann-integrable on $[-1, 1]$, but it cannot be the derivative of any function because derivatives cannot have jump discontinuities. (See, e.g., this question.)


Not really. The function

$$f(x)=\begin{cases} 0\text{ if } x\in\Bbb R\setminus \Bbb Q\\\frac 1 q \text{ if }x= \frac p q \in\Bbb Q, (p,q)=1\end{cases}$$

is defined on $\Bbb R$, has period one, and it is Riemann integrable over $[0,1]$ with $$\int_0^1 f=0$$ but the function has no antiderivative at all (it is not differentiable either). It is known as Thomae's function.


There are integrable functions that are not derivatives: Any function that is continuous except at a single point, where it has a jump discontinuity, is an example. (Derivatives have the intermediate value property.)

More interestingly, we can ask whether the existence of an antiderivative ensures integrability. The answer depends on what integral you are considering. There are counterexamples if you mean Riemann or Lebesgue integrals, but the result is true for the Henstock–Kurzweil integral. A nice modern reference where this integral is discussed in detail and this fact is verified is A Modern Theory of Integration, by Robert G. Bartle.

To see an example that this fails for Riemann or Lebesgue integrals, see this answer. See also this related MO question.