# Showing that a discontinuous function is or is not borel measurable.

So my question is this. Please let me know if my answer is sufficient.

Let $$f(x) = \begin{cases} \sin(\frac{1}{x}) &\quad\text{if } x \neq 0,\\ \text{5} &\quad\text{if } x = 0\\ \end{cases}$$ be defined on the whole real line. Is $f$ Borel measurable.

My way of thinking is to use the definition of measurable function;

Suppose we have a set X together with a sigma-algebra $\Sigma$. Function $f:X \rightarrow \mathbb{R}$ is measurable or $\Sigma$-measurable if the set $\{x:f(x)>a\}$ belongs to $\Sigma$ for all $a \in \mathbb{R}$.

Therefore, from the question, I obtained the two following facts;

• If $a \geq 5$ then $\{x \in \mathbb{R}: f(x) > a\}=\emptyset$

Surely, this is all that is required to show that it is not Borel measurable as the empty set doesn't generate a sigma algebra.

• Hi again - the empty set doesn't generate the Borel sigma algebra, but it is in the Borel sigma algebra. So we're okay (at least for $a \geq 5$). – Kenny Wong May 3 '17 at 23:38
• By the way, it's good to remember that continuous functions are always Borel measurable. (Can you see why?) This doesn't quite solve your question, but it will get you close to the answer. – Kenny Wong May 3 '17 at 23:39
• If $A \in \Sigma$, is $B = \{x, 1/x \in A\}$ in $\Sigma$ ? This should help for $\sin(1/x)$ on $(0,\infty)$ – reuns May 3 '17 at 23:45
• So have I answered the question? I know the function is made up of a continuous function plus a constant function, which are both measurable in their own right, but doesn't something have to be measurable across the entirety of its domain - not just at the continuous parts? – Catherine Drysdale May 3 '17 at 23:46
• Yes, you're on the right track. Let's consider $\{ x \in \mathbb R : f(x) > a \}$, for some value of $a$. From what you said, you know that $\{ x \in \mathbb R : f(x) > a \} \cap (\mathbb R \ \backslash \ \{ 0 \})$ is measurable (because $f$ is continuous on $\mathbb R \ \backslash \ \{ 0 \}$). But the question remains as to whether $\{ x \in \mathbb R : f(x) > a \}$ itself is measurable. Can you think of a way to tackle this? – Kenny Wong May 3 '17 at 23:49

Say we have a function g, which is continuous. Then $\{x:g(x) > a \} =g^{-1}(a, \infty)$ is open, and hence Borel.
We fix any $a \in \mathbb{R}$, $\{x:f(x) > a \} ="\{x:\sin(\frac{1}{x}) > a \}$. Where we have put the equals in quotation marks because we are disregarding the zero point.
Since $\sin(\frac{1}{x})$ is continuous on $\mathbb{R} \setminus \{0\}$, we have $\{x:f(x) > a \} = f^{-1}(a,\infty)\cap\mathbb{R}\setminus\{0\} \cup \{0\}$, i.e. the union of two borel sets, hence the function is Borel.