Expected value of $\sin(X)$, where $X$ is a Cantor random variable 
Let $X$ be a random variable with Cantor distribution. Find $\mathbb{E} \sin(X)$.

I thought about representing 
$$X = \sum \frac{X_i}{3^i}$$ 
where $X_{i} \in \{0, 2\}$, but I guess it's not easy to compute the sine of a sum of random variables. 
Maybe it's better to compute via the definition? Any hints?

If your Cantor random variable $X$ had a PDF (probability distribution function)  $f_X$ we would compute the integral
$$E\bigl(\sin(X)\bigr)=\int_0^1\sin x \>f_X(x)\>dx\ .\tag{1}$$
Now $X$ does not have such a PDF, but a continuous CDF (cumulative distribution function)  $F_X$, which is the so-called Cantor function $F_{\rm Cantor}:[0,1]\to[0,1]$, implemented in Mathematica as ${\tt CantorStaircase[x]}$. In order to introduce this function into $(1)$ we use partial integration and obtain
$$\eqalign{E\bigl(\sin(X)\bigr)&=\int_0^1\sin x\>dF_X(x)=\bigl(\sin x\>F_X(x)\bigr)\biggr|_{x=0}^{x=1}-\int_0^1\cos x\> F_X(x)\>dx\cr   &=\sin 1-\int_0^1\cos x\>F_{\rm Cantor}(x)\>dx\ .\cr}$$
Doing the last integral numerically Mathematica obtained
$$E\bigl(\sin(X)\bigr)\doteq0.449158\ .$$
