Of course the $\sigma$-algebra we put on $\mathbb{R}$ is of importance when speaking of measurability. If $\mathcal{E}$ and $\mathcal{F}$ are two $\sigma$-fields on $\mathbb{R}$, then $f:\mathbb{R}\to\mathbb{R}$ is $(\mathcal{E}$,$\mathcal{F})$-measurable (or short measurable) if $ f^{-1}(A)\in\mathcal{E},\quad \text{for all }A\in\mathcal{F}. $ If we let $\mathcal{F}$ be the trivial $\sigma$-field, i.e. $\mathcal{F}=\{\emptyset,\mathbb{R}\}$ and let $\mathcal{E}$ be any $\sigma$-field, then every function $f:\mathbb{R}\to\mathbb{R}$ is measurable (why?).
The most common $\sigma$-field to put on $\mathbb{R}$ is the Borel $\sigma$-field denoted by $\mathcal{B}(\mathbb{R})$. This has many characterizations. Here's a few:
- $\mathcal{B}(\mathbb{R})=\sigma(\{A\subseteq \mathbb{R}\mid A\text{ is open}\})$,
- $\mathcal{B}(\mathbb{R})=\sigma(\{(a,b)\mid a,b\in\mathbb{R},\;a,
- $\mathcal{B}(\mathbb{R})=\sigma(\{(-\infty,b)\mid b\in\mathbb{R}\})$,
- $\mathcal{B}(\mathbb{R})=\sigma(\{(a,b)\mid a,b\in\mathbb{Q},\;a.
If we want to show that a function $f:\mathbb{R}\to\mathbb{R}$ is $(\mathcal{B}(\mathbb{R}),\mathcal{B}(\mathbb{R}))$-measurable, then we could check that $f^{-1}(A)\in\mathcal{B}(\mathbb{R})$ for all $A\in\mathcal{B}(\mathbb{R})$ (or just for all $A$ in any of the above generators). This is, however, often impossible to carry out in practice, so we have to rely on results on measurability.
Here are some of the most important results:
Every continuous function $f:\mathbb{R}\to\mathbb{R}$ is $(\mathcal{B}(\mathbb{R}),\mathcal{B}(\mathbb{R}))$-measurable
-
If $f,g:\mathbb{R}\to\mathbb{R}$ are $(\mathcal{B}(\mathbb{R}),\mathcal{B}(\mathbb{R}))$-measurable functions, then the composition $f\circ g$ is also $(\mathcal{B}(\mathbb{R}),\mathcal{B}(\mathbb{R}))$-measurable.
-
If $f,g:\mathbb{R}\to\mathbb{R}$ are $(\mathcal{B}(\mathbb{R}),\mathcal{B}(\mathbb{R}))$-measurable functions, then $ c\cdot f, \; f+g, \; f\cdot g,\; f\wedge g,\; f\vee g $ are again $(\mathcal{B}(\mathbb{R}),\mathcal{B}(\mathbb{R}))$-measurable functions (for every $c\in\mathbb{R}$).
-
If $(f_n)_{n\geq 1}$ is a sequence of $(\mathcal{B}(\mathbb{R}),\mathcal{B}(\mathbb{R}))$-measurable functions, then $ C=\{x\in\mathbb{R}\mid \lim_{n\to\infty}f_n(x)\text{ exists in }\mathbb{R}\}\in\mathcal{B}(\mathbb{R}) $ and the function $f:\mathbb{R}\to\mathbb{R}$ defined by $ f(x)= \begin{cases} \lim_{n\to\infty}f_n(x),\quad &\text{if }x\in C,\\ 0,& \text{if }x\in \mathbb{R}\setminus C, \end{cases} $ is again $(\mathcal{B}(\mathbb{R}),\mathcal{B}(\mathbb{R}))$-measurable.
-
If $A_1,\ldots,A_k$ are disjoint Borel sets in $\mathbb{R}$ such that $\mathbb{R}=\bigcup_{i=1}^n A_i=\mathbb{R}$ and $f:\mathbb{R}\to\mathbb{R}$ is given by $ f(x)= \begin{cases} f_1(x),\quad &x\in A_1,\\ f_2(x),\quad &x\in A_2,\\ \;\;\vdots \\ f_n(x),\quad &x\in A_n, \end{cases} $ where $f_j:A_j\to\mathbb{R}$ are continuous. Then $f$ is $(\mathcal{B}(\mathbb{R}),\mathcal{B}(\mathbb{R}))$-measurable.
With these in hand, you should be able to show that your function is $(\mathcal{B}(\mathbb{R}),\mathcal{B}(\mathbb{R}))$-measurable. Also note that these results can be generalized much, i.e. when $f:X\to\mathbb{R}^d$ for example, where $X$ is any set equipped with a $\sigma$-field.