# Counterexample of Second fundamental theorem of Calculus if f is not continuous

Define $$F(x)=\int_{a}^{x} f(t)\,dt$$ on $$[a,b]$$, then by fundamental theorem of calculus, we know that if $$f(x)$$ is continuous then $$F'(x)=f(x)$$.

Say we remove the condition that $$f(x)$$ is continuous then how would we construct an example such that $$F'(x)\neq f(x)$$ for finite amount of points? How to come up an example for infinite amount of point?

Thanks

• Literally take a continuous function and then just change its values at finitely many points. – mathworker21 Jun 7 at 13:58

Take$$\begin{array}{rccc}f\colon&[0,1]&\longrightarrow&\mathbb R\\&x&\mapsto&\begin{cases}1&\text{ if }x=\frac1n\text{ for some }n\in\mathbb N\\0&\text{ otherwise.}\end{cases}\end{array}$$Then $$F$$ is the null function and therefore$$(\forall n\in\mathbb N):F'\left(\frac1n\right)\neq f\left(\frac1n\right).$$
• You know that $F(x)=\int_0^xf(t)\,\mathrm dt$. Obviously, $F(0)=0$. Now, suppose that $x>0$. Clearly, every lower sum is equal to $0$. On the other hand, given $\varepsilon>0$, it is not hard to prove that there is a partition $P$ of $[0,x]$ such that $\overline\Sigma(f,P)<\varepsilon$. So, $F(x)=0$. – José Carlos Santos Jun 7 at 18:09
$$f:[0,1]\to\Bbb R\,,\,\,f(x)=\begin{cases}0,&x\neq\frac12\\{}\\1,&x=\frac12\end{cases}\implies F(x):=\int_0^x f(t)\,dt=0\;\;\forall\,x\in[0,1]$$
and thus of course $$\;0=F'\left(\frac12\right)\neq1=f\left(\frac12\right)\;$$
Start with $$f(x)$$, then say a new function $$g(x)$$ equals $$f(x)$$ for all irrational numbers in your domain, but $$g(x) = f(x)+1$$ for all rational numbers. Just one of many ways.