I'm trying to implement a code using numeric integration over with Gaussian-Hermite quadrature, parametrized by number of points used.
Recurrence relation makes it easy to find polynomial coefficients and Aberth method should give me required roots without too much of a headache. However, Wikipedia offers an expression for weights that makes use of factorials and exponentially scaling terms.
$w_i = \frac {2^{n-1} n! \sqrt{\pi}} {n^2[H_{n-1}(x_i)]^2}$
Granted, they are multiplicative, so loss of accuracy should be low, but I'm still concerned that I might hit IEEE positive infinite and I'm still in doubt about numerical accuracy of the formula.
I would be grateful for
- an estimate of the largest $n$ for which intermediaries of the formula don't hit positive infinity of 64 bit IEEE floating point format
- suggestion of formulas suitable for larger n
There is also a question about quality of quadrature points generated, since at larger $n$ I'll get polynomials where I substract constituents with huge absolute values, so finding accurate roots might be a problem as well.
I would be grateful for
- An estimate of the highest n where common methods for finding Hermite polinomial rules become numerically unreliable
- suggestion of a better way of finding quadrature points for very high n.
I'm aiming at number of quadrature points around few thousands, preferably with points and weights calculated from first principles, without asymptotic formulas. The integrated functions are fractions of two polinomials weighted by gaussian function, i.e.
$ f(x) = \frac {P(x)} {Q(x)} e^{-x^2} ; $,
The order of $P$ is expected to be within hundred (zero included) and $Q$ within ten (zero included). Also, $Q(x) > 1$ for real x.