I routinely use Gauss-Hermite as a tool for approximating complex integrals. While I am proficient in its applications, I am not proficient in its development. I am working to understand the weights for functions where $g(x) \sim \mathcal{N}(0,1)$ such as in
$$\int f(x) g(x)dx \approx \sum_{i=1}^kf(x_i)w_i$$
Papers such as this below:
https://dmbates.github.io/MixedModels.jl/latest/GaussHermite/
indicate that
$$g(x) = exp(-x_i^2)$$
where I am assuming $x_i$ are the corresponding nodes used in $f(x_i)$. I'm unable to replicate this in R as I show below. The first portion of code output shows the nodes and weights from the R function and then the second line is my attempt to apply the transformation to the nodes to create the weights.
library(statmod)
> gauss.quad.prob(10, dist = 'normal')
$nodes
[1] -4.8594628 -3.5818235 -2.4843258 -1.4659891 -0.4849357 0.4849357 1.4659891 2.4843258 3.5818235 4.8594628
$weights
[1] 4.310653e-06 7.580709e-04 1.911158e-02 1.354837e-01 3.446423e-01 3.446423e-01 1.354837e-01 1.911158e-02 7.580709e-04 4.310653e-06
> exp(-(gauss.quad.prob(10, dist = 'normal')$nodes^2))
[1] 5.551438e-11 2.680628e-06 2.087319e-03 1.165862e-01 7.904423e-01 7.904423e-01 1.165862e-01 2.087319e-03 2.680628e-06 5.551438e-11
Clearly, I'm mistaken and fail to understand the development of the weights properly and am looking for some didactic support to further my understanding.
Thank you in advance.