<s>[INST] Cantor function integral. I'm trying to solve the following integral for a problem about fractals involving Cantor set:
$$\mathcal{I}=\int_{0}^{1}C\left(\sqrt{1-x^2}\right)dx$$
Where $C(x)$ denotes the Cantor ternary function.
I don't know a lot about measure theory and Lebesgue integrals, so I don't know what to do here. I tried the substitution $u=\sqrt{1-x^2}$, but it led me nowhere.
I've made a small program to numerically evaluate it, and it yielded $\mathcal{I}\approx0.7357895383$.
Is it possible to find a closed-form expression or a series expansion for this integral?
 [/INST] Partial solution.
Put $t = \sqrt{1-x^2}$. Hence $x = \sqrt{1-t^2}$ and
$\mathcal{I} = \int_0^1 \frac{C(t) tdt}{\sqrt{1-t^2}}$.
Open Cantor set $A = \bigsqcup_{n \ge1, 1 \le k \le 2^{n-1}} (a_{nk}, b_{nk})$, where $(a_{11}, b_{11}) = (\frac13, \frac23)$,  $(a_{21}, b_{21}) = (\frac19, \frac29)$, $(a_{22}, b_{22}) = (\frac79, \frac89)$, $(a_{31}, b_{31}) = (\frac1{27}, \frac2{27})$,  $(a_{32}, b_{32}) = (\frac7{27}, \frac8{27})$, $(a_{33}, b_{33}) = (\frac{19}{27}, \frac{20}{27})$,  $(a_{34}, b_{34}) = (\frac{25}{27}, \frac{26}{27})$ etc. Denote by $C_{ij}$ the value of $C$ on $(a_{nk}, b_{nk})$. It's easily seen that $C_{11} = \frac{1}2, C_{21} = \frac{1}4, C_{22} = \frac{3}4, C_{31} = \frac{1}8, C_{32} = \frac{3}8, C_{33} = \frac{5}8,  C_{34} = \frac{7}8$ and
$C(t) = \frac{2k-1}{2^n}$ for $t \in (a_{nk}, b_{nk})$. Thus
$$\mathcal{I} = \int_A \frac{C(t)tdt}{\sqrt{1-t^2}} = \sum_{n \ge 1, 1 \le k \le 2^{n-1}} \int_{a_{nk}}^{b_{nk}} \frac{C(t)tdt}{\sqrt{1-t^2}} = \sum_{n \ge 1, 1 \le k \le 2^{n-1}} \int_{a_{nk}}^{b_{nk}} \frac{2k-1}{2^n}\frac{tdt}{\sqrt{1-t^2}} = $$
$$ = \sum_{n \ge 1, 1 \le k \le 2^{n-1}} \frac{2k-1}{2^n} \int_{a_{nk}}^{b_{nk}} \frac{tdt}{\sqrt{1-t^2}}$$
It's sufficient to paste formulas for $a_{nk}$ and $b_{nk}$ and find the sum.
</s>