Lebesgue integration of simple functions Define $f : [0,1] \to \Bbb R$ by $f(x) := 0$ if $x$ is rational, and
  $f(x) := d^2$ if $x$ is irrational, where $d$ is the first nonzero
  digit in the decimal expansion of $x$. Show that $\int_{[0,1]} f d m
  = 95/3$. Here $m$ is the Lebesgue measure
I know that $f$ is simple, but can someone please suggest on how to proceed with this?

If you want, you can think about this integral geometrically.  The function you described is equal almost everywhere to the following step function (or should I say, function of infinite repeating narrower staircases; intervals are not drawn to scale):

As you can see in the picture, what we get for the total area under that step function of infinite repeating steps is:
$\sum \limits_{n = 1}^{\infty} (81 + 64 + 49 + 36 + 25 + 16 + 9 + 4 + 1) \cdot (.1)^{n}$
$= \sum \limits_{n = 1}^{\infty} 285 \cdot (.1)^{n}$
Since $.1 < 1$, we know this series converges, and it converges to:
$\dfrac{\text{first term}}{1 - \text{common ratio }r} = \dfrac{285 \cdot .1}{1 - .1} = \dfrac{28.5}{.9} = \dfrac{95}{3}$, and thus the total area is $\dfrac{95}{3}$.
Note that I used the fact that if two functions are equal almost everywhere, their integrals are equal.
