I want to prove that $\mathcal{f:[0,4\pi] \to \mathbb{R}:f(x)} = \left\{ \begin{matrix}\mathcal{\frac{1}{1+\sin(x)}} & \sin(x) \neq-1\\ 0& \sin(x)=-1 \end{matrix}\right.$ is a Borel measurable function.
This is the prove I have but I'm not completly convinced of its correctness.
Let's call $A=\{x \in [0,4\pi] | \sin(x) \neq -1\}$. We prove that $A$ is measurable.
$A=\{x \in [0,4\pi] | \sin(x) \neq -1\}$= $\{x \in [0,4\pi] | \sin(x) = -1\}^{C}$ =$\{x \in [0,4\pi] | x=\frac{-\pi}{2}+2k\pi\}^{C}$=$[\{\frac{3\pi}{2}\}\bigcup \{\frac{7\pi}{2}\}]^{C}$=$B^{C}$
Because $B$ is a countable union of singletons is $B$ measurable. Because $A$ ist he complement of $B$ is $A$ also measurable.
Now we define $g:A\to\mathbb{R}: x\to\frac{1}{1+\sin(x)}$. $g$ is a continuous function on the domain so $g$ is a measurable function.
Now $f^{-1}(D)=g^{-1}(D)$ when $\{x|\sin(x)=-1\}$ not in $D$, with D a random Borel measurable set in $[0,4\pi]$ . and $f^{-1}(D)=g^{-1}(D) \bigcup A$ when $\{x|\sin(x)=-1\}$ in $D$