TITLE: Does there exist a bounded function of class $C^{\infty}$ such that all of its derivatives at $0$ coincide with the derivatives of $e^{-x} +x+1$?
QUESTION [5 upvotes]: Consider the function $g:\mathbb{R}\to\mathbb{R}$ where $g(x) = e^{-x} + x + 1$.
Does there exist a bounded function $f:\mathbb{R}\to\mathbb{R}$ of class $C^{\infty}$ such that $f^{(n)}(0) = g^{(n)}(0)$ for all $n = 0, 1, 2, \ldots$?
Here, $f^{(n)}(x)$ denotes the nth derivative of $f$ at $x$, and $f^{(0)}(x) = f(x)$.

REPLY [6 votes]: Let $f : \mathbb{R} \to \mathbb{R}$ be a smooth function that is identically $1$ on a neighborhood of $0$, and has compact support.  Look into bump functions for more on this.
Then $fg = g$ on a neighborhood of $0$, so that $(fg)^{(n)}=g^{(n)}$ as desired.  But $fg$ has compact support, so it is bounded.
The existence of bump functions is one of the more significant differences between smooth and analytic/real analytic functions.