# Proving the integral of the cantor function

I'm trying to prove the integral of the cantor function on [0,1] is equal to 1/2.

I'm thinking of using a symmetry argument by using the fact that the function is 1/2 on [1/3,2/3]. Then arguing that for every region where the function is less than 1/2, there is an equal size region where the function is above 1/2 by the same amount.

But I'm not sure how to formalise this argument using mathematics as there are an infinite number of intervals.

Is this the correct approach to use? I haven't covered topics in measure theory yet so am fully sure how to use those sorts of concepts.

• Perhaps you can apply your argument on appropriate intervals of the form $(x,1-x)$ and then let $x\to0+$ – saulspatz Nov 11 '18 at 15:10

Let $$f$$ denote the Cantor function. Then $$\int_0^1 fdx=\int_0^1\frac{f(x)+f(1-x)}{2}dx=\int_0^1\frac{1}{2}dx.$$
• @user601175 Look at the graph of $f(x)$. How does $f(1-x)$ compare? – J.G. Nov 11 '18 at 20:17
• @user601175 Oh sorry, that's why the second & third match. Quite simply, any function satisfies $\int_0^1 h dx=\int_0^1 h(1-x) dx$. – J.G. Nov 11 '18 at 20:32
• @user601175 It's just a $y=1-x$ substitution. – J.G. Nov 11 '18 at 21:48