a function that is not measurable but its square is measurable

511 Views Asked by At

Question: Give an example of a function $f$ on $X$ to $R$ which is not $X$ measurable, but is such that the functions $|f|$ and $f^2$ are measurable.

To me, $|f|$ is measurable and $f^2$ is measurable are equivalent. However, I have no idea how to construct the example. Any hint?