Can a function “grow too fast” to be real analytic?

Does there exist a continuous function $\: f : \mathbf{R} \to \mathbf{R} \:$ such that for

all real analytic functions $\: g : \mathbf{R} \to \mathbf{R} \:$, for all real numbers $x$,

there exists a real number $y$ such that $\: x < y \:$ and $\: g(y) < f(y) \:$?

Solutions Collecting From Web of "Can a function “grow too fast” to be real analytic?"

No. Only if you require $g$ or its coefficients to be computable. Suppose there is such an $f$, then we could just pick the points $(n,(1+\sup\{ f(z))|n-1<z<n+1\}))$, for $n=1,2,3\ldots$
and interpolate.

Recently, I was reading Hardy’s Orders of Infinity (available here or here):

Godfrey Harold Hardy. Orders of infinity. The Infinitärcalcül of Paul du Bois-Reymond.
Reprint of the 1910 edition. Cambridge Tracts in Mathematics and Mathematical Physics, No. 12. Hafner Publishing Co., New York, 1971. MR0349922 (50 #2415).

The book discusses this result, so I figured it may be worth adding some comments:

Theorem (Poincaré). For any continuous increasing $\phi:\mathbb R\to\mathbb R$ we can always find a real analytic function $f:\mathbb R\to\mathbb R$ such that $\displaystyle \lim_{x\to\infty}\frac{f(x)}{|\phi|}=+\infty$.

This was published in the American Journal of mathematics, vol. 14, p. 214. Hardy presents a proof due to Borel, in Leçons sur les séries à termes positifs, p.27:

We may replace $\phi$ with an increasing function $\Phi$ that is always positive, is pointwise larger than $\phi$, and tends to infinity, and proceed to define $f$ and show that $f/\Phi\to\infty$. Take an increasing sequence of numbers $a_n\to\infty$, and another sequence $b_n$ with
$$ a_1<b_2<a_2<b_3<a_3<\dots, $$
and define
$$ f(x)=\sum_{n\ge 1}\left(\frac x{b_n}\right)^{\nu_n}, $$
where the positive integers $\nu_n$ are strictly increasing, and satisfy $\displaystyle \left(\frac{a_n}{b_n}\right)^{\nu_n}>\Phi^2(a_n)$. Then $f$ is entire and satisfies the required property.

In detail: The series converges because, given any positive $x$, the $n$-th root of the $n$-th term is at most $x/b_n\to 0$. If $x\in[a_n,a_{n+1})$, then $f(x)>(a_n/b_n)^{\nu_n}$, so
$$ f(x)>\Phi^2(a_{n+1})>\Phi^2(x). $$
It follows that $f/\Phi^2\ge 1$ for $x\ge a_1$, and since $\Phi(x)\to\infty$, then also $f/\Phi\to\infty$, as wanted.

Hardy mentions this while discussing a result of du Bois-Reymond: Given functions $f,g\to\infty$, positive, and increasing, write $f\succ g$ iff $f/g\to\infty$.

Theorem (du Bois-Reymond). Given any “ascending scale” $(f_n)_{n\in\mathbb N}$, that is, a sequence of functions $f_n:\mathbb R\to\mathbb R$, all positive and increasing to infinity, and such that $f_1\prec f_2\prec f_3\dots$, there is a function $f$ that increases faster than any function in the scale, that is, such that $f\succ f_n$ for all $n$.

This result was generalized by several authors, beginning with Hadamard, and eventually led to Hausdorff work on what we now call Hausdorff gaps.

Just take $f(x) = \tan(x)$ (defining $f(x) = 0$, say, when $x$ is an integer multiple of $\pi/2$. But this has nothing to do with “growing too fast”.