06-Apr-2022 12:38:05 gegenbauer_exactness_test(): MATLAB/Octave version 9.8.0.1380330 (R2020a) Update 2 Test gegenbauer_exactness(). 06-Apr-2022 12:38:05 gegenbauer_exactness(): MATLAB/Octave version 9.8.0.1380330 (R2020a) Update 2 Investigate the polynomial exactness of a Gauss-Gegenbauer quadrature rule by integrating weighted monomials up to a given degree over the [-1,+1] interval. gegenbauer_exactness(): User input: Quadrature rule X file = "gegen_o8_a0.5_x.txt". Quadrature rule W file = "gegen_o8_a0.5_w.txt". Quadrature rule R file = "gegen_o8_a0.5_r.txt". Maximum degree to check = 8 Exponent of (1-x^2), ALPHA = 0.500000 Spatial dimension = 1 Number of points = 8 Spatial dimension = 1 Number of points = 8 Spatial dimension = 1 Number of points = 2 The quadrature rule to be tested is a Gauss-Gegenbauer rule ORDER = 8 ALPHA = 0.500000 Standard rule: Integral ( -1 <= x <= +1 ) (1-x^2)^alpha f(x) dx is to be approximated by sum ( 1 <= I <= ORDER ) w(i) * f(x(i)). Weights W: w(1) = 0.0408329477091069 w(2) = 0.1442256007956728 w(3) = 0.2617993877991495 w(4) = 0.3385402270935191 w(5) = 0.3385402270935191 w(6) = 0.2617993877991495 w(7) = 0.1442256007956728 w(8) = 0.0408329477091075 Abscissas X: x(1) = -0.9396926207859084 x(2) = -0.7660444431189780 x(3) = -0.5000000000000000 x(4) = -0.1736481776669303 x(5) = 0.1736481776669303 x(6) = 0.5000000000000000 x(7) = 0.7660444431189780 x(8) = 0.9396926207859084 Region R: r(1) = -1.000000e+00 r(2) = 1.000000e+00 A Gauss-Gegenbauer rule would be able to exactly integrate monomials up to and including degree = 15 Error Degree 0.0000000000000004 0 0.0000000000000006 1 0.0000000000000004 2 0.0000000000000005 3 0.0000000000000008 4 0.0000000000000005 5 0.0000000000000015 6 0.0000000000000004 7 0.0000000000000019 8 gegenbauer_exactness: Normal end of execution. 06-Apr-2022 12:38:05 gegenbauer_exactness_test(): Normal end of execution. 06-Apr-2022 12:38:05