Problem: Define a function f by

Given that is the Lebesgue measure on i.e.

Show that

My proof so far:

Using the hints in the text, I'm defining a series of function that converges to , with

For , let where a rounded down to the nearest integer.

Then I have

But the answer is suppose to be ! I'm guessing my integration of the series of function is wrong, but why?