# Show that $f(x)=x^21_{C^c}(x)$ is Lebesgue measurable function

Let define $$f:[0,1]\to [0,1]$$ as follows:

$$f(x) = \begin{cases} 0, & \text{if x \in \mathbb{C}} \\ x^2, & \text{if x \notin \mathbb{C} } \end{cases},$$ where $$\mathbb{C}$$ is the Cantor set. Show $$f$$ is Lebesgue measurable function.

I know a function $$f : \mathbb{R} \to \mathbb{R}$$ is called Lebesgue-measurable if preimages of Borel-measurable sets are Lebesgue-measurable. I think it is enough to show for any $$a\geq 0$$, $$f^{-1}(a,\infty)=\{ f>a \}=\{x\in [0,1]\mid f(x)>a \}$$ is Lebesgue-measurable set. But I stuck here $$f^{-1}(a,\infty)= \begin{cases} \mathbb{C}^c & a< 0\\ [0,1] & a\geq 0 \end{cases}.$$

Well, $$[0,1]=C\hspace{1mm}\cup C^{c}$$ (I discourage you to use $$\mathbb{C}$$ for the cantor set) and you can write f as: $$f(x)=0\cdot\chi_{C}(x)+x^{2}\chi_{C^{c}}$$ where by $$\chi$$ I mean the characteristic function of the set in subscript. The sum of measurable functions is measurable as well as the product, and polynomial functions are measurable.