Is the minimal modulus of continuity of a $C^k$ function also $C^k$? Let $f: [0, 1] \to \mathbb R$ be a continuous function. Define the minimal modulus of continuity of $f$, $\omega(f): \mathbb R^+ \to \mathbb R$ by
$$\omega(f)(\delta) := \inf \{\varepsilon > 0 \, \big | \, |f(x) - f(y)| < \varepsilon \text{ for all }  x, y \in [0, 1] \text{ with } |x - y| < \delta\}.$$
Question: For $f$ a $C^k$ function, is $\omega(f)$ a $C^k$ function?
Here $C^k$ denotes the set of $k$ times differentiable functions.
 A: $\newcommand\de\delta\newcommand\De\Delta\newcommand\om\omega$No. E.g., if $f(x)=\cos\pi x$, then
$$\om(f)(\de)=2\sin\Big(\frac\pi2\,\min(\de,1)\Big). $$
So, $f\in C^2$ but $\om(f)\notin C^2$.
A simpler example is $f(x)=x$. Then $\om(f)(\de)=\min(\de,1)$. So, $f\in C^1$ but $\om(f)\notin C^1$.

If the domain of $\om$ is restricted to $[0,1]$, there still is a counterexample. Indeed, let the function $f$ be such that for $x\in[0,1]$
\begin{equation}
f(x)=
\left\{
\begin{aligned}
    x(1-x)(2-x)&\text{ if }x\le\frac2{10},\\
    \tfrac1{15}\,(x-2)&\text{ if }x\ge\frac2{10}.  
\end{aligned}
\right.
\end{equation}
Here is the graph of $f$:

For the function $\om:=\om(f)$, we shall show that (i) $\om$ is constant in a right neighborhood of the point $\De:=\frac1{5\sqrt3}$ and hence the right second derivative of $\om$ at $\De$ is $0$, whereas the left second derivative of $\om$ at $\De$ is $<0$. So, $\om\notin C^2$.
Moreover, $\om(\De)$ is  strictly less than the largest value of $\om$.
Note that the continuous function $f$ is smooth everywhere on $[0,1]$ except at the point $\frac2{10}$.
However, we shall show that we can change $f$ in a neighborhood of $\frac2{10}$ to make the resulting function however smooth, without changing the values of $\om(\de)$ for $\de$ near $\De$ at all.
Thus, the modulus of continuity of the resulting smooth function will not be in $C^2$.
(Even though details of calculations will be provided below, one might say that the stated  properties of the function $f$ are almost obvious from the picture, except perhaps for the specific value of $\De$. Our visual apparatus is a powerful computer!)

Details of the corresponding calculations are shown below. These calculations -- for the piecewise-polynomial function $f$, with the degrees of the polynomials $\le3$, are quite elementary, but very nasty, as a large number of cases have to be considered. Therefore, these calculations are done with Mathematica:


