How to write a set that excludes some points from the set of all reals I wish to describe the domain of $$ f(x)=\frac{1}{\sin(x)-\frac{1}{2}}.$$
My first thoughts were to describe it as $$x\in \mathbb{R}\setminus\left\{ \dfrac\pi6+2k\pi, \dfrac{5\pi}6+2k\pi\right\}\text{such that }k\in \mathbb{Z}.$$
However, I'm not sure if it is correct, and if there is a better way?
 A: *

*

I wish to describe the domain of $$ f(x)=\frac{1}{\sin(x)-\frac{1}{2}}.$$

Using the compact formula for the general solution of $\sin x=y:$ $$\sin x=\frac12\iff \exists k\in\mathbb Z \;\;\;x=\pi k+(-1)^k\arcsin\frac12.$$
So, the required domain is most compactly written as $$\mathbb R\setminus\left\{\pi k+(-1)^k\arcsin\frac12\,\Bigg|\,k\in\mathbb Z\right\}.$$


*

$$x\in \mathbb{R}\setminus\left\{ \dfrac\pi6+2k\pi, \dfrac{5\pi}6+2k\pi\right\}\text{such that }k\in \mathbb{Z}$$

This statement has two problems:

*

*It guarantees only that two points are excluded from $\mathbb R.$
On the other hand, $$\mathbb{R}\setminus\left\{x\,\bigg|\,\text{for some }k\in \mathbb{Z},\ x= \dfrac\pi6+2k\pi\,\text{ or }\,\dfrac{5\pi}6+2k\pi \right\}$$ equals the set that I gave above.


*The statement $$x\in S \iff x\in\text{domain}$$ or, more clearly, $$\text{for each }x,\quad x\in S \iff x\in\text{domain}$$ is equivalent to $$\text{domain}= S;$$ whereas the statement $$x\in S$$ or, more clearly, $$\text{for each }x\text{ in the domain},\quad x\in S$$ guarantees only that the required domain is a subset of $S.$
Think about it: if $x$ is an element of the domain $\{4,5\},$ then saying that  $$x\in\{3,4,5,6\},$$ while correct, does not actually tell us the actual domain.
