Proving a real valued function is periodic, and sketching it using obtained information 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)? 
 A: There's an error, and a solution that you forgot:
$$\cos y=\cos \Bigl(\frac{\pi }{2}-4x\Bigr)\iff\begin{cases}y= \dfrac{\pi }{2}-4x + 2k\pi \\\text{or}\\y\equiv 4x- \dfrac{\pi }{2}+2k\pi\end{cases}$$
$\,\dfrac\pi8+(2k-1)\dfrac\pi4\le x\le \dfrac\pi8+k\dfrac\pi2\,$ corresponds to the first series of solutions and 
$\,\dfrac\pi8+k\dfrac\pi2\le x\le \dfrac\pi8+(2k+1)\dfrac\pi4\,$ corresponds to the second series.
Some explanations:
As  the range of the $\arccos$ function is $[0,\pi]$, we have to solve:
\begin{alignat*}{2}
&\begin{cases}
\dfrac{\pi }{2}-4x + 2k\pi\ge 0\\\dfrac{\pi }{2}-4x + 2k\pi\le \pi
\end{cases}\enspace (\text{first case})
&\qquad\quad&\begin{cases}
4x -\dfrac{\pi }{2}+ 2k\pi\ge 0\\4x -\dfrac{\pi }{2}+ 2k\pi\le \pi
\end{cases}\enspace  (\text{second case})
\end{alignat*}
At the ‘break’ points, the function is not differentiable. However it has a left and a right semi-derivatives.
A: $\newcommand{\Reals}{\mathbf{R}}$Generally, if $f:\Reals \to \Reals$ is $\ell$-periodic (for some positive real number $\ell$), and if $g$ is an arbitrary real-valued function defined on the image of $f$, then $g \circ f$ is $\ell$-periodic (easy exercise).
In your case, you can take $f(x) = \sin(4x)$ (which is $\pi/2$-periodic) and $g(x) = \arccos x$. You can view $f:\Reals \to [-1, 1]$ and $g:[-1, 1] \to [0, \pi]$. The composition therefore sends $\Reals$ to $[0, \pi]$.
To sketch the graph, it's enough to plot $g \circ f$ over one period of $f$, i.e., over any convenient interval of length $\pi/2$, and then to "extend by periodicity", a fancy term for continuing the graph by shifting the existing curve horizontally by integer multiples of the period, $\pi/2$.
To see why your computation leads to a questionable conclusion, let's examine each step carefully.
If
$$
y = \arccos\bigl(\sin(4x)\bigr),
\tag{1}
$$
then
$$
\cos(y) = \sin(4x)
\tag{2}
$$
by taking cosines of both sides. However, (2) does not imply (1); by definition, $0 \leq \arccos(*) \leq \pi$, so (2) implies (1) only under the additional hypothesis $0 \leq y \leq \pi$.
To investigate the derivative, it's straightforward to calculate one-sided limits of $(g \circ f)'$ at $(\pi/8) + k\pi/4$, the points where $f$ achieves the value $\pm1$ and the graph of $g \circ f$ has corners.
