07-Jan-2022 20:32:19 gen_hermite_exactness_test(): MATLAB/Octave version 9.8.0.1380330 (R2020a) Update 2 Test gen_hermite_exactness(). 07-Jan-2022 20:32:19 GEN_HERMITE_EXACTNESS MATLAB/Octave version 9.8.0.1380330 (R2020a) Update 2 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. GEN_HERMITE_EXACTNESS: User input: Quadrature rule X file = "gen_herm_o8_a1.0_x.txt". Quadrature rule W file = "gen_herm_o8_a1.0_w.txt". Quadrature rule R file = "gen_herm_o8_a1.0_r.txt". Maximum degree to check = 18 Weighting function exponent ALPHA = 1.000000 OPTION = 0, integrate |x|^alpha*exp(-x*x)*f(x). Spatial dimension = 1 Number of points = 8 The quadrature rule to be tested is a generalized Gauss-Hermite rule ORDER = 8 ALPHA = 1.000000 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(1) = 0.0002696473527807 w(2) = 0.0194439542575027 w(3) = 0.1787093462188999 w(4) = 0.3015770521708171 w(5) = 0.3015770521708171 w(6) = 0.1787093462188999 w(7) = 0.0194439542575027 w(8) = 0.0002696473527807 Abscissas X: x(1) = -3.0651379923750790 x(2) = -2.1299343409882678 x(3) = -1.3212725309936431 x(4) = -0.5679328213965031 x(5) = 0.5679328213965031 x(6) = 1.3212725309936431 x(7) = 2.1299343409882678 x(8) = 3.0651379923750790 Region R: r(1) = -1.000000e+30 r(2) = 1.000000e+30 A generalized Gauss-Hermite rule would be able to exactly integrate monomials up to and including degree = 15 Error Degree 0.0000000000000007 0 0.0000000000000000 1 0.0000000000000007 2 0.0000000000000000 3 0.0000000000000007 4 0.0000000000000001 5 0.0000000000000003 6 0.0000000000000000 7 0.0000000000000003 8 0.0000000000000000 9 0.0000000000000009 10 0.0000000000000000 11 0.0000000000000014 12 0.0000000000000000 13 0.0000000000000018 14 0.0000000000000000 15 0.0142857142857166 16 0.0000000000000000 17 0.0650793650793677 18 GEN_HERMITE_EXACTNESS: Normal end of execution. 07-Jan-2022 20:32:19 07-Jan-2022 20:32:19 GEN_HERMITE_EXACTNESS MATLAB/Octave version 9.8.0.1380330 (R2020a) Update 2 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. GEN_HERMITE_EXACTNESS: User input: Quadrature rule X file = "gen_herm_o8_a1.0_modified_x.txt". Quadrature rule W file = "gen_herm_o8_a1.0_modified_w.txt". Quadrature rule R file = "gen_herm_o8_a1.0_modified_r.txt". Maximum degree to check = 18 Weighting function exponent ALPHA = 1.000000 OPTION = 1, integrate f(x). Spatial dimension = 1 Number of points = 8 The quadrature rule to be tested is a generalized Gauss-Hermite rule ORDER = 8 ALPHA = 1.000000 OPTION = 1, modified rule: Integral ( -oo < x < +oo ) f(x) dx is to be approximated by sum ( 1 <= I <= ORDER ) w(i) * f(x(i)). Weights W: w(1) = 1.0582141979488791 w(2) = 0.8524080381127395 w(3) = 0.7750492008314336 w(4) = 0.7331317124710707 w(5) = 0.7331317124710707 w(6) = 0.7750492008314336 w(7) = 0.8524080381127395 w(8) = 1.0582141979488791 Abscissas X: x(1) = -3.0651379923750790 x(2) = -2.1299343409882678 x(3) = -1.3212725309936431 x(4) = -0.5679328213965031 x(5) = 0.5679328213965031 x(6) = 1.3212725309936431 x(7) = 2.1299343409882678 x(8) = 3.0651379923750790 Region R: r(1) = -1.000000e+30 r(2) = 1.000000e+30 A generalized Gauss-Hermite rule would be able to exactly integrate monomials up to and including degree = 15 Error Degree 0.0000000000000004 0 0.0000000000000000 1 0.0000000000000004 2 0.0000000000000001 3 0.0000000000000009 4 0.0000000000000000 5 0.0000000000000010 6 0.0000000000000009 7 0.0000000000000010 8 0.0000000000000000 9 0.0000000000000011 10 0.0000000000000000 11 0.0000000000000011 12 0.0000000000000000 13 0.0000000000000011 14 0.0000000000000000 15 0.0142857142857134 16 0.0000000000000000 17 0.0650793650793643 18 GEN_HERMITE_EXACTNESS: Normal end of execution. 07-Jan-2022 20:32:19 gen_hermite_exactness_test(): Normal end of execution. 07-Jan-2022 20:32:19