Consider an arbitrary function, something like $f\left ( x \right )=\arccos \left ( \sin \left ( 4x \right ) \right )$.
Its graph looks like this:
I was greatly confused by the image below, because before using a tool to graph the function I came to following results:
$$y=\arccos \left ( \sin \left ( 4x \right ) \right )$$ $$\cos \left ( y \right )=\sin \left ( 4x \right )=\cos (\frac{\pi }{2}-4x)$$ $$y=\frac{\pi }{2}-x+2k\pi, k\in\mathbb{Z} $$ This answers the first part of my question about $f$ being a periodic function. However, since the range of the inverse cosine function is $\left [ 0,\pi \right]$ it seemed to me that I had made a crucial mistake somewhere. How should one variate the parameter $k$ in order do get a graph as shown below, and what would be the derivative of the function at points where it "breaks"? Is it zero because those points represent local extrema, or is it infinity (maybe the same case as with the function $y= \left | x \right |$ at zero)?