Is there an easy example of a smooth compactly supported function (ie. a test function) that equals $e^x$ on the interval $[-1,1]$?
This is in reference to the following stack exchange question here, where they describe a nice procedure but don't give an explicit example of such a function.
I've been trying to construct one and it does not seem obvious at all. Is there something more explicit to know it's existence?

Step 1. Consider $$ f(x) = \begin{cases}\exp \left( \frac{-1}{x} \right) \exp \left( \frac{-1}{x-1} \right) , &\qquad 0 < x < 1, \\ 0, &\qquad x\notin (0,1). \end{cases} $$ It's easy to check that $f$ is smooth and obviously supported in $(0,1)$.
Step 2. Take $$ g(x)= f(x+1)-f(x-1). $$ Note that $\int g = 0$ and $g$ is supported in $(-1,2)$
Step 3. Consider $$ G(x)=\frac{\int_{-\infty}^x g(t)\,dt}{\int f}. $$ Since $\int g=0$, G is supported in $(-1,2)$ and $G\equiv 1$ on $(0,1)$.
Step 4. A function satisfying your conditions is $$ F(x)=e^x G(x/2+1/2). $$