It is well-known that $f(x) = 1 - e^{-\frac{1}{x^2}}$ satisfies $f^{(i)}(0) = 1$ for all natural numbers $i.$ However, its support $\{x\in \mathbb{R}:f(x)\neq 0\} = \mathbb{R}.$
Question: Can one modify $1 - e^{-\frac{1}{x^2}}$ so that all derivatives at $x=0$ are $1$ and support is $[-1,1]?$
I tried $1 - e^{1-\frac{1}{x^2}}$ because it has value $0$ at both $x=-1$ and $x=1.$ However, it is not differentiable at those points.