[Math] Why is it necessary to split the definite integral of a piecewise function into a sum

calculusderivativesintegrationpiecewise-continuityriemann-integration

The second fundamental theorem of calculus (Newton-Leibniz) tells us that:

If $f$ is a real-valued function on a closed interval $[a, b]$ and $F$ is an antiderivative of $f$ in $[a,b]$ s.t. $F'(x)=f(x)$, then $$\int_{a}^{b} f(t) dt = F(b)-F(a)$$

Say we have a real-valued piecewise continuous function $f(x)$ defined on $[a,b]$ which is made up of intermediate functions $f_1, f_2, …, f_n$ for $x \in [x_1, x_2) \cup [x_2, x_3) \cup …\cup[x_n, x_{n+1}]$

Using the second fundamental theorem of calculus, one may find an appropriate $F(x)$ s.t. $F'(x)=f(x)$, like

$$ F(x) = \begin{cases}
\int f_1(x) dx + C_1 &\quad\text{if} \ x \in [x_1, x_2) \\
\int f_2(x) dx + C_2 &\quad\text{if} \ x \in [x_2, x_3) \\
… \\
\int f_n(x) dx + C_n &\quad\text{if} \ x \in [x_n, x_{n+1}] \\
\end{cases} $$

My question is the following: why is it that when we evaluate $\int_a^b f(t) dt$, we must split it into the sum of $$\int_a^{x_i} f(t) dt + \int_{x_i}^{x_{i+1}} f(t) dt + \ …\ +\int_{x_{i+k}}^{b} f(t) dt $$

instead of simply evaluating $F(b) – F(a)$ by selecting the appropriate antiderivatives from the piecewise function?

Example:

$$ f(x) = \begin{cases}
x+1 &\quad\text{if} \ x \in [0, 2) \\
1 &\quad\text{if} \ x \geq 2 \\
\end{cases} $$

An antiderivative of $f$ would be

$$ F(x) = \begin{cases}
\frac{x^2}{2}+x + 2 &\quad\text{if} \ x \in [0, 2) \\
x+7 &\quad\text{if} \ x \geq 2\\
\end{cases} $$

Note the constants of integration $C_1=2$ and $C_2=7$

Clearly, computing $F(3)-F(1)$ does not give the area under $f(x)$ from $x=1$ to $x=3$. Even though intuitively it makes sense to break the definite integral into a sum, I am unable to come up with a straightforward reason as to why $F(3)-F(1)$ wouldn't give the correct result as long as I respected the conditions of the Newton-Leibniz axiom (maybe I didn't, but please let me know why).

EDIT: For a discontinuous function $f(x)$ on an interval $[a,b]$ with finitely many discontinuities, why do we need its antiderivative $F(x)$ to be continuous in order to apply $F(b)$$F(a)$? No matter if it's continuous or not, $F(x)$ still won't be differentiable at $f$'s discontinuities, and its derivative would still be $f$. However, if it's not continuous, $F(b)$$F(a)$ would no longer give the area under the curve. Why?

EDIT 2: Lebesgue Integration asserts that that an antiderivative $F$ differentiable almost everywhere must be absolutely continuous for $F(b)$$F(a)$ (FTC 2) to work. So case closed.

Best Answer

You have to get the correct statement of Fundamental Theorem of Calculus part 2:

FTC Part 2: Let $f, F$ be functions from $[a, b] $ to $\mathbb {R} $ such that $f$ is Riemann integrable on $[a, b] $ and $F'(x) =f(x) $ for all $x\in[a, b] $. Then $$\int_{a} ^{b} f(x) \, dx=F(b) - F(a) $$

The result above remains true even if $F'(x) =f(x) \, \forall x\in(a, b) $ but then we need to assume continuity of $F$ on $[a, b] $. In fact one can remove this restriction and get another version of FTC:

FTC Part 2 (ver 2): Let the function $f:[a, b] \to\mathbb {R} $ be Riemann integrable on $[a, b] $. Let $F:(a, b) \to\mathbb {R} $ be another function which is differentiable on $(a, b) $ such that $F'(x) =f(x) \, \forall x\in(a, b) $. Then limits $\lim_{x\to a^{+}} F(x), \lim_{x\to b^{-}} F(x) $ exist and $$\int_{a} ^{b} f(x) \, dx=\lim_{x\to b^{-}} F(x) - \lim_{x\to a^{+}} F(x) $$

Thus in order to use FTC for evaluation of integrals one must ensure that the integral exist. A common sufficient condition for existence of integral is that the integrand should be bounded and possess at most a finite number of discontinuities in the closed interval over which integration is to be performed. And further the integrand must possess an anti-derivative on the corresponding open interval.

Let's then consider the case when integrand $f$ possesses a finite number of discontinuities on $[a, b] $. Such a function is what one typically calls piecewise continuous function. But such a function may or may not possess an anti-derivative. In particular since derivatives can't have jump discontinuities, if $f$ has a jump discontinuity at an interior point of $[a, b] $ then $f$ can't possess an anti-derivative on $(a, b) $.

This is what happens with your example $f$ given by $f(x) =x+1$ for $x\in[0,2)$ and $f(x) =1$ for $x\geq 2$. Clearly $f$ has a jump discontinuity at $x=2$ and hence $f$ can't possess an anti-derivative on any interval which contains $2$ as an interior point. So one can't use FTC to evaluate $\int_{1}^{3}f(x)\,dx$. But once you split the interval $[1,3]$ into two intervals $[1,2]$ and $[2,3]$ this problem disappears and $f$ possess an anti-derivative on each of the intervals $(1,2)$ and $(2,3)$. Thus $F(x) =x+(x^2/2)$ on $(1,2)$ and $F(x) = x$ for $x>2$ works fine. You can use this $F$ to evaluate $\int_{1}^2 f(x) \, dx$ and $\int_{2}^3 f(x) \, dx$ and add these to get $\int_{1}^{3}f(x)\,dx$.

There are examples where $f$ is discontinuous but the discontinuity is not of jump kind and it possesses an anti-derivative. Thus if $f(x) =2x\sin(1/x)-\cos(1/x),x\neq 0,f(0)=0$ and $F(x) =x^2\sin(1/x),x\neq 0,F(0)=0$ then $F'(x) =f(x) $ for all $x$. And then we can use FTC to get $$\int_{a} ^{b} f(x) \, dx=F(b) - F(a) $$ for all real $a, b$.

Related Question