5

I know if $f:[a,b] \to \mathbb{R}$ is continuous, then $g(x) = \int _{a}^{x}f(t) \, dt$ is differentiable on $[a,b]$. Furthermore, $g'(x) = f(x)$.

This is known as the first fundamental theorem of Calculus. However, I wonder if the converse is true, that is when $g(x)$ is differentiable if $f(x)$ is necessarily continuous. I don't think this is the case, but neither can I conceive a counterexample.

I was thinking about this because I think even if the distribution of a random variable is differentiable, the density is not necessarily continuous.


I think as the comment said, we just need to change a continuous $f$ at one point so that it is no longer continuous, but $g$ is not changed. I'll link the following somewhat unrelated question for future reference.

patchouli
  • 1,996
  • 1
    No, $g'$ need not be continuous for example. Also, $f$ can be defined on a set of measure zero. However, if $g'$ is continuous, then $f$ must be essentially continuous. – copper.hat Jan 12 '24 at 22:45
  • Fundamental theorem of calculus for Lebesgue integrals – Andrew Jan 12 '24 at 22:47
  • 1
    If you just change the value of $f$ et some isolated points, the result will still be (Riemann-)integrable, and the integral $g$ will not have changed, but of course $f$ will fail to equal $g'$ at the points where we changed its value. – Marc van Leeuwen Jan 13 '24 at 09:42
  • A trivial counterexample is if you take $f$ continuous, and define a new function $f_2$ which is equal to $f$ almost everywhere, but differs from $f$ on a finite or countable set of points. Then $f$ and $f_2$ have the same integral, but obviously $f_2$ is not continuous and $g'$ is not equal to $f_2$. The counterexample given in user146125 is stronger in the sense that it satisfies $g' = f$ even though $f$ is not continuous. – Stef Jan 13 '24 at 11:07
  • In general (removing the requirement $f(x)$ is continuous), you may find in some cases that $g(x)$ does not exist. Even if $g(x)$ does exist, there may be values $x \in [a,b]$ where $g'(x) \not= f(x)$. So you need some restriction on $f(x)$. – Henry Jan 13 '24 at 11:23

1 Answers1

6

The functions $f(x)=-\cos(\frac1x) + 2 x \sin(\frac1x)$ for $x\neq 0$ and $f(0)=0$, and $g(x)=x^2 \sin(\frac1x)$ for $x\neq 0$ and $g(0)=0$ are an example where this fails. $g(x)=\int_{0}^x f(t)\; \mathrm{d}\,t$ and $g'(0)=\lim_{x\to0} \frac{x^2 \sin(\frac1x) -0}{x-0}=0=f(0)$ but $f$ is not continuous at $x=0$.