# If $f$ is Riemann integrable on $[a,b]$ then is $f \circ f$ Riemann integrable?

I know the composition of Riemann integrable functions is not necessarily Riemann integrable. But I am not finding any argument how to conclude this for self composition, or how to find a counterexample. $$f$$ is Riemann integrable on $$[a,b]$$ means that the discontinuity set of $$f$$ is of measure zero. But the discontinuity of the composition is a larger set, so we cannot conclude anything.

Similarly for the self composition of measurable functions: is it measurable or not? I am unable to find a counterexample.

• Your second paragraph is a very different question and should be asked in a separate post (though it may also have an answer on this site already). You should also clarify what you mean by "measurable": Borel measurable? Lebesgue measurable? On what domain? May 14 at 5:11
• If you know two Riemann integrable functions $g,h$ whose composition $h \circ g$ is not Riemann integrable, try creating a piecewise function of horizontally and vertically shifted versions of it, so that $f \circ f$ looks like $h \circ h$ up to shifts. May 14 at 5:13
• Domain is same [a,b] and Lebesgue measureable
– user1043248
May 14 at 5:34
• I mean $h \circ g$ in previous comment. May 14 at 5:35
• For Riemann Integrable answer is no I guess, I understand just not able to find the precise counterexample.
– user1043248
May 14 at 5:38

Suppose you have Riemann integrable functions $$g,h : [0,1] \to [0,1]$$ such that $$h \circ g$$ is not Riemann integrable. Define $$f : [0,3] \to \mathbb{R}$$ by $$f(x) = \begin{cases} g(x) + 2, & 0 \le x \le 1 \\ 123.456 & 1 < x < 2 \\ h(x-2), & 2 \le x \le 3. \end{cases}$$ Then $$f \circ f = h \circ g$$ on $$[0,1]$$. I leave it to you to verify that $$f$$ is again Riemann integrable, that $$f \circ f$$ is not, and to make adjustments if you don't like the domain and range I chose.