Find the Domain of $f(x)=\sqrt{\log(1/|\sin x|) }$ textbook solution of above question is given by
for $$\sqrt{\log\frac1{|\sin x|} }$$ to be defined $\log\left(\frac 1{|\sin x|}\right)$ has to be > or = 0, for that $1/|\sin x| >$ or $= 1$ and $\sin x \neq 0$, thus domain is $\Bbb R - \{n\pi, n \in I\}$.
But if I use property of log that is $\log(a/b)=\log a - \log b$
then I get $$\log 1 - \log |\sin x|= 0 - \log |\sin x|= - \log |\sin x|$$
So for $\sqrt{\log(\frac1{|\sin x|} ) }$ to be defined, $\log |\sin x|$ has to be negative and $|\sin x|$ has to between 0 and 1, which is true for all $x \in \Bbb R$. I don't understand what I am doing wrong.
 A: Your reasoning is mostly correct! The only thing you missed is that for $\log(|\sin(x)|)$ to be defined, you need $\sin(x) \neq 0$. That's why you have to exclude the set of points $\{n\pi : n \in \mathbb{Z} \}$.
A: In order to get the right answer we should go step by step.
First of all let's study $$\frac{1}{|sin(x)|}$$
and we have to cancel from the domain every point where $sin(x) = 0$ so we obtain $\mathbb{R} - \{n\pi : n \in \mathbb{Z}\}$.
Then we proceed with $$log \bigg(\frac{1}{|sin(x)|}\bigg)$$ and we have to check when the argument of the logarithm is greater then zero. Since $|sin(x)|$ is positive $\forall x \in \mathbb{R}$ we also obtain $\mathbb{R} - \{n\pi : n \in \mathbb{Z}\}$. In the end we have to check the existence of the square root and we need:
$$log \bigg(\frac{1}{|sin(x)|}\bigg) ≥ 0 \iff \frac{1}{|sin(x)|} ≥ 1 $$ I'll let you check that is true  $\forall x \in \mathbb{R} - \{n\pi : n \in \mathbb{Z}\}$  (if needed ask and I'll provide calculations). For the last part of the question if we use logarithm's proprieties we obtain
$$\sqrt{-log(|sin(x)|) }$$
and repeating the step by step reasoning we also obtain that the domain $\mathbb{R} -\{n\pi : n \in \mathbb{Z}\}$.
Last but not least be a little careful when you use this kind of propriety when you study domain of functions, a trivial but important example: $$f(x) = 1 = \frac{x}{x}$$ In the first case the domain is clearly the real line, in the second case we have a eliminable discontinuity in $x = 0$. Hope this helps.
A: Hint
$$\log 0^+\sim -\infty$$
Whenever a function becomes $\pm \infty$ it is not defined and one has to exclude such $x$ values from the domain. So $x=n\pi, 0, \pm 1, \pm 2,...$ have to be removed from the set of all real numbers for the domain of a function.
Domain of $f(x)$ is set of all real and finite values of $x$ where $f(x)$ takes real, finite and unique value.
