Continuity & differentiability of an improper integral of discontinuous function. My question regards the continuity & differentiability of an improper integral of a discontinuous function. Let the function be defined as
$$
g(t) = \int_{0}^{t}f(x)\,\mathrm{d}x
$$
Assume that $f(x)$ is bounded and continuous $\forall x \in \mathbb{R},x\neq 0$. Since the number of discontinuties of $f(x)$ are countable the function is Riemann integrable on $\mathbb{R}$. Since the function is Reimann integrable is that enough to state that the function $g(x)$ is continuous on $\mathbb{R}$?
As for differentiability, is knowing that the function $f(x)$ is not continuous on $\mathbb{R}$ enough to conclude that the function g(x) is not differentiable on $\mathbb{R}$ as we wouldn't be able to apply the Fundamental Theorem of Calculus?
 A: Let us consider the function $x\mapsto g(x)=\int_{x_0}^x f(s) \; \mathrm d s$. Checking the proof of the fundamental theorem of calculus one can see that the main idea is to calculate $(g(x+h)-g(x))/h$ and then to calculate the limit $h\to 0$ with the help of the mean value theorem for definite integrals. Since the mean value theorem also holds for so called regulated functions (which are in general not continuous) $f$ does not have to be continuous.
A: Depending on what kind of integral you use, the following statements are true:


*

*If $f$ is continuous (and hence Riemann-integrable), then $g$ is differentiable everywhere with $g'=f$ everywhere.

*If $f$ is Lebegsue-integrable, then $g$ is absolutely continuous and almost everywhere differentiable with $g'=f$ almost everywhere.

*If $f$ is Henstock-integrable, then $g$ is continuous and almost everywhere differentiable with $g'=f$ almost everywhere.


In particular, in either of the above cases, $g$ is continuous. For the differentiability part, the following is true.


*

*$g$ is differentiable everywhere with $g'=f$, if and only if $f$ is Henstock-integrable and satisfies
\begin{align*}
g(x)=\lim_{h\to0}\frac{1}{h}\int_x^{x+h}f(t)dt
\end{align*}
for each $x$.


However, there are examples of very discontinuous $f$, while $g$ is still everywhere differentiable. A nice discussion can be found here: How discontinuous can a derivative be?
In particular, there are derivatives which are neither continuous, nor Riemann-
 or Lebesgue-integrable, nor bounded.
Moreover, from Darboux-Theorem we know that each derivative has the Intermediate Value Property. This implies that if $f$ is a derivative of $g$ which is discontinuous at some point $x_0$, then $x_0$ is an essential discontinuity, which means that at least one of the one-sided limits does not exist. In particular, a regulated function $f$ is a derivative of $g$, if and only if $f$ is continuous.
A: Let's assume that the integral involved is Riemann integral. If $f$ is Riemann integrable then $g$ is continuous and of bounded variation. Further $g$ is differentiable at points of continuity of $f$ and at those points $g'=f$. Since a Riemann integrable is continuous almost everywhere, you will have $g'=f$ almost everywhere.
It is possible that $g$ is differentiable even at points where $f$ is discontinuous but then it is not guaranteed that $g'=f$. Further if $f$ has a jump discontinuity at a point, then it is guaranteed that $g$ is not differentiable at that point.

A proper discussion of Fundamental Theorem of Calculus should cover the proof of all the statements mentioned above (perhaps leaving the part about almost everywhere) and not just deal with the simpler and special case when $f$ is continuous everywhere. 
Also the two parts of Fundamental Theorem of Calculus are equivalent if the function $f$ is continuous. These parts are different if the function $f$ being integrated is discontinuous. You may have a look at this answer for more details. 
