Does iterating the derivative infinitely many times give a smooth function whenever it converges? I am a graduate student and I've been thinking about this fun but frustrating problem for some time. Let $d = \frac{d}{dx}$, and let $f \in C^{\infty}(\mathbb{R})$ be such that for every real $x$, $$g(x) := \lim_{n \to \infty} d^n f(x)$$ converges. A simple example for such an $f$ would be $ce^x + h(x)$ for any constant $c$ where $h(x)$ converges to $0$ everywhere under this iteration (in fact my hunch is that every such $f$ is of this form), eg. $h(x) = e^{x/2}$ or simply a polynomial, of course.
I've been trying to show that $g$ is, in fact, differentiable, and thus is a fixed point of $d$. Whether this is true would provide many interesting properties from a dynamical systems point of view if one can generalize to arbitrary smooth linear differential operators, although they might be too good to be true.
Perhaps this is a known result? If so I would greatly appreciate a reference. If not, and this has a trivial counterexample I've missed, please let me know. Otherwise, I've been dealing with some tricky double limit using tricks such as in this MSE answer, to no avail.
Any help is kindly appreciated.
$\textbf{EDIT}$: Here is a discussion of some nice consequences know that we now the answer is positive, which I hope can be generalized.
Let $A$ be the set of fixed points of $d$ (in this case, just multiples of $e^x$ as we know), let $B$ be the set of functions that converge everywhere to zero under the above iteration. Let $C$ be the set of functions that converges to a smooth function with the above iteration. Then we have the following:
$C$ = $A + B = \{ g + h : g\in A, h \in B \}$.
Proof: Let $f \in C$. Let $g$ be what $d^n f$ converges to. Let $h = f-g$. Clearly $d^n h$ converges to $0$ since $g$ is fixed. Then we get $f = g+h$.
Now take any $g\in A$ and $h \in B$, and set $f = g+h$. Since $d^n h$ converges to $0$ and $g$ is fixed, $d^n f$ converges to $g$, and we are done.
Next, here I'm assuming the result of this thread holds for a general (possibly elliptic) smooth linear differential operator $d : C^\infty (\mathbb{R}) \to C^\infty (\mathbb{R}) $. A first note is that fixed points of one differential operator correspond to solutions of another, i.e. of a homogeneous PDE. Explicitly, if $d_1 g = g$, then setting $d_2 = d_1 - Id$, we get $d_2 g = 0$. This much is simple.
So given $d$, finding $A$ from above amounts to finding the space of solutions of a PDE. I'm hoping that one can use techniques from dynamical systems to find the set $C$ and thus get $A$ after the iterations. But I'm approaching this naively and I do not know the difficulty or complexity of such an affair.
One thing to note is that once we find some $g \in A$, we can set $h(x) = g(\varepsilon x)$ for small $\varepsilon$ and $h \in B$. Conversely, given $h \in B$, I'm wondering what happens when set set $f(x) = h(x/\varepsilon)$, and vary $\varepsilon$. It might not coincide with a fixed point of $d$, but could very well coincide with a fixed point of the new operator $d^k$ for some $k$. For example, take $h(x) = cos(x/2)$. The iteration converges to 0 everywhere, and multiplying the interior variable by $2$ we do NOT get a fixed point of $d = \frac{d}{dx}$ but we do for $d^4$.
I'll leave it at this, let me know again if there is anything glaringly wrong I missed.
 A: I was able to adapt the accepted answer to this MathOverflow post to positively answer the question.  The point is that one can squeeze more out of Petrov's Baire category argument if one applies it to the "singular set" of the function, rather than to an interval.
The key step is to establish

Theorem 1.  Let $f \in C^\infty({\bf R})$ be such that the quantity $M(x) := \sup_{m \geq 0} |f^{(m)}(x)|$ is finite for all $x$.  Then $f$ is the restriction to ${\bf R}$ of an entire function (or equivalently, $f$ is real analytic with an infinite radius of convergence).

Proof.  Suppose this is not the case.  Let $X$ denote the set of real numbers $x$ for which there does not exist any entire function that agrees with $f$ on a neighbourhood of $x$ (this is the "entire-singular set" of $f$).  Then $X$ is non-empty (by analytic continuation) and closed.   Next, let $S_n$ denote the set of all $x$ such that $M(x) \leq n$ for all $m$.  As $M$ is lower semicontinuous, the $S_n$ are closed, and by hypothesis one has $\bigcup_{n=1}^\infty S_n = {\bf R}$.  Hence, by the Baire category theorem applied to the complete non-empty metric space $X$, one of the sets $S_n \cap X$ contains a non-empty set $(a,b) \cap X$ for some $a < b$.
Now let $(c,e)$ be a maximal interval in the open set $(a,b) \backslash X$, then (by analytic continuation) $f$ agrees with an entire function on $(c,e)$, and hence on $[c,e]$ by smoothness.  On the other hand, at least one endpoint, say $c$, lies in $S_n$, thus
$$ |f^{(m)}(c)| \leq n$$
for all $m$.  By Taylor expansion of the entire function, we then have
$$ |f^{(m)}(x)| \leq \sum_{j=0}^\infty \frac{|f^{(m+j)}(c)|}{j!} |x-c|^j$$
$$ \leq \sum_{j=0}^\infty \frac{n}{j!} (b-a)^j$$
$$ \leq n \exp(b-a)$$
for all $m$ and $x \in [c,e]$.  Letting $(c,e)$ and $m$ vary, we conclude that the bound
$$ M(x) \leq n \exp(b-a)$$
holds for all $x \in (a,b) \backslash X$.  Since $(a,b) \cap X$ is contained in $S_n$, these bounds also hold on $(a,b) \cap X$, hence they hold on all of $(a,b)$.  Now from Taylor's theorem with remainder we see that $f$ agrees on $(a,b)$ with an entire function (the Taylor expansion of $f$ around any point in $(a,b)$), and so $(a,b) \cap X$ is empty, giving the required contradiction.  $\Box$
The function $f$ in the OP question obeys the hypotheses of Theorem 1. By Taylor expansion applied to the entire function that $f$ agrees with, and performing the same calculation used to prove the above theorem, we obtain the bounds
$$ M(x) = \sup_{m \geq 0} |f^{(m)}(x)| \leq M(0) \exp(|x|)$$
for all $x \in {\bf R}$.  We now have locally uniform bounds on all of the $f^{(m)}$ and the argument given by username (or the variant given in Pinelis's comment to that argument) applies to conclude.
A: (Edit) A simplified shorter version of this answer is in Fedor Petrov's comments (as Iosif Pinellis pointed out) :
Assume the sequence $f^{(n)}$ is dominated, that is, there exists $h$ locally integrable such that $\left| f^{(n)}\right|\leq h$ for all $n$.
From the FTC,
$$
f^{(n-1)}\left(t\right)-f^{(n-1)}\left(0\right)=\int_{0}^{x}f^{(n)}\left(t\right)\mathrm{d}t. 
$$
Applying the Dominated Convergence Theorem, we find
$$
g(x)-g(0)=\int_0^x g(t) \mathrm{d}t
$$
which implies that $g$ is smooth and of the form $g(x)=A\exp(x)$, for some $A$.

It looks like Fedor Petrov has a much nicer argument, but here is a calculus level one. Suppose that the sequence $f^{\left(n\right)}$ is uniformly bounded
(by 10, say).
Perform an integration by parts
$$
f^{(n-1)}\left(t\right)-f^{(n-1)}\left(0\right)=\int_{0}^{x}f^{(n)}\left(t\right)\mathrm{d}t=xf^{(n)}\left(x\right)-\int_{0}^{x}tf^{\left(n\right)}\left(t\right)\mathrm{d}t.
$$
Then apply the Dominated Convergence Theorem : $tf^{\left(n\right)}\left(t\right)\to tg(t)$
pointwise, and it dominated by $10\left|x\right|$ thus the integral
converges to the integral of the limit and you obtain
$$
g(x)=g(0)+xg(x)-\int_{0}^{x}xg(x)dx.
$$
This means that outside of $x=1$, if $g$ is integrable, it is smooth
(by bootstrapping). Taking a derivative, you find this implies
$$
g^{\prime}=xg^{\prime}+g-xg,
$$
in other words,
$$
g=g^{\prime}
$$
for $x\neq1$. But $x=1$ is a fluke, just integrate by parts twice
to get another point. So if the sequence is bounded, the only possible
$g$ is a multiple of the exponential (which is what Fedor Petrov said without the extra assumption).
A: We consider the simplest case of an elliptic operator, namely:
The second derivative, acting on real-valued functions defined on an interval.
The last theorem, at the very end of
https://www-users.cse.umn.edu/~adams005/PaulCussonQ/ptbddevenderivs.pdf
reads:

THEOREM. Let $a,b\in{\mathbb R}$. Assume $a<b$. Let $I:=(a;b)$.
Let $S:=C^\infty(I,{\mathbb R})$. Define $L:S\to S$ by: $\forall h\in
S$, $Lh=h''$.
Let $f\in S$. Let $g:I\to{\mathbb R}$. Assume $f,Lf,L^2f,\ldots\to g$
pointwise on $I$.
Then: $g\in S$ and $Lg=g$.

I am hopeful that the arguments can be generalized to higher
dimensions, using the Maximum Principle and techniques of elliptic
regularity.
