[Math] Domain and range of a floor function

algebra-precalculuscalculusceiling-and-floor-functionsfunctions

$$f(x)=\sqrt{4[x]-[4x]}$$ what is the domain and range of f(x)?
I tried to plot it ,and saw $$d_f=[n,n+0.25)\\R_f={0}$$ but I can't get there .
Help me to find them please . [x]=floor function .

Best Answer

suppose $x=n+p\\0\leq p<1$ $$\quad{f(x)=\sqrt{4[x]-[4x]}=\\\sqrt{4[n+p]-[4(n+p)]}=\\ \sqrt{4n-[4n+4p]}=\\ \sqrt{4n-4n-[4p]}=\\ \sqrt{-[4p]}\\\implies-[4p]\geq 0\\ [4p]\leq 0 \implies [4p]=0 \\0 \leq 4p<1 \\0\leq p <\frac{1}{4} \to\\D_{f(x)}=[n,n+\frac{1}{4}) ,n \in \mathbb{Z}\\R_{f(x)}=\{\sqrt{0}\}=\{0\} }$$