Find the range of $f(x)=\arccos\frac{3\log_3\frac{\lfloor x\rfloor}{3}}{\log_3(3x^{3})}$. Find the range of $f(x)=\arccos\frac{3\log_3\frac{\lfloor x\rfloor}{3}}{\log_3(3x^{3})}$.
I thought I could  write $f(x)$ as a composition of elementary functions and then look at their graphs, but I'm not sure how to do that.
This is what I did:
$h: \Bbb R\rightarrow \Bbb R, h(x)=\frac{3\log_3\frac{\lfloor x\rfloor}{3}}{\log_3(3x^{3})}$
$g:\Bbb R\rightarrow \Bbb R, g(x)=\arccos x$
$f=g\circ h$
It would be difficult to graph $h(x)$ like this, so how can I write it as a composition of elementary functions? 
 A: $\arccos(y)$ is defined on $y \in [-1,1]$, and its range is $[0,\pi]$. The question then becomes: given $y \in [-1,1]$ is there an $x$ such that 
$$
y = \frac{3 \log_3 (\lfloor{x}\rfloor/3)}{\log_3(3x^3)}? 
$$ 
(The answer is no; see the second picture.) For the above expression to be well-defined, we need $x \geq 1$; otherwise, $\lfloor x \rfloor \leq 0$, and the top log is not defined.

Let $I_n$ denote the interval $[n,n+1)$ for $n \in \mathbb Z_{>0}$, so by change-of-base
\begin{align*}
y(x) = \frac{3 \ln (n/3)}{\ln(3x^3)}, \qquad x \in I_n.
\end{align*}
What's the range of $y|_{I_n}$? Looking for extrema, we try to solve $y'(x)=0$ and find
$$
y'(x) = 3 \ln(n/3) \left[ -1(\ln(3x^3))^{-2} \cdot \frac{9x^2}{3x^3} \right] = - \frac{9 \ln(n/3)}{x [\ln(3x^3)]^2}, \qquad x \in I_n.
$$
The denominator is always positive since $x \geq 1$. The numerator's sign depends on $n$; there are 3 cases:


*

*$1 \leq n < 3$. Then $y' > 0$, so $y$ is strictly increasing, and therefore $y(I_n) = \big[ y(n), y(n+1) \big)$.

*$n = 3$. Then $y \equiv 0$, and therefore $y(I_3) = \{0\}$.

*$n > 3$. Then $y' < 0$, so $y$ is strictly decreasing, and therefore $y(I_n) = \big( \lim_{x\uparrow n+1} y(x) , y(n) \big]$.


It's useful to have the picture below in mind when doing these calculations. Left endpoints are included and right endpoints aren't (by definition of $\lfloor x \rfloor$).

Hence the range of $f(x) = \arccos(y(x))$ is $\boxed{\operatorname{range}(f)= A \cup \{0\} \cup B}$, where
$$
A = \bigcup_{n=1}^2 \big( f(n+1), f(n) \big], \qquad B = \bigcup_{n=4}^\infty \big[ f(n) , \lim_{x \uparrow n+1} f(x) \big).
$$
The reversal of endpoints is because $\arccos(x)$ is decreasing.
Now an interesting follow-up question asks for the number of connected components of $B$, since it looks like the "pieces" of $y$ start to have overlapping range for large $n$.
