Integration of a piecewise function using measures

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?

Re: Integration of a piecewise function using measures

For entering latex you have to use: [ tex ]... [ / tex ] not [ math ] ... [/ math ]