Let $C$ denote the Cantor set. Let $f(x)=0$ on $C$, and $f(x)= x$ on $[0,1] \setminus C$.
Find $\int_{[0,1]} f(x) du$.
I just want to make sure my reasoning is correct.
Let $g(x)= x$ on $[0,1]$, then $g=f$ almost everywhere since Cantor set has measure $0$. Hence their integrals on $[0,1]$ are equal and so $\int_{[0,1]} f(x) du= 1/2$.
Is this correct reasoning and mathematically rigurous?Thanks.
Looks good. The point is that it is exactly right, $f=g$ almost everywhere, so you can conclude that they have the same integral.
In general,
$$ \int_A f d \mu= \int_A f \cdot \chi(B^c) d \mu$$
where $\chi$ is the characteristic function, and granted that $B \subset A$ has measure zero.