integral of the cantor function consider the ternary cantor set C, and the asscoiated cantor function f, and the associated Lebesgue-Stieltjes measure u.
what is the integral of f over all of R with respect to u?
my attempt:
i know that under the Lebesgue measure, the integral of the cantor function is 1/2 using a symmetry argument. 
but under this measure, u, is the integral still the same?
i was thinking about breaking up the integral into 3 parts: (-infty, 0), (0, 1), and (1, infty).
since the cantor function is constant on (-infty, 0) and (1, infty), it follows that the integral is 0 on those intervals...
now im kind of stuck here because im not sure how to handle (0, 1)...help would be appreciated
 A: You should get that the answer is $1/2$, immediately from integration by parts. See this, in particular the sections "Integration by parts" and "Related concepts". Further, see this for a proof of the integration by parts formula.
EDIT: Explicitly, since $f$ is continuous and non-decreasing, and is constant on $\mathbb{R}-[0,1]$, $\int_{\mathbb R} {f(x)du(x)}  = \int_0^1 {f(x)df(x)} $, and it holds
$$
\int_0^1 {f(x)df(x)}  = f(1)f(1) - f(0)f(0) - \int_0^1 {f(x)df(x)} 
$$
(integration by parts). Since $f(0)=0$ and $f(1)=1$, it thus follows that $\int_{\mathbb R} {f(x)du(x)} = 1/2$.
EDIT: More generally, if $F$ is any continuous distribution function (the Cantor function $f$ is a particular example), then $\int_{\mathbb R} {F(x)dF(x)}  = 1/2$. As before, this can be proved using integration by parts, which is allowed since $F$ is continuous and non-decreasing. (Under certain conditions, this also follows from a change of variable.) Indeed, for any $a < b$,
$$
\int_a^b {F(x)dF(x)}  = F(b)F(b) - F(a)F(a) - \int_a^b {F(x)dF(x)}.
$$
Hence the result follows by letting $a \to -\infty$ and $b \to \infty$.
Another way to obtain the general result is as follows. Let $X$ be an arbitrary random variable with continuous distribution function $F$. Then, $\int_{\mathbb R} {F(x)dF(x)}$ expresses the expectation of the random variable $F(X)$. As is well known, in this case $F(X) \sim {\rm uniform}(0,1)$. Hence,  $\int_{\mathbb R} {F(x)dF(x)}  = 1/2$.
Remark. With $f$ as above, integration by parts gives
$$
\int_0^1 {xdf(x)}  = xf(x)\big|_0^1  - \int_0^1 {f(x)dx} = 1 - 1/2 = 1/2.
$$
The left-hand side, $\int_0^1 {xdf(x)}$, expresses the expectation of the Cantor distribution. 
A: Let us first observe the following restricted change-of-variables type formula for Stieltjes integrals:
$$\int_{f(I)} g(x)\,dx = \int_I g(f(y))\,df(y)$$
for every Borel $I\subseteq\mathbb{R}$ and every non-decreasing continuous $f:I\rightarrow\mathbb{R}$: 
compare the corresponding Darboux sums and see also this question.
In particular for $f:[0;1]\rightarrow[0;1]$ the Cantor function and $g(x):=x$,
$1/2=\int_0^1 x\,dx = \int_0^1 f(y)\,df(y)$.
