# If $g$ is Riemann-integrable in a closed interval and $f$ is a increasing function in a closed interval, is $g\circ f$ Riemann-integrable?

If $g$ is Riemann-integrable in a closed interval and $f$ is a increasing function in a closed interval, is $g\circ f$ Riemann-integrable?

To clarify: the problem stated that the composition is well defined. I think that the statement of the question is true but Im having trouble to write/concrete a proof.

I know that a monotone function defined in a closed interval is Riemann-integrable by a previous result. And I know that the reverse statement ($g$ being monotone and $f$ integrable) is not true in general.

After thinking some moment my idea for the proof is to show that $g\circ f$ have, at most, countable discontinuities. To do this I was thinking how to show some kind of order-correspondence between the points of the domain of a monotone function and it image.

Can you help me? I get stuck and it is very possible that Im wrong in my assumption about that the statement is true. Some hint will be appreciated.

EDIT: I get a new idea, design a partition of $f$ that take any possible discontinuity into a closed interval of known length, and after see what happen in the composition with this closed intervals with discontinuities, and by the other hand see what happen with the parts of continuous mapping.

After reading this answer I get the idea to provide a proof for the validity of the statement.

First I will characterize the different kind of images of closed intervals that a monotonic function can create. For an increasing function we have that $x<y$ implies that $f(x)\le f(y)$, and that at most a monotone function can have a countable number of discontinuities in any closed interval.

No discontinuities on the image: if the image of $f([x_1,x_2])$ is continuous then it can be at most of three types:

1. A constant function $f([x_1,x_2])=\{a\}$. Then $(g\circ f)([x_1,x_2])=g(\{a\})=\{c\}$, then the function $(g\circ f)$ is constant in $[x_1,x_2]$ so is Riemann-integrable

2. A strictly increasing function i.e. $f([x_1,x_2])=[a,b]$. Then $(g\circ f)([x_1,x_2])=g([a,b])=[c,d]$. If $g$ is Riemann integrable in $[a,b]$ then exists a sequence of partitions $(P_n)$ such that

$$\lim_{n\to\infty}U(g,P_n)-L(g,P_n)=0$$

Then because $f$ is bijective in $[a,b]$ then for every $P_n$ exists a partition $P'_n$ in $[x_1,x_2]$ such that

$$\lim_{n\to\infty}U(g\circ f,P'_n)-L(g\circ f,P'_n)=0$$

so $g\circ f$ is Riemann-integrable in $[x_1,x_2]$

1. A mix of both previous cases. Then the interval $[x_1,x_2]$ can be partitioned on types of subintervals discussed previously (constant and strictly monotonic images), so $g\circ f$ is Riemann-integrable here too.

Discontinuity in the image: a jump discontinuity in $[x_1,x_2]$ is mapped into two types of the previously discussed intervals with the difference that can be the case that in the image exists an interval with an open boundary of the kind $[a,b)$ or $(a,b]$.

But cause $f$ and $g$ are Riemann integrable in closed intervals this mean that they are bounded, and if $g$ is integrable in any subinterval $[a-\varepsilon,b]$ then is integrable in $(a,b]$ (this is known by a previous proof).

My question: it is this proof correct? It lacks something essential? Can you help me to write it better? Thank you in advance.

EDIT 2: as the user @ParamanandSingh pointed in the comments it is possible that the discontinuities cannot be isolated, one by one, inside some interval. So I will search further for a correct proof of the statement.

• But this is not enough to prove it @Epsilon, I have a counteraxample: the Tomae function $t(x)$ and the function $f(x)$ that map $0$ if $x=0$ and $1$ if $x\neq 0$. Both are Riemann-integrable but the composition $f\circ t$ is the Dirichlet function, what is not. Jun 20, 2016 at 9:49
• Your result is false. See mathoverflow.net/q/20045/15540 Jun 20, 2016 at 10:00
• I don't think there is a counterexample available without measure theory (at least I am not aware of). Had you asked for continuous $f$ instead of increasing $f$ then there is a counterexample math.uga.edu/~pete/Lu99.pdf which uses elementary ideas. Jun 20, 2016 at 10:08
• BTW +1 for asking this non-trivial question. It appears very few textbooks / instructors/students ponder over this question. Jun 20, 2016 at 10:15
• OK, The linked question does not contain proofs and hence I was myself not sure. The question there dealt with continuous function instead of increasing function. And yes after reading the first and second answer I find them contradictory. I will post a comment on mathoverflow question to get more details. Jun 21, 2016 at 5:07

I will try to explain the counterexample provided in ParamanandSingh's math overflow link. We will need a few prerequisites but they're hopefully not too advanced.

Null Set/Measure Zero Set: A null set $N \subset \mathbb{R}$, also called a measure zero set, is a set that can be convered by a countable union of intervals with arbitrarily small total length. See this wikipedia link.

Measure zero here anticipates the Lebesgue measure for the reals. The Lebesgue measure assigns 'length' to sets of the real line in the natural/expected way. There's technicalities involved, but all we'll really need from it is that the measure of an interval with endpoints $a<b$ is $(b-a)$.

Lebesgue Criterion (for Riemann integrability): A bounded function on a compact interval is Riemann-integrable if and only if its set of discontinuities has measure zero. See this wikipedia link.

This criterion characterizes how 'small' a function's set of discontinuities needs to be for that function to be Riemann-integrable. It is a standard (though not trivial) result with many proofs lying around; no measure theory is needed!

Cantor and Fat Cantor Sets: The standard, ternary Cantor set has measure zero; see this wikipedia link. There are Cantor sets with positive measure; for instance, the Smith-Volterra-Cantor set.

We can deduce these using lenghts of intervals! Let $C$ be the ternary Cantor set.

At the first step, we delete an interval of length $1/3$ from $C_0=[0,1]$, obtaining $C_1$. At the second step, we delete two intervals, each of which has length $1/9$, from $C_1$, obtaining $C_2$. More generally, at the $n$-th step we delete $2^{n-1}$ intervals, each of which has length $3^{-n}$, from $C_{n-1}$, obtaining $C_n$.

Thus, the total length deleted this way is $$\sum_{n=1}^{\infty}\frac{1}{2}{\left(\frac{2}{3}\right)}^n=\frac{1}{2}\frac{\frac23}{1-\frac23}=1$$

which is the length of $[0,1]$, the interval we began with. It follows that the ternary Cantor set $C$ -- what remains after all deletions -- has measure zero.

Calculations for the Smith-Volterra-Cantor set $S$ are similar. At the $n$-th step, $2^{n-1}$ intervals, each of which has length $2^{-2n}$, are deleted from $S_{n-1}$, obtaining $S_n$. Therefore, the total length deleted this way is $$\sum_{n=1}^{\infty}\frac{1}{2}\frac{2^n}{2^{2n}}=\frac{1}{2}\sum_{n=1}^{\infty}\frac{1}{2^n}=\frac{1}{2}\frac{\frac12}{1-\frac12}=\frac12$$ The measure of $S$ is simply $1$ (the measure of $[0,1]$, the interval we began with) minus $\frac12$ (the total measure of what we discarded), that is, $S$ has measure $\frac12$. In particular, it has positive measure and is not a null set.

Now that we have the prerequisites, let's dive onto the counterexample. First, let $f:[0,1]\longrightarrow \mathbb{R}$ be the characteristic function of the ternarcy Cantor set $C$, that is:

$$f(x)=\left\{\begin{array}{ll}1&\text{if x \in C}\\0&\text{if x \notin C}\\\end{array}\right.$$

Notice that $f$ has discontinuities precisely on $C$; a good way to see this is to notice that at each step in the construction of $C$, $f$ is defined to be $0$ on the deleted intervals (so it is clearly continuous in their interior) It follows by the Lebesgue Criterion that $f$ is Riemann-integrable.

Finally, we will define a monotone increasing function $g:[0,1] \longrightarrow \mathbb{R}$ that maps the Smith-Volterra-Cantor set $S$ to $C$. We will obtain $g$ as the limit of a sequence of functions.

Let $S_0=C_0=[0,1]$, let $S_n$ be what remains in the construction of $S$ after $n$ steps, and similarly for $C_n$. Notice that each of $S_n$ and $C_n$ is a disjoint union of $2^n$ closed non-degenerate intervals; we may describe each of them by its collection of $2^{n+1}$ endpoints. For instance, in the obvious notation $C_0=S_0\sim\{0,1\}$, $C_1\sim\left\{0,\frac13,\frac23,1\right\}$ and $S_1\sim\left\{0,\frac38,\frac58,1\right\}$.

Define $g_n:[0,1]\longrightarrow\mathbb{R}$ as follows. Let $S_n\sim\{s_k\}$, where $k$ ranges from $1$ to $2^{n+1}$ and the $s_k$ are increasing. Similarly, let $C_n\sim \{c_k\}$. For all $k=1,\dots,2^{n+1}$ put $g_n(s_k)=c_k$, and extend it to all of $[0,1]$ linearly. In other words, $g_n$ fits the $i$-th interval in $S_n$ into the $i$-th interval in $C_n$, and fills in the blanks with linear pieces. It's easy to see that $g_n$ is increasing (and continuous!) for all $n$.

It's not too hard to see that $g_n$ converges pointwise for all $x \in [0,1]$; we define $g$ to be this limit function. It follows immediately that $g$ is increasing and maps $S$ to $C$. (It's a bit of work, but one can show that the convergence $g_n\to g$ is actually uniform, so that $g$ is indeed continuous!)

At last, the composition $f\circ g$ has $S$ for its set of discontinuities. Since $S$ has positive measure, it follows by the Lebesgue criterion that $f\circ g$ is not Riemann-integrable, which concludes the proof.

• @ParamanandSingh I've tried to explain the answer in your link here. I hope it sheds some light into the problem. I will now go to sleep but will check on this tomorrow. Jun 21, 2016 at 10:45
• Where you says "fills in the blanks with linear pieces" we can fill this with a constant value for example (to be the more simple possible)? One more thing: $S$ have uncountable points (I suppose) as the standard Cantor set $C$, right? Other thing: I edited what I think is a little typo, you write $a_k$ instead of $s_k$. Just check it if Im wrong. Jun 21, 2016 at 12:30
• Thanks a lot for this answer. It really uses bare minimum of measure theory stuff with which I am already familiar. The essential idea is that $S$ has positive measure and each point of $S$ has nearby points which are not in $S$. This ensures that $f\circ g$ is discontinuous at $S$ and the job is done. Jun 21, 2016 at 14:05
• BTW +1 for the nice answer. Your construction of $g$ reminds me of a similar function called Devil's staircase where we actually create a function $g$ which is continuous and increasing and differentiable at every point of $[0, 1]$ except the cantor set and $g'(x) = 0$ for all $x$ in $[0, 1]$ except cantor set so that $$g(1) - g(0) = 1 \neq \int_{0}^{1}g'(x)\,dx = 0$$ this serves to illustrate why fundamental theorem of calculus fails for Riemann integrals in unexpected ways. Jun 21, 2016 at 14:19
• @Masacroso: "Fill in the blanks with linear pieces" does not mean fill with constant value. That will make $g_{n}$ discontinuous. I will show what to do for $g_{1}$. We have $C_{1} = \{0, 1/3, 2/3, 1\}, S_{1} = \{0, 3/8, 5/8, 1\}$. Now plot the points $A = (0, 0), B = (1/3, 3/8), C = (2/3, 5/8), D = (1, 1)$ on graph and join line segments $AB, BC, CD$. The resulting figure is graph of function $g_{1}$ which is clearly increasing (strictly) and continuious. Jun 21, 2016 at 14:37