When are Differentiation and Integration Inverse Operations?
Ok I think this answers the question so I'm writing as an answer.
According to the Wikipedia page for absolute continuity, the following are equivalent for a function $f\colon[a,b]\to\Bbb R$:
- $f$ is absolutely continuous
- $f$ is differentiable almost everywhere, the derivative $f'\colon S\to\Bbb R$ is Lebesgue integrable, and $f(x)=f(a)+\int_a^xf'$ for all $x\in[a,b]$. Here, $S$ is a subset of $[a,b]$, $[a,b]\setminus S$ has measure zero, and $\int$ means the Lebesgue integral. (If you like, you can consider $f'$ to be a function on $[a,b]$ by extending to $0$ on $[a,b]\setminus S$.)
One might ask if the Riemann integral works instead, but the question is ill-posed because the Riemann integral can't ignore sets of measure zero. It turns out this problem can't be overcame:
Theorem $1$: If $f\colon[a,b]\to\Bbb R$ is differentiable and $f'$ is bounded, then $f$ is absolutely continuous.
Theorem $2$: There exists a function $f\colon[a,b]\to\Bbb R$ which is differentiable, $f'$ is bounded, and $f'$ is not Riemann integrable (on any subinterval of $[a,b]$).
Putting these together, we get an absolutely continuous (and differentiable) function $f$ for which $f$ is not, in any sense, equal to $\int f'$ (if $\int$ is the Riemann integral).
I don't have a source for Theorems $1$ and $2$ off the top of my head other than my undergraduate thesis (Theorem $1$ is Theorem $3.6$; Theorem $2$ is basically all of section $2$).