I'm trying to find a function $f$ with $|f|$ is Lebesgue integrable but $f$ isn't locally Lebesgue integrable.
My approach:
Let $X = [0,1]$ and $A \subset X$ with A is the Vitali-set. So $A$ is not measurable. Define: $f(x) = \{1 \text{ if } x \in A,\,\,\, -1 \text{ if } x \notin A\}$.
I think that $f$ is not integrable since $A$ is not measureable. But how can I proof this?
And if this is correct, I think I'm finished, since if $f$ isn't integrable, it's also not locally integrable since $X$ is already compact.
And: $|f| = 1$ (the constant function)
And $\int_X |f| d\lambda = 1$, so $|f|$ is integrable.
Thanks