Solution (source code)

= Solution

Put $G(t)=\int_a^t f(x)\,dx$. At an interior point and for $h\ne0$ small enough,
$$
\frac{G(t+h)-G(t)}h-f(t)=\frac1h\int_t^{t+h}[f(x)-f(t)]\,dx.
$$
By <continuity> at $t$, the modulus is bounded by the supremum of $|f(x)-f(t)|$ between $t$ and $t+h$, which tends to zero. Thus \b[the fundamental theorem of calculus gives]
$$
\boxed{G'(t)=f(t).}
$$
At the interval endpoints the same argument supplies the corresponding one-sided derivatives.

For an integrable discontinuous function, the single-point spike from part (i) has $G\equiv0$, so $G'(c)=0\ne f(c)=1$; this disproves the derivative identity even when the primitive is differentiable. To see that differentiability itself may fail, take the <step function> $f(x)=0$ for $x<c$ and $f(x)=1$ for $x\ge c$. It is <Riemann integrable>, but its primitive is $G(t)=\max(0,t-c)$ and has left derivative zero and right derivative one at $c$. Hence the full assertion is false for general <Riemann-integrable functions>.