I would like to see an elegant/simple solution to the following problem from the Spring 2020 UCLA Analysis Qual.
Suppose that $f\in C_c^{\infty}(\mathbb R)$ satisfies \begin{equation} \int_{\mathbb R}e^{-tx^2}f(x)\,dx=0\qquad\text{for any }t\geq0. \end{equation} Show that $f$ is odd; that is, show that $f(x)=-f(-x)$ for each $x\in\mathbb R$.
The proof that I have in mind is quite long. Any help is appreciated!
Say the support of $f$ is contained in $[-M,M]$. Let $g(x) = f(x) + f(-x)$ and note that it is enough to show that $g=0$ on the interval $[0,M]$. It's clear that $$ \int_0^M g(x) e^{-tx^2} \,dx \ = \ \int_\mathbb{R} f(x) e^{-tx^2} \,dx \ = \ 0 $$ for all $t \geq 0$. Let $\mathcal{F} = \operatorname{span} \{ x \mapsto e^{-tx^2} : t \geq 0 \} \subseteq C([0,M],\mathbb{R})$. We see that $\mathcal{F}$ is closed under linear combinations by definition, and closed under multiplication because $e^{-tx^2} e^{-sx^2} = e^{-(t+s)x^2}$. We also see that $\mathcal{F}$ contains a nonzero constant by taking $t=0$. Finally, it's clear that $\mathcal{F}$ separates points because each $x \mapsto e^{-tx^2}$ is strictly decreasing on $[0,M]$. Therefore the Stone-Weierstrass theorem implies that $\mathcal{F}$ is dense in $C([0,M],\mathbb{R})$, so by the equation above and a standard argument it follows that $\int_0^M g(x) \phi(x) \,dx = 0$ for all continuous $\phi$ and therefore $g = 0$ on $[0,M]$ as desired.