<s>[INST] Range of function involving fractional part and integer part of $x$ 
The range of function $$f(x) = \left\{\frac{x}{4}\right\}+\cos \left(\frac{1-2\lfloor x \rfloor }{2}\right)+\sin \left(\frac{\pi \lfloor x \rfloor }{2}\right)$$
Where $\{x\} = x-\lfloor x \rfloor$ and $\lfloor x \rfloor $ represent floor function of $x$.

$\bf{My\; Try::}$ If $x$ is a multiple of $4\;,(x=4k\; ,k\in \mathbb{Z})$ Then $$f(x) = 0+\cos \left(\frac{1-8k}{2}\right)$$
But i did not understand If $x\neq 4k\;, k\in \mathbb{Z},$ Help required, Thanks
 [/INST] We consider four cases.
i) Let $x=4k+t$ with $k\in \mathbb{Z}$ and $t\in [0,1)$ then
$$f(x) = \frac{t}{4}+\cos \left(\frac{1-8k}{2}\right)=\frac{t}{4}+\cos \left(\frac{8k-1}{2}\right).$$
Hence if $A_0:=\cup_{k\in\mathbb{Z}}[4k,4k+1)$ then
$$f(A_0)=\bigcup_{k\in\mathbb{Z}}\left[\cos \left(\frac{8k-1}{2}\right),\frac{1}{4}+\cos \left(\frac{8k-1}{2}\right)\right)$$
ii) Let $x=(4k+1)+t$ with $k\in \mathbb{Z}$ and $t\in [0,1)$ then
$$f(x) = \frac{1+t}{4}+\cos \left(\frac{1-2(4k+1)}{2}\right)+1
=\frac{5+t}{4}+\cos \left(\frac{8k+1}{2}\right)
.$$
Hence if $A_1:=\cup_{k\in\mathbb{Z}}[4k+1,4k+2)$ then
$$f(A_1)=\bigcup_{k\in\mathbb{Z}}
\left[\frac{5}{4}+\cos \left(\frac{8k+1}{2}\right),\frac{3}{2}+\cos \left(\frac{8k+1}{2}\right)\right)$$
iii) Let $x=(4k+2)+t$ with $k\in \mathbb{Z}$ and $t\in [0,1)$ then
$$f(x) = \frac{2+t}{4}+\cos \left(\frac{1-2(4k+2)}{2}\right)
=\frac{2+t}{4}+\cos \left(\frac{8k+3}{2}\right)
.$$
Hence if $A_2:=\cup_{k\in\mathbb{Z}}[4k+2,4k+3)$ then
$$f(A_2)=\bigcup_{k\in\mathbb{Z}}
\left[\frac{1}{2}+\cos \left(\frac{8k+3}{2}\right),\frac{3}{4}+\cos \left(\frac{8k+3}{2}\right)\right)$$
iv) Let $x=(4k+3)+t$ with $k\in \mathbb{Z}$ and $t\in [0,1)$ then
$$f(x) = \frac{3+t}{4}+\cos \left(\frac{1-2(4k+3)}{2}\right)-1
=\frac{-1+t}{4}+\cos \left(\frac{8k+5}{2}\right)
.$$
Hence if $A_3:=\cup_{k\in\mathbb{Z}}[4k+2,4k+3)$ then
$$f(A_3)=\bigcup_{k\in\mathbb{Z}}
\left[-\frac{1}{4}+\cos \left(\frac{8k+5}{2}\right),\cos \left(\frac{8k+5}{2}\right)\right)$$
Now, $f(\mathbb{R})=f(A_0)\cup f(A_1)\cup f(A_2)\cup f(A_3)$.
In order to conclude we use the fact that the sequences of all these cosine values are in $(-1,1)$ and they are dense in $[-1,1]$. Therefore $f(\mathbb{R})=(-1/4-1,3/2+1)=(-5/4,5/2)$.
Does it make sense?
</s>