# Does a function have to be continuously differentiable to be integrable

Is the only requirement for a function to be integrable just for it to be continuous on an entire specified interval like $[a,b]$?

The function $f(x)$ that I'm talking about is in the integrand and has the mapping $f:\mathbb{R} \rightarrow \mathbb{R}$

$$\int_a^b \! f(x) \, dx$$

-

Integrability is a pretty weak condition with respect to continuity/differentiability. For instance, consider the following function $f : [0,1] \to \mathbb{R}$: $$f ( x ) = \begin{cases} \frac{1}{q}, &\text{if }x > 0\text{ is rational and }x = \frac{p}{q}\text{ in lowest terms} \\ 0, &\text{otherwise.} \end{cases}$$ You can show that this function is continuous only at irrationals (and is right-continuous at $x=0$). It follows that $f$ is not continuous on any nondegenerate interval $[a,b]$. However the function is (Riemann) integrable, with $\int_{0}^1 f(x) dx = 0$.

-

A function does not even have to be continuous to be integrable. Consider the step function $f(x) = \begin{cases} 0 & x \le 0\\ 1 & x > 0 \end{cases}$. It is not continuous, but obviously integrable for every interval $[a,b]$. The same holds for complex functions.

Note that many theorems about integration will, in fact, require stronger conditions on $f$.

-

It is a theorem that a function is Riemann integrable if and only if it is bounded and its set of discontinuities has Lebesgue measure zero.

-

If you allow Lebesgue integration, then the condition is even weaker. For example, consider the function $f(x) = 0$ if $x$ is rational, $f(x)=1$ is $x$ is rational. This is continuous nowhere but integrable.

-