Find the domain and range of the function $$f(x)=\frac{1}{\sqrt{[\cos x]-[\sin x]}}$$ Where [] denotes the greatest integer function.
I started as $[\cos x]-[\sin x]\gt0$
$\implies \cos x\ge[\sin x]+1$ as $[y]\gt n;n\in I \implies y\ge n+1$
Also as $[\sin x]\le \sin x\lt[\sin x]+1$
$\implies \cos x\gt \sin x$
But my book gives the solution as
$[\cos x]-[\sin x]\gt0$
$\implies \cos x\ge \sin x+1$
And so on...
What is the error in my solution?
I know that I could solve it graphically but I would prefer an algebraic solution. Mathematica gives the same solution as my book i.e., $x\in [2n\pi-\frac{\pi}{2},2n\pi]$.
$$[\cos x] > [\sin x] \rightarrow$$ Case 1. $[\cos x] = 1$ and $[\sin x] = 0$ or $-1$ i.e $\cos x = 1$. Then automatically $\sin x = 0$
$\rightarrow x = 0$
Case 2. $[\cos x] = 0$ and $[\sin x] = -1$ i.e. $1 < \cos x \leq 0$ and $0<\sin x \leq -1$
$\rightarrow x \in [\frac{3 \pi}{2}, 2 \pi)$