Is there a nonpolynomial $C^\infty$ function $f$ such that $\sup_{x \in \mathbb{R}} \lvert f^{(q)}(x) \rvert \leq (\ln q)^{-q}$ for every $q >1$? The question is as in the title:
Is there a nonpolynomial $C^\infty$ function $f$ on $\mathbb{R}$ such that $\sup_{x \in \mathbb{R}} \lvert f^{(q)}(x) \rvert \leq (\ln q)^{-q}$ for every natural number $q >1$?
Here, "nonpolynomial" excludes constant functions as well, of course.
I think nonpolynomial functions "very uniformly approximating" a constant function" might satisfy such a bound, but I cannot find such a nice example.
Could anyone please help me?
 A: $\newcommand{\R}{\mathbb R}\newcommand\ep\varepsilon\newcommand{\de}{\delta}$Let us prove the following weaker statement, hoping it would help to find a complete solution of the posted problem.

Proposition 1: Suppose that a function $f\in C^\infty(\R)$ is such that
\begin{equation*}
    |f^{(k)}|\le2^{-c_k 2^k} \tag{1}\label{1}
\end{equation*}
for all $k=0,1,\dots$, where $c_k\to\infty$ (as $k\to\infty$). Then $f$ is constant.

The proof of Proposition 1 is based on

Lemma 1: Suppose that $g\in C^2(\R)$, $|g|\le B\in(0,\infty)$, and $|g'(a)|\ge C\in(0,\infty)$ for some real $a$. Then
\begin{equation*}
|g''(x)|\ge D:=\frac{C^2}{2B}   
\end{equation*}
for some real $x$.

Proof of Lemma 1: To obtain a contradiction, suppose that $|g''|<D$.
Using the vertical and/or horizontal reflections of the graph of $g$, without loss of generality (wlog) assume that $g(a)\ge0$ and $g'(a)\ge0$, so that $g'(a)\ge C>0$. So, for any real $b>0$,
\begin{equation*}
    g(a+b)>g(a)+g'(a)b-Db^2/2\ge0+Cb-Db^2/2=B
\end{equation*}
if $b=2B/C$, which contradicts condition $|g|\le B$. $\quad\Box$
Proof of Proposition 1: To obtain a contradiction, suppose that $\ep_1:=|f'(a_1)|>0$ for some real $a_1$. By \eqref{1}, $|f^{(k)}|\le B$ for some real $B\ge\ep_1$ and all $k=0,1,\dots$. So, by Lemma 1,
\begin{equation*}
|f''(a_2)|\ge\ep_2:=\frac{\ep_1^2}{2B}  
\end{equation*}
for some real $a_2$. Continuing so, we get a sequence $(\ep_1,\ep_2,\dots)$ of positive real numbers and a sequence $(a_1,a_2,\dots)$ of real numbers such that for all $k=1,2,\dots$
\begin{equation*}
|f^{(k)}(a_k)|\ge\ep_k:=\frac{\ep_{k-1}^2}{2B}  
\end{equation*}
and hence, with $c:=\frac12\log_2\frac{2B}{\ep_1}\in(0,\infty)$,
\begin{equation*}
|f^{(k)}(a_k)|\ge\ep_k=2^{-c2^k},   
\end{equation*}
which contradicts \eqref{1}. $\quad\Box$
A: The answer is no.  From Taylor's theorem with remainder, we see that for any integer $q>2$, we have
$$ f^{(2)}(x) = \sum_{j=0}^{q-3} \frac{f^{(2+j)}(0)}{j!} x^j + O( \frac{(\ln q)^{-q} |x|^{q-2}}{(q-2)!} )$$
and thus for $|x| \leq \frac{q \ln q}{10}$ (say) we have from Stirling's formula that
$$ \sum_{j=0}^{q-3} \frac{f^{(2+j)}(0)}{j!} x^j = O( 1 ).$$
The key point here is that we have bounded control on a polynomial on an interval of length much wider than its degree (a situation in which one expects favorable estimates thanks to the uncertainty principle).
Making the trigonometric substitution $x = \frac{q \ln q}{10} \sin \theta$ we conclude
$$ \sum_{j=0}^{q-3} \frac{f^{(2+j)}(0)}{j!} (\frac{q \ln q}{10})^j \sin^j \theta = O( 1 )$$
for all $\theta$.  The LHS is a trigonometric polynomial of degree $O(q)$, so by the Bernstein inequality we have
$$ \frac{d}{d\theta} \sum_{j=0}^{q-3} \frac{f^{(2+j)}(0)}{j!} (\frac{q \ln q}{10})^j \sin^j \theta = O( q )$$
for all $\theta$.  Evaluating this at $\theta=0$ we conclude that
$$ f^{(3)}(0) \frac{q \ln q}{10} = O(q).$$
Dividing by $q \ln q$ and sending $q \to \infty$ we conclude that $f^{(3)}(0)$ vanishes.  Applying a translation to this argument, we see that $f^{(3)}$ vanishes everywhere, thus $f$ is a polynomial (in fact it is quadratic).
