TITLE: Show that f is measurable function.
QUESTION [6 upvotes]: Let $f:\mathbb{R} \to \mathbb{R}$ be defined by
$f(x)=\left\{\begin{array}{lllll} x+5 & \quad\text{if }x<-1 \\\ 2  & \quad\text{if } -1\leq\alpha<0\\\ x^2 & \quad\text{if } x \geq 0\end{array}\right.$
Show that $f$ is measurable function.

we know that f is measurable if

(i) It's domain is measurable, and
(ii) for any a belong to R one of the following is satisfy
${x | f(x) > a }$ is measurable
${x | f(x) >= a }$ is measurable
${x | f(x) < a }$ is measurable
${x | f(x) <= a }$ is measurable
but, I can't find any a such that.

REPLY [7 votes]: First, plot the function and slice the plan for every relevant value of $\alpha$ (it will appear evident, once you plotted the function). 
It takes a bit of practice, but you then compute the inverse image for every relevant value of $\alpha$, and find:
$\mathbb{R}(f<\alpha)=\left\{\begin{array}{lllll} \left[-\infty,\alpha-5\right[ & \quad\text{if }\alpha <0\\\left[-\infty,-5\right]\cup\{0\} & \quad\text{if }\alpha=0\\\left[-\infty,\alpha-5\right]\cup\left[0,\sqrt{\alpha}\right] & \quad\text{if } 0<\alpha<2\\\left[-\infty,\alpha-5\right]\cup \left[-1,\sqrt{\alpha}\right] & \quad\text{if } 2\leq\alpha<4\\\left[-\infty,\sqrt{\alpha}\right] & \quad\text{if } 4\leq\alpha\end{array}\right.$
Every set of the right is measurable, so the function $f$ is measurable.