24 January 2008 11:58:29 AM INT_EXACTNESS_GEN_HERMITE C++ version Investigate the polynomial exactness of a generalized Gauss-Hermite quadrature rule by integrating exponentially weighted monomials up to a given degree over the (-oo,+oo) interval. INT_EXACTNESS_GEN_HERMITE: User input: Quadrature rule X file = "gen_herm_o4_a1.0_x.txt". Quadrature rule W file = "gen_herm_o4_a1.0_w.txt". Quadrature rule R file = "gen_herm_o4_a1.0_r.txt". Maximum degree to check = 10 Power of |X|, ALPHA = 1 OPTION = 0, integrate |x|^alpha*exp(-x*x)*f(x) Spatial dimension = 1 Number of points = 4 The quadrature rule to be tested is a generalized Gauss-Hermite rule ORDER = 4 ALPHA = 1 OPTION = 0: Standard rule: Integral ( -oo < x < +oo ) |x|^alpha exp(-x*x) f(x) dx is to be approximated by sum ( 1 <= I <= ORDER ) w(i) * f(x(i)). Weights W: w[ 0] = 0.07322330470336313 w[ 1] = 0.4267766952966369 w[ 2] = 0.4267766952966369 w[ 3] = 0.07322330470336313 Abscissas X: x[ 0] = -1.847759065022573 x[ 1] = -0.7653668647301796 x[ 2] = 0.7653668647301796 x[ 3] = 1.847759065022573 Region R: r[ 0] = -1e+30 r[ 1] = 1e+30 A generalized Gauss-Hermite rule would be able to exactly integrate monomials up to and including degree = 7 Error Degree 0 0 2.775557561562891e-17 1 1.110223024625157e-16 2 5.551115123125783e-17 3 8.881784197001252e-16 4 0 5 1.332267629550188e-15 6 0 7 0.1666666666666683 8 0 9 0.4333333333333348 10 INT_EXACTNESS_GEN_HERMITE: Normal end of execution. 24 January 2008 11:58:29 AM