I'm struggling to calculate the coefficents for the Hermite Expansion of the absolute value function and the indicator function $x \mapsto \mathbb{1}_{|x-u|\leq \delta}$
Background:
I know, that for any $g \in L^2(\mathbb{R}, \phi(x)dx)$, where $\phi(x)$ is the standard gaussian density, there exsist an expansion $g(x) = \sum_{n=0}^{\infty} a_n H_n(x)$ where $H_n(x)=(-1)^n e^{\frac{x^2}{2}} \frac{d^n}{dx^n}(e^{-\frac{x^2}{2}})$ is the nth Hermite polynomial.
Also I know about the formula $a_n = \frac{1}{n!} \int_{-\infty}^{\infty} g(x)H_n(x)\phi(x)dx$ , but i´m struggling to calculate the coefficients with given formula myself.
For the absolute value function the result should be $a_n = 2 \frac{(-1)^{\frac{k}{2}+1}}{\sqrt(2\pi) 2^{\frac{k}{2}} \frac{k}{2}! (k-1)}$ when $n$ is even and $0$ otherwise so im particular interested in the calculation itself.
I have a straight-forward way to get the Hermite expansion of the one-sided indicator function $$ \mathbb{1}(x) = \begin{cases} 1 & x > 0 \\ \frac{1}{2} & x = 0 \\ 0 & x < 0 \end{cases} $$ To get the indicator function that you desire, just use $\mathbb{1}(x+a) - \mathbb{1}(x-a)$ and use the Taylor expansion of Hermite polynomials $H_n(x+a)=\sum_{m=0}^n {n \choose m}H_n(x)a^m$.
The first step is to get the Hermite expansion of the centered Gaussian (from here Getting a Hermite polynomial expansion of Gaussian with given variance.) and then to integrate twice, using the relationship between a Hermite expansion of a function, and the Hermite expansion of its anti-derivative (integral) $$ \int_C^x f(y)dy = F(x). $$ If $f(x)=\sum_n d_n H_n(x)$ then $F(x)$ has Hermite expansion $$ F(x) = b_0 + \sum_{n=1}^{M+1} \frac{1}{n}d_{n-1} H_n(x), $$ where $b_0 = \int_{-\infty}^\infty F(x) \omega(x)dx$ and $C$ is some (possibly infinite) constant. For a proof of this, please refer to https://www.researchgate.net/publication/352374514_A_GENERAL_EXPRESSION_FOR_HERMITE_EXPANSIONS_WITH_APPLICATIONS.
The Hermite expansion of the probability distribution function for $\mathcal{N}(0,\sigma^2)$ $$ \omega_\sigma(x) = \frac{1}{\sqrt{2\pi\sigma^2}}e^{-\frac{x^2}{2\sigma^2}} $$ is $$ \omega_\sigma(x)=\sum_{m=0}^\infty \frac{(-1)^m}{m!2^m \sqrt{2\pi\left(\sigma^2+1\right)^{2m+1}}}H_{2m}(x). $$
Integrating once gives the cumulative distribution $$ \Phi_\sigma(x) = \int_{-\infty}^x \omega_\sigma(x)dx = \frac{1}{2}\left[1+\textrm{erf}\left(\frac{x}{\sqrt{2\sigma}}\right)\right] $$ which has Hermite expansion $$ \Phi_\sigma(x) = \frac{1}{2} + \sum_{k=0}^\infty \frac{(-1)^k}{(2k+1)k!2^k\sqrt{2\pi(\sigma^2+1)^{2k+1}}}H_{2k+1}(x) $$
And finally, taking the limit as $\sigma\rightarrow 0$ gives the Hermite expansion of the indicator function $$ \mathbb{1}(x) = \frac{1}{2} + \sum_{k=0}^\infty \frac{(-1)^k}{(2k+1)k!2^k\sqrt{2\pi}}H_{2k+1}(x). $$