Find the range of $f(x)=\frac1{1-2\sin x}$ Question:

Find the range for $f(x)= 1/(1-2\sin x)$

Answer :

$ 1-2\sin x \ne 0 $ 
$ \sin x \ne 1/2 $

My approach:

For range : 
$ -1 ≤ \sin x ≤ 1 $ 
$ -1 ≤ \sin x < 1/2$   and   $1/2<\sin x≤1 $  , because $\sin x≠1/2$ 
$ -2 ≤ 2\sin x <1 $ and $ 1< 2\sin x≤2 $ 
$ -1 < -2\sin x ≤2 $ and $ -2≤ -2\sin x<-1 $ 
$ 0 < 1-2\sin x ≤3   $ and $ -1≤ 1-2\sin x<0 $ 

I am stuck at the last step. If I take reciprocal i.e., $\frac 1{1-2\sin x}$ I get :
$ \frac10 < \frac1{1-2\sin x} ≤\frac13   $ and $ -1≤ \frac1{1-2\sin x} < \frac 10 $ 
$1/0$ can be interpreted as infinity so the second equation gives range of $f(x)$ as $[-1,∞)$. But the correct answer is : $(−∞,−1]∪[\frac13,∞)$
Any alternative solutions are welcome :)
P.S. : Also $\frac1{1-2\cos x}$ will also have the same range, right? As $\sin x$ and $\cos x$ both lie between $[-1,1]$. So the answer will proceed in similar fashion to the given one.
 A: The numbers of the form $1-2\sin x$ ($x\in\Bbb R$) are those from $[-1,3]$. So, the numbers of the form $\frac1{1-2\sin(x)}$ are those from $(-\infty,-1]\cup\left[\frac13,\infty\right)$.
A: 
because $\sin x\neq 1/2$

That is not valid as it's circular reasoning, which is a fallacy in argument.
So, you had:
$-1\leq\sin x \leq1$
$\Rightarrow-2\leq2\sin x \leq2$
$\Rightarrow2\geq-2\sin x \geq-2$, that is, $-2\leq-2\sin x \leq2$
$\Rightarrow-1\leq1-2\sin x \leq3$
Now, when we take reciprocal, similar to what we do when we multiply the whole inequality by "$-$" the inequality reverses. So:
$\Rightarrow\frac1{-1}\geq\frac1{1-2\sin x} \geq\frac13$
$\therefore\frac1{1-2\sin x}\geq\frac13 \ $ also, $ \ \frac1{1-2\sin x} \leq -1$
Thus, we get our range as $(-\infty,-1]\cup[\frac13,\infty)$
But, note that $1/0$ is not defined so that means $(1-2\sin x)$ shouldn't be $0$. 
So, $\sin x\neq \frac12$.

Yup, replacing $\sin x$ by $\cos x$ won't change the answer, it'll behave the same way.
A: You made an error when you took reciprocals.  When $a, b$ have the same sign, $$a < b \implies \frac{1}{a} > \frac{1}{b}$$
You failed to reverse the direction of the inequalities when you took reciprocals.
Since the denominator cannot be zero, you correctly concluded that the function is defined for those real numbers $x$ such that $\sin x \neq \dfrac{1}{2}$.
Since $-1 \leq \sin x \leq 1$ and $\sin x \neq \dfrac{1}{2}$, $-1 \leq \sin x < 1/2$ or $1/2 \leq \sin x \leq 1$.  Note the use of the word or since those two inequalities cannot simultaneously be true.
Let's consider the inequality $-1 \leq \sin x < \dfrac{1}{2}$.
\begin{align*}
-1 \leq & \sin x < \frac{1}{2}\\
-2 \leq & 2\sin x < 1\\
2 \geq & -2\sin x > -1\\
3 \geq & 1 - 2\sin x > 0
\end{align*}
If $a, b > 0$, then $a < b \implies \dfrac{1}{a} > \dfrac{1}{b}$.  To see this, observe that
$$\frac{1}{a} - \frac{1}{b} = \frac{b - a}{ab} > 0$$
since $b - a > 0$ by definition of $a < b$ and $ab > 0$ since the product of positive numbers is positive.  Thus, when you took reciprocals, you should have obtained
$$\frac{1}{3} \leq \frac{1}{1 - 2\sin x}$$
Now, let's consider the inequality $\dfrac{1}{2} < \sin x \leq 1$.
\begin{align*}
\frac{1}{2} & < \sin x \leq 1\\
1 & < 2\sin x \leq 2\\
-1 & > -2\sin x \geq -2\\
0 & > 1 - 2\sin x \geq -1
\end{align*}
If $a, b < 0$, then $a < b \implies \dfrac{1}{a} > \dfrac{1}{b}$.  The proof is identical to that given above for positive numbers except that $ab > 0$ since the product of two negative numbers is positive.  Hence, when you took reciprocals, you should have obtained
$$\frac{1}{1 - 2\sin x} \leq -1$$
Since $\dfrac{1}{3} \leq \dfrac{1}{1 - 2\sin x}$ or $\dfrac{1}{1 - 2\sin x} \leq -1$, the range of the function $f(x) = \dfrac{1}{1 - 2\sin x}$ defined on all real numbers except those for which $\sin x = 1/2$ is
$$(-\infty, -1] \cup \left[\frac{1}{3}, \infty\right)$$
A: Plot the graph of $f(x)=\frac{1}{1-2sinx}$ using https://www.desmos.com/calculator and you will see that the correct answer if $\left(-\infty, -1\right] \cup \left[\frac{1}{3}, \infty\right).$ For your reference, the graph is drawn below.

