# Integrating over piecewise functions

1. Feb 15, 2013

### joshmccraney

given a function $f(x)$ that is piecewise smooth on interval $-L<x<L$ except at $N-1$ points, is $\int_{-L}^L f'(x)dx$ legal or would i have to $$\sum_{i=1}^N \int_{x_i}^{x_{i+1}} f'(x)dx‎‎$$
where $x_{N+1}=L$ and $x_{1}=-L$

also, am i correct that if $f(x)$ is piecewise smooth, then $f'(x)$ is piecewise continuous but not necessarily piecewise smooth?

2. Feb 15, 2013

### jbunniii

The latter. Suppose for example that $f(x) = |x|^{1/2}$. This is smooth (infinitely differentiable) everywhere except at $x = 0$, and
$$f'(x) = \begin{cases} \frac{1}{2|x|^{1/2}} & \textrm{ if }x > 0 \\ \frac{-1}{2|x|^{1/2}} & \textrm{ if }x < 0 \\ \end{cases}$$
As $f'$ is unbounded on $[-L,L]$, it's necessary to use two (improper) integrals to integrate it:
$$\lim_{a \rightarrow 0^-} \int_{-L}^{a} f'(x) dx + \lim_{b \rightarrow 0^+}\int_{b}^{L} f'(x) dx$$
Both limits exist and the answers have opposite signs, so the result is 0.
Assuming "smooth" means infinitely differentiable, $f'$ will be piecewise smooth. If by "smooth" you merely mean (once) differentiable, then $f'$ is not necessarily even piecewise continuous.

3. Feb 17, 2013

### joshmccraney

thanks for the reply. think i have it now.