# If $f$ is a Riemann integrable prove $|f|$ is also Riemann integrable

Show that if $f$ is Riemann integrable on $[a,b]$ then $|f|$ is also Riemann integrable on $[a,b]$.

My idea is: let $f$ be in $[a,b]$ less than $|f|$, since $f$ is integrable then $|f|$ is also integrable on $[a,b]$.

-
This is a direct consequence of the Lebesgue's integrability criterion. See here: en.wikipedia.org/wiki/Riemann_integral#Integrability. – user18063 Jan 6 '12 at 15:38
But this problem is often stated to serve as an exercise in the use and understanding of Riemann sums. – GEdgar Jan 6 '12 at 15:51
I think my answer here can be useful to you. – leo Jan 6 '12 at 16:41
The converse holds if $f$ is a derivative: math.stackexchange.com/questions/93370 – Jonas Meyer Jan 6 '12 at 21:18

Hints:

Note that $f$ and thus $|f|$ is bounded on $[a,b]$.

First show that for any interval $I=[c,d]\subset[a,b]$, $$\tag{1} \sup_{x\in I} |f(x) | -\inf_{x\in I}|f(x)| \le \sup_{x\in I} f(x) -\inf_{x\in I} f(x)$$

Next show that inequality (1) implies that for any partition $P$ of $[a,b]$:

the upper Riemann sums $U(|f|, P)$ and $U(f, P)$ and the lower Riemann sums $L(|f|, P)$ and $L(f, P)$ satisfy $$U(|f|, P)-L(|f|, P) \le U(f, P)-L(f, P).$$

Then argue that $U(|f|, P)-L(|f|, P)$ can be made as small as desired by taking an appropriate partition $P$ of $[a,b]$.

Finally conclude that $|f|$ is integrable.

Per kahen's comment (see his link):

In the above, the following characterization of Riemann integrability is used:

For a partition $P=\{x_0,x_1,\ldots, x_n\}$ of $[a,b]$, define the upper Riemann sum of the bounded function $f$ by: $$U(f,P)= \sum_{j=1}^n \bigr( \sup_{x\in[x_{j-1},x_j]} f(x)\bigl)(x_j-x_{j-1});$$ and the lower Riemann sum by: $$U(f,P)= \sum_{j=1}^n \bigr( \inf_{x\in[x_{j-1},x_j]} f(x)\bigl)(x_j-x_{j-1})$$

Then $f$ is Riemann integrable on $[a,b]$ if and only if $f$ is bounded on $[a,b]$, and for every $\epsilon>0$ there is a partition $P$ such that $U(f,P)-L(f,P)<\epsilon$.

-
 Technically this proof sketch is for the Darboux integral. It so happens that it's equivalent to the Riemann integral defined using tagged partitions, but one should of course prove said equivalence. – kahen Jan 6 '12 at 15:30

Here is a fancier approach. A bounded function on a bounded interval is Riemann integrable if and only if it is continuous everywhere except on a set of Lebesgue measure zero.

Suppose that $f$ is Riemann integrable and $g$ is continuous on an interval containing the range of $f$. Then $g\circ f$ is continuous wherever $f$ is continuous; therefore, $g\circ f$ is continuous everywhere but on a set of Lebesgue measure zero. We conclude that $g\circ f$ is Riemann integrable.

This specializes immediately to your case.

-
 I don't understand the last sentence. There is nothing about Lebesgue integrals or measurability (explicitly) in the question or otherwise in your answer. The specialization is just $g(x)=|x|$. – Jonas Meyer Jan 6 '12 at 21:15 Correct, you take $g(x) = |x|$. The operating principle is that a bounded function on a bounded interval is Riemann integrable iff its set of points of discontinuity has Lebesgue measure 0. – ncmathsadist Jan 7 '12 at 1:48 I agree, and that is what you pointed out in your second sentence. What I don't understand is the final sentence. How is the Lebesgue integral of $f$ or $g\circ f$ relevant to the question? – Jonas Meyer Jan 7 '12 at 2:29 I guess that could be omitted. – ncmathsadist Jan 7 '12 at 3:02

More generally, one can prove that if $f: [a,b] \rightarrow [c,d]$ is Darboux integrable and $\varphi: [c,d] \rightarrow \mathbb{R}$ is continuous, then the composite function $\varphi \circ f: [a,b] \rightarrow \mathbb{R}$ is Darboux integrable. (Then take $\varphi(x) = |x|$ to answer the OP's question.) A proof appears on page 7 of these notes. (It comes directly from Russell Gordon's text Real Analysis: A First Course, which was the text for the class from which these notes were made.)

1) Note that I said "Darboux integrable": this is the version of the integral which uses upper and lower sums instead of Riemann sums. As I say in my notes, it is (so far as I know...) not so easy to adapt this argument to show Riemann integrability.

2) But perhaps the OP actually means Darboux integrability! It is common to use the term "Riemann integral" to refer to either the Darboux or the Riemann integral. This is not a horrible mistake, because there is a theorem that says that these two integrals are equivalent (i.e., a function is Riemann integrable iff it is Darboux integrable, and if so these two integrals have the same value), but I think it is sloppy in a way which can cause confusion for students.

3) One advantage of this general approach is that it leads to an easy proof that the product of Darboux integrable functions is Darboux integrable.

4) The result does not work the other way around: if $f$ is Riemann/Darboux integrable and $\varphi$ is continuous, then the composition $f \circ \varphi$ (when defined) need not be Riemann/Darboux integrable. In my notes I state this but mention that the examples I know are too hard to include. (And now of course I would have to think about constructing such examples from scratch, because I didn't write them down!) Does perchance anyone know of a nice, simple example of this?

-
I think one can give a construction as follows. Let $\phi: I \to I$ be a strictly increasing function with derivative zero almost everywhere (which one can construct by taking an infinite sum of scaled translates of the Cantor function, for instance). Then $\phi$ maps a closed set $E$ of positive measure into a set $\phi(E)$ of measure zero. Then $\chi_{\phi(E)}$ is Riemann-integrable (as it is a.e. continuous), but $\chi_{\phi(E)} \circ \phi = \chi_E$ is not (as it is discontinuous on a set of positive measure). – Akhil Mathew Jan 9 '12 at 0:27
(Here I am using a lemma: let $f: I \to I$ be a function and let $A \subset I$ be a closed subset such that $|f'| \leq c$ everywhere on $A$; then the measure of $f(A)$ is at most $c \mu (A)$. This follows by fixing $\epsilon > 0$ and then covering $A$ by a finite number of closed intervals $J_j$ such that $\mu(f(J_j)) \leq (c + \epsilon) \mu(f(J_j))$ and $\sum \mu(J_j) \leq \mu(A) + \epsilon$.) – Akhil Mathew Jan 9 '12 at 0:36
@Akhil: Thanks for this. The fault is mine for not specifying, but...I am actually looking for a more elementary proof than this. In the course I taught I did not even cover Lebesgue's criterion on Riemann integrability, let alone Lebesgue measure. To fix ideas...do you know a proof that would fly in a Spivak calculus course? – Pete L. Clark Jan 9 '12 at 1:42
@ Pete: I think some work is necessary precisely because of Lebesgue's criterion. But a bit of googling turned up an example by Jitan Lu in the Monthly (Vol. 106, no. 8, 1999) which is quite nice and very simple. The strategy is to choose a continuous function $g$ on the unit interval which is not identically zero on any interval, but such that the total length of the points where $g$ is zero is $\frac{1}{2}$. Then take $f$ to be the characteristic function of $\{0\}$. Now the oscillation of $f \circ g$ on any subdivision of the unit interval into subintervals is such that the oscillation... – Akhil Mathew Jan 9 '12 at 2:10
...is at least $\frac{1}{2}$, as he shows. I don't know what's in Spivak's book, but I would imagine that this example could fit neatly into an introductory analysis course. – Akhil Mathew Jan 9 '12 at 2:10
show 1 more comment