TITLE: Fundamental theorem of calculus when the integrand is just right (or left) continuous
QUESTION [6 upvotes]: Consider $f:[a,b]\rightarrow R$ and $F(x)=\int_a^xf(t)dt$ for all $x\in[a,b]$.
If $f$ is continuous, then the fundamental theorem of calculus says that $F'(x)=f(x)$.
I want to ask if $f$ is just right (or left) continuous, is it true that the right (or left) derivative of $F$ equals $f$? i.e. $\partial_+F(x)=f(x)$ (or $\partial_-F(x)=f(x)$)?
In addition, if $f$ has right (or left) limit at $x$, is it true that $\partial_+F(x)=\lim_{t\rightarrow x+}f(t)$ (or $\partial_-F(x)=\lim_{t\rightarrow x-}f(t)$)?

REPLY [3 votes]: Assume that $f$ is Riemann-integrable on $[a,b]$ so that the integral defining $F$ is well-defined (this is automatic if $f$ is continuous but not necessarily the case if $f$ is merely left or right continuous). In particular, $f$ is bounded on $[a,b]$ (so $|f| \leq M$ for some $M > 0$).
Let $x_0 \in [a,b]$ be a point at which the right limit $\lim_{x \to x_0^{+}} f(x) = L$ exists. Mimicking the usual proof of the fundamental theorem of calculus, we have
$$ \left| \frac{F(x_0 + h) - F(x_0)}{h} - L\right| = \frac{1}{|h|} \left| \int_{x_0}^{x_0 + h} (f(x) - L) \, dx\right| \leq \frac{1}{|h|}  \int_{x_0}^{x_0 + h} |f(x) - L| \, dx. $$ 
Let $\varepsilon > 0$. By choosing $\delta > 0$ such that $|f(x) - L| < \varepsilon$ for all $x_0 < x < x_0 + \delta$ we see that if $0 < h < \delta$ and $0 < \delta' < \delta$ then $|f(x) - L| < \varepsilon$ on $[x_0 + \delta', x_0 + h] \subset (x_0, x_0 + \delta)$ and so
$$ \int_{x_0}^{x_0 + h}  |f(x) - L| \, dx = \int_{x_0}^{x_0 + \delta'} 
|f(x) - L| \, dx + \int_{x_0 + \delta'}^{x_0 + h} |f(x) - L| \, dx \leq $$
$$ \int_{x_0}^{x_0 + \delta'} (M + |L|) \, dx + \int_{x_0 + \delta'}^{x_0 + h} \varepsilon \, dx = \delta'(M + |L| - \varepsilon) + h\varepsilon. $$
Taking $\delta' \rightarrow 0^{+}$, we see that
$$ \int_{x_0}^{x_0 + h}  |f(x) - L| \, dx \leq h\varepsilon $$
for all $0 < h < \delta$ and so
$$ \left| \frac{F(x_0 + h) - F(x_0)}{h} - L\right| \leq \frac{1}{h}  \int_{x_0}^{x_0 + h} |f(x) - L| \, dx < \varepsilon. $$
Hence, $F$ is right-differentiable at $x_0$ and $F'_{+}(x_0) = L$. The proof for the left limit is similar.
Note that the main difference between this proof and the standard proof of the fundamental theorem of calculus lies in the fact that we can't guarantee that $|f(x) - L| < \varepsilon$ (where $L = f(x_0)$) on $[x_0,x_0+h]$, only on $(x_0,x_0+h]$ but this is good enough since the integral is a continuous function of its lower (and upper) limit and so we have an extra step of dividing our interval into two disjoint intervals and controlling the expressions differently on each of the intervals (using the continuity of the integral and the existence of a right limit).