I'm trying to prove that the following function is Riemann integrable on $[0,1]$: $$g(x) = \begin{cases} 5, &x\in C \\ x, &x\not \in C\end{cases}$$
where $C$ denotes the Cantor set. It's well known that characteristic function of the Cantor set is Riemann integrable. I think we can use the same proof for showing integrability of $g(x)$ but I'm not sure about that. The other idea that I have is as follows: Since characteristic function is integrable we can conclude reverse characteristic function is integrable. $f(x) = x$ is integrable and product of integrable functions is integrable. So $h(x)$ which is defined as$$h(x) = \begin{cases} 0, &x\in C \\ x, &x\not \in C\end{cases}$$ is integrable. This shows $g(x)$ is integrable since $g(x)$ and $h(x)$ differ by a set of measure $0$. I don't know whether this solution is acceptable or not. It would be nice to see other methods to solve this problem.
Cantor set and evaluating an integral
cantor setriemann-integration
Best Answer
Sums and products of RI functions are RI. Let $g$ be he charactetrstic function of $C$ and $f(x)=x$. Then $f(x)g(x)$ is RI. Hence $f(x)-f(x)g(x)$ is RI. Also $5 g(x)$ is RI. Now $5g(x)+f(x)-f(x)g(x)$ is RI. But $5g(x)+f(x)-f(x)g(x)$ is exactly your function.