Show that f is measurable. Let $a &gt; 0, b \geq 0$ and the function $f: \mathbb{R} \to \mathbb{R}$

$$f(x) = \left\{\begin{matrix}
1, &amp; |x| \leq a \\ 
 b &amp; |x| &gt; a
\end{matrix}\right.$$

show that it is measurable.

I don't have clue about to show this!!!
I assume measurability with respect to the Borel $\sigma$-algebra.

You can rewrite $f$ as:
$$f(x)=\mathbf{1}_{[-a,a]}(x)+b\mathbf{1}_{\mathbb{R}\setminus [-a,a]}(x)$$

$[-a,a]$ is an interval so it is measurable. Thus $\mathbb{R}\setminus [-a,a]$ is measurable too. This simplies that the indicator functions $\mathbf{1}_{[-a,a]}$ and $\mathbf{1}_{\mathbb{R}\setminus [-a,a]}$ are measurable functions. You can then conclude by using the fact that the sum and product of measurable functions is still measurable.
I don't think it's necessarily measurable. Did you mean Lebesgue measurable? If so, then I think so.



Let $a, b \in \mathbb R$.

Define $A := \{x | |x| \le a\}$.

Consider a measure space $(S, \Sigma, \mu)$.

$1$ is constant and hence $\Sigma$-measurable. $(**)$

$b$ is constant and hence $\Sigma$-measurable.

If $A \in \Sigma$, then:


$1_A$ is $\Sigma$-measurable. $(**)$
$A^C \in \Sigma$
$1_{A^C}$ is $\Sigma$-measurable.


If $A^C \in \Sigma$, then:


$1_{A^C}$ is $\Sigma$-measurable.
$A \in \Sigma$
$1_{A}$ is $\Sigma$-measurable.


So, if $A \in \Sigma$, then

$$f = 1 \times 1_A + b \times 1_{A^C}$$

since finite sums of $\Sigma-$measurable functions are $\Sigma-$measurable and finite products of $\Sigma-$measurable functions are $\Sigma-$measurable.

If our measure space is $(\mathbb R, \mathscr B(\mathbb R), \lambda)$, then $A \in \mathscr B(\mathbb R)$ because $A$ is an interval.



$(**)$ Note: We say a function $f$ is $\Sigma-$measurable from $(S, \Sigma, \mu)$ to $(\mathbb R, \mathscr B(\mathbb R))$ if

$\sigma(f) := \{f^{-1}(B) | B \in \mathscr B(\mathbb R)\} \subseteq \Sigma$

Now, if $f$ is a constant, then

$\sigma(f) = \{\emptyset, S\} \subseteq \Sigma$

If $f = 1_B$ for $B \in \Sigma$, then

$\sigma(f) = \sigma(B) \subseteq \Sigma \tag{*}$

$(*)$ Note: $B \in \Sigma \to \sigma(B) := \{\emptyset, B, B^C, S\} \subseteq \Sigma$