What is the value of $f(100)$?
Because $f$ has a primitive $F$, then $f = F'$ has the intermediate value property. Note that $f(\mathbb{R}) \subseteq \{2kπ \mid k \in \mathbb{Z}^*\}$ since $\cos(f(x)) \equiv 1$ and $f(x) \neq 0 \ (\forall x \in \mathbb{R})$, thus $f$ is a constant function. Also$$ |f(π) - π| \leqslant π \Longrightarrow 0 \leqslant f(π) \leqslant 2π, $$ therefore$$ f(π) = 2π, $$ which implies$$ f(x) \equiv 2π. \quad \forall x \in \mathbb{R} $$
Clearly $f(x)=2\pi k_x$ where $k_x\in\mathbb Z$ Besides $$|2\pi k_x-\pi|\le\pi\iff-\pi\le2\pi k_x-\pi\le\pi\Rightarrow 0\le k_x\le1$$ Since $k_x$ is an integer the problem gives two solutions $f(x)=0$ and $f(x)=2\pi$ but because of the function is from $\Bbb R$ to $\Bbb R^*$ the only solution is $$f(x)=2\pi$$