Given $\sigma:\{0,1,2,\cdots,9\} \to\{0,1,2,\cdots,9\}$ being a bijection.
Given $f:[0,1]\to[0,1]$ satisfying $$f(0.x_1 x_2 \cdots)= 0.\sigma(x_1)\sigma(x_2)\cdots$$ where $0.x_1 x_2 \cdots$ is the decimal expansion of the numbers in $[0,1]$.
Note that for terminating decimals $x=0.x_1 x_2 \cdots x_m$, $f(x)=0.\sigma(x_1)\sigma(x_2)\cdots\sigma(x_m)$. For example $f(0.1)=0.\sigma(1)$ not $0.\sigma(0)\sigma(9)\sigma(9)\sigma(9)\cdots $).
Prove that $f$ is integrable and evaluate $\int_0^1f$.
My attempt
I can show that $f$ is integrable.
Given an irrational number $\alpha=0.x_1x_2\cdots$, it's not hard to show $\forall M \in \mathbb{N}$ there exists $N>M$ such that all the numbers in $(\alpha-10^{-N},\alpha+10^{-N})$ have the same first $M$ digits after the decimal point. This yields that $f$ is continuous at all irrational numbers and hence $f$ is integrable.
But how to evaluate $\int_0^1 f$ ? I thought it must equal to $\int_0^1 x dx=\frac{1}{2}$, but I can't approach to it.
Any hints? Thanks in advance!
We will give an other proof that only relies on Riemann sums.
We divide $[0,1]$ into the $10^N$ intervals $[(j-1)/10^N,j/10^N],\ j=1,\ldots,10^N.$ Since $f(x)$ is given by applying a permutation of $\{0,\ldots,9\}$ to the digits of the decimal expansion of $x$, we easily observe that
$$\left\{k/10^N,k=0,\ldots,10^N\right\}=\left\{f(k/10^N),k=0,\ldots,10^N\right\}.$$
Hence,
$$\frac{1}{10^N}\sum_{k=1}^{10^N}f\left(\frac{k}{10^N}\right)=\frac{1}{10^N}\sum_{k=0}^{10^N}\frac{k}{10^N}-\frac{1}{10^N}f(0)=\frac{1}{2}-10^{-N}(f(0)+1/2).$$
The left hand side is a Riemann sum for $f$. So, taking the limit as $N\rightarrow +\infty$, we obtain that
$$\int_0^1f(x)dx=\frac{1}{2}.$$
Of course, we can, indeed, take the limits, because integrability was proved by the O.P. in the post.