<s>[INST] Finding out the range of $g(x)=\sin x + \cos x$ If $x$ is such that $$\lfloor2\sin x\rfloor+\lfloor{\cos x}\rfloor=-3$$ for some $x \in [0,25]$ then the question is to find out the range of the function $$g(x)=\sin x+\cos x$$Here the function $g(x)$ assumes those values of $x$ which satisfies the above equation in the given interval
$\lfloor.\rfloor$ represents greatest integer function.
I tried rewriting the equation as $$2 \sin x+\cos x -2\lbrace(\sin x)\rbrace-\lbrace(\cos x)\rbrace=-3$$ which can be rewritten as $$g(x)=-3+2\lbrace(\sin x)\rbrace+\lbrace(\cos x)\rbrace-\sin x$$ I again rewrote it as $$g(x)=-3-\lfloor\sin x\rfloor+\lbrace(\sin x)\rbrace+\lbrace(\cos x)\rbrace$$ $\lfloor\sin x\rfloor=\lbrace 0,-1 \rbrace$.I tried to further find out the range of this but failed.Any ideas?Thanks.
Here $\lbrace.\rbrace$ represents fractional part.
 [/INST] Note that $\lfloor \cos x \rfloor $ only takes values $-1,0,1$.
Let $S = \{x \in [0,2 \pi] | \lfloor \cos x \rfloor + \lfloor 2\sin x \rfloor = -3 \}$.
If $\lfloor \cos x \rfloor = 0$, then we would need to have $\lfloor 2\sin x \rfloor = -3$ which is impossible.
If $\lfloor \cos x \rfloor = 1$, then we would need to have $\lfloor 2\sin x \rfloor = -4$ which is impossible.
Hence we must have $\lfloor \cos x \rfloor =-1$ and so
If $\lfloor \cos x \rfloor =-1$, then we must have $\lfloor 2\sin x \rfloor = -2$, and hence
$x \in ({7 \over 6} \pi, {9 \over 6} \pi)$.
Hence $S = ({7 \over 6} \pi, {9 \over 6} \pi)$.
We note that $g$ has a (global) $\min$ at $x={5 \over 4} \pi$, and
$g({5 \over 4} \pi) = -\sqrt{2}$.
Since $g$ is unimodal in $S$, we see that $g(S) = [-\sqrt{2}, -1)$
(since $\max(g({7 \over 6} \pi), g({9 \over 6} \pi)) = -1$).
</s>