Let $f$ be a continuous function satisfying $\lim \limits_{n \to \infty}f(x+n) = \infty$ for all $x$. Does $f$ satisfy $f(x) \to \infty$?

Let $f: \Bbb R \to \Bbb R$ be a continuous function satisfying $f(x+n) \to \infty$ as a sequence in $n$, for all $x$. Does $f$ satisfy $f(x) \to \infty$ as $x\to \infty$?

If we drop the continuity assumption then the claim is false, by considering a function tending more and more slowly to $\infty$ as we start at larger values in $(0,1)$. (Or many other examples)

As for context: a variant of this claim (when $f$ is analytic and we replace $n$ by a general increasing sequence $a_n$) could be useful to me at some technical exercise, and this is a simplification which I still cannot tackle.

Assuming by contradiction that $\exists M\forall x \exists x_0>x: f(x_0)\leqslant M$, we want to show that $\exists x \exists N>0 \forall n \exists n_0>n: f(x+n) \leqslant N$. No "quantifiers-level" logic seems to apply here.

Any ideas?


No. A counterexample would be the following function

$$ f(x)= \begin{cases} n,& x\in [n, n+1-1/n]; \\ n-2n^2\cdot (x-(n+1-1/n)),& x\in [n+1-1/n, n+1-1/(2n)]; \\ 2(n+1)n(x-(n+1-1/(2n))),& x\in [n+1-1/(2n), n+1]. \end{cases}$$

for $x\in [n, n+1]$. Satisfies all your conditions (I suggest you draw it, then it's easier to see), but

$$ f(n+1-1/(2n))=0$$

and therefore $f$ does not converge to infinity for $x\rightarrow \infty$.

Added: Note that we can "smooth" the edges in the function above to obtain a smooth counterexample. A truly beautiful counterexample for the real-analytic case is provided in the answer of Mundron Schmidt.


An other counterexample could be $ f(x)=x^3\sin^2\left(\pi \left(x+\frac1x\right)\right) $ for $x>0$. We see \begin{align} f(x+n)=&(x+n)^3\sin^2\left(\pi\left((x+n)+\frac1{x+n}\right)\right)\\ &=(x+n)^3\underbrace{\sin^2\left(\pi\left(x+\frac1{x+n}\right)\right)}_{g_x(n)}. \end{align} Next consider $\lim_{n\to\infty} g_x(n)=\sin^2(\pi x)$. If $x\notin\mathbb{N}$ it is clear we have $\lim_{n\to\infty}f(x+n)=\infty$. Otherwise we compute the power series of $\sin^2$ around a root $\zeta$ which is \begin{align} \sin^2(x)&=\left(\sin(x)\right)^2=\left(\sin(\zeta)+\sin'(\zeta)(x-\zeta)+\sin''(\zeta)(x-\zeta)^2+o((x-\zeta)^3)\right)^2\\ &=\left(\pm(x-\zeta)+o((x-\zeta)^3)\right)^2\\ &=(x-\zeta)^2+o((x-\zeta)^4). \end{align} For $x\in\mathbb{N}$ we compute \begin{equation} \pi\left(x+\frac1{x+n}\right)-\pi x=\frac{\pi}{x+n} \end{equation} and conclude \begin{align} (x+n)^3\sin^2\left(\pi\left(x+\frac1{x+n}\right)\right)&=(x+n)^3\left(\frac{\pi^2}{(x+n)^2}+o\left(\frac1{(x+n)^4}\right)\right)\\ &=\pi^2(x+n)+o\left(\frac1{(x+n)}\right). \end{align} We see that even if $x\in\mathbb{N}$ we get $\lim_{x\to \infty}f(x+n)=\infty$.

Finally, we see that $\lim_{x\to\infty} f(x)$ doesn't exist. Since $n+\frac1n<n+1<n+1+\frac1{n+1}$ for $n>1$ the IVT yields $x_n\in(n,n+1)$ such that $x_n+\frac1{x_n}=n+1$. This yields $f(x_n)=0$ although $n<x_n\to\infty$ for $n\to\infty$.