I already know that there is a univariate real-valued function $f, g$ such that $f, g $ are Riemann integrable but $\ g \circ f$ is not Riemann integrable.
But I wonder the existence of the univariate real-valued function $ f $ which is Riemann integrable but $ f\circ f$ is not Riemann integrable
I know that Riemann integrable function is continuous almost everywhere on its domain, but i cannot think of the function which is continuous almost everywhere but its composition with itself is not continuous almost everywhere
Second, I thought about the example using improper integral such as
$f :[1, \infty) \rightarrow \boldsymbol R$ $s.t$ $f(x) = 1/x^2$
But this function did not work, since $Im(f) = (0,1]$, thus $f \circ f$ is defined only on $x = 1$
I intuitively think such an $f$ exists. Please give me an example of this function.