24 April 2015 03:14:44 PM QUADRULE_PRB C++ version Test the QUADRULE library. BASHFORTH_SET_TEST BASHFORTH_SET sets up an Adams-Bashforth rule; Index X W 0 0 1 0 0 1.5 1 -1 -0.5 0 0 1.91667 1 -1 -1.33333 2 -2 0.416667 0 0 2.29167 1 -1 -2.45833 2 -2 1.54167 3 -3 -0.375 0 0 2.64028 1 -1 -3.85278 2 -2 3.63333 3 -3 -1.76944 4 -4 0.348611 0 0 2.97014 1 -1 -5.50208 2 -2 6.93194 3 -3 -5.06806 4 -4 1.99792 5 -5 -0.329861 0 0 3.28573 1 -1 -7.39563 2 -2 11.6658 3 -3 -11.3799 4 -4 6.7318 5 -5 -2.22341 6 -6 0.315592 0 0 3.58996 1 -1 -9.52521 2 -2 18.0545 3 -3 -22.0278 4 -4 17.3797 5 -5 -8.61213 6 -6 2.44516 7 -7 -0.304225 0 0 3.88482 1 -1 -11.8842 2 -2 26.3108 3 -3 -38.5404 4 -4 38.0204 5 -5 -25.1247 6 -6 10.7015 7 -7 -2.66317 8 -8 0.294868 0 0 4.1718 1 -1 -14.4669 2 -2 36.642 3 -3 -62.6463 4 -4 74.1793 5 -5 -61.2836 6 -6 34.8074 7 -7 -12.9943 8 -8 2.87765 9 -9 -0.286975 TEST02 BDFC_SET sets up a Backward Difference Corrector rule; BDF_SUM carries it out. The integration interval is [0,1]. Quadrature order will vary. Integrand will vary. Order 1 X X^2 X^3 X^4 1 1 1 1 1 1 2 1 0.5 0.5 0.5 0.5 3 1 0.5 0.33333333 0.5 0.33333333 4 1 0.5 0.33333333 0.25 0.83333333 5 1 0.5 0.33333333 0.25 0.2 6 1 0.5 0.33333333 0.25 0.2 7 1 0.5 0.33333333 0.25 0.2 8 1 0.5 0.33333333 0.25 0.2 9 1 0.5 0.33333333 0.25 0.2 10 1 0.5 0.33333333 0.25 0.2 Order X^5 X^6 X^7 SIN(X) EXP(X) 1 1 1 1 0.84147098 2.7182818 2 0.5 0.5 0.5 0.42073549 1.8591409 3 0.5 0.33333333 0.5 0.42073549 1.7686275 4 -0.75 2.8333333 -4.75 0.45297068 1.7400198 5 2.4166667 -9.8333333 39.583333 0.47174071 1.7285669 6 0.16666667 10.416667 -86.416667 0.47066572 1.7234229 7 0.16666667 0.14285714 57.416667 0.4605822 1.7209484 8 0.16666667 0.14285714 1.511536 0.4539602 1.7197325 9 0.16666667 0.14285714 1.511536 0.45490363 1.7190841 10 0.16666667 0.14285714 1.511536 0.45996731 1.7187384 Order SQRT(|X|) 1 1 2 0.5 3 0.33333333 4 0.22559223 5 0.14444121 6 0.078476491 7 0.022362102 8 -0.025637441 9 -0.069681782 10 -0.10974341 TEST03 BDFP_SET sets up a Backward Difference Predictor rule; BDF_SUM carries it out. The integration interval is [0,1]. Quadrature order will vary. Integrand will vary. Order 1 X X^2 X^3 X^4 1 1 0 0 0 0 2 1 0.5 -0.5 0.5 -0.5 3 1 0.5 0.33333333 -2 5.3333333 4 1 0.5 0.33333333 0.25 -8.1666667 5 1 0.5 0.33333333 0.25 0.2 6 1 0.5 0.33333333 0.25 0.2 7 1 0.5 0.33333333 0.25 0.2 8 1 0.5 0.33333333 0.25 0.2 9 1 0.5 0.33333333 0.25 0.2 10 1 0.5 0.33333333 0.25 0.2 Order X^5 X^6 X^7 SIN(X) EXP(X) 1 0 0 0 0 1 2 0.5 -0.5 0.5 0.42073549 1.3160603 3 -12 25.333333 -52 0.74308739 1.4825504 4 44.25 -177.16667 625.25 0.71970264 1.5772681 5 -39.416667 366.66667 -2303.0833 0.45175383 1.6329278 6 0.16666667 -227.08333 3238.5833 0.23756477 1.6662191 7 0.16666667 0.14285714 -1533.1667 0.27217635 1.6863529 8 0.16666667 0.14285714 0.125 0.48447149 1.6986215 9 0.16666667 0.14285714 0.125 0.64391964 1.7061382 10 0.16666667 0.14285714 0.125 0.60247512 1.7107624 Order SQRT(|X|) 1 0 2 -0.5 3 -0.74407768 4 -0.92760648 5 -1.082014 6 -1.2187217 7 -1.3432956 8 -1.4589143 9 -1.5675858 10 -1.6706701 TEST04 CHEBYSHEV_SET sets up a Chebyshev rule; SUM_SUB carries it out. The integration interval is [0,1]. The number of subintervals is 1 Quadrature order will vary. Integrand will vary. Order 1 X X^2 X^3 X^4 1 1 0.5 0.25 0.125 0.0625 2 1 0.5 0.33333333 0.25 0.19444444 3 1 0.5 0.33333333 0.25 0.19791667 4 1 0.5 0.33333333 0.25 0.2 5 1 0.5 0.33333333 0.25 0.2 6 1 0.5 0.33333333 0.25 0.2 7 1 0.5 0.33333333 0.25 0.2 9 1 0.5 0.33333333 0.25 0.2 Order X^5 X^6 X^7 SIN(X) EXP(X) 1 0.03125 0.015625 0.0078125 0.47942554 1.6487213 2 0.15277778 0.12037037 0.094907407 0.45958781 1.7178964 3 0.16145833 0.13411458 0.11263021 0.45965669 1.7181366 4 0.16666667 0.14259259 0.12407407 0.45969787 1.7182812 5 0.16666667 0.1427228 0.1245298 0.45969778 1.7182815 6 0.16666667 0.14285714 0.125 0.45969769 1.7182818 7 0.16666667 0.14285714 0.125 0.45969769 1.7182818 9 0.16666667 0.14285714 0.125 0.45969769 1.7182818 Order SQRT(|X|) 1 0.70710678 2 0.67388734 3 0.67122325 4 0.6689056 5 0.66839073 6 0.66777528 7 0.66758934 9 0.66724897 CHEBYSHEV1_COMPUTE_TEST CHEBYSHEV1_COMPUTE computes a Chebyshev Type 1 quadrature rule over [-1,1] of given order. Index X W 0 6.123234e-17 3.1415927 0 -0.70710678 1.5707963 1 0.70710678 1.5707963 0 -0.8660254 1.0471976 1 6.123234e-17 1.0471976 2 0.8660254 1.0471976 0 -0.92387953 0.78539816 1 -0.38268343 0.78539816 2 0.38268343 0.78539816 3 0.92387953 0.78539816 0 -0.95105652 0.62831853 1 -0.58778525 0.62831853 2 6.123234e-17 0.62831853 3 0.58778525 0.62831853 4 0.95105652 0.62831853 0 -0.96592583 0.52359878 1 -0.70710678 0.52359878 2 -0.25881905 0.52359878 3 0.25881905 0.52359878 4 0.70710678 0.52359878 5 0.96592583 0.52359878 0 -0.97492791 0.44879895 1 -0.78183148 0.44879895 2 -0.43388374 0.44879895 3 6.123234e-17 0.44879895 4 0.43388374 0.44879895 5 0.78183148 0.44879895 6 0.97492791 0.44879895 0 -0.98078528 0.39269908 1 -0.83146961 0.39269908 2 -0.55557023 0.39269908 3 -0.19509032 0.39269908 4 0.19509032 0.39269908 5 0.55557023 0.39269908 6 0.83146961 0.39269908 7 0.98078528 0.39269908 0 -0.98480775 0.34906585 1 -0.8660254 0.34906585 2 -0.64278761 0.34906585 3 -0.34202014 0.34906585 4 6.123234e-17 0.34906585 5 0.34202014 0.34906585 6 0.64278761 0.34906585 7 0.8660254 0.34906585 8 0.98480775 0.34906585 0 -0.98768834 0.31415927 1 -0.89100652 0.31415927 2 -0.70710678 0.31415927 3 -0.4539905 0.31415927 4 -0.15643447 0.31415927 5 0.15643447 0.31415927 6 0.4539905 0.31415927 7 0.70710678 0.31415927 8 0.89100652 0.31415927 9 0.98768834 0.31415927 TEST06 CHEBYSHEV2_COMPUTE sets up a Gauss-Chebyshev type 2 rule, The integration interval is [-1,1]. The number of subintervals is 1 Quadrature order will vary. Integrand will vary. The weight function is 1 / sqrt ( 1 - X**2 ) Order 1 X X^2 X^3 X^4 1 1.5708 9.61835e-17 5.88954e-33 3.6063e-49 2.20822e-65 2 1.5708 1.11022e-16 0.392699 1.52656e-16 0.0981748 3 1.5708 -5.55112e-17 0.392699 0 0.19635 4 1.5708 -5.55112e-17 0.392699 0 0.19635 Order X^5 X^6 X^7 SIN(X) EXP(X) 1 1.35215e-81 8.27952e-98 5.06974e-114 9.61835e-17 1.5708 2 7.28584e-17 0.0245437 2.60209e-17 1.11022e-16 1.77127 3 2.77556e-17 0.0981748 2.77556e-17 0 1.77546 4 -1.38778e-17 0.122718 0 -2.77556e-17 1.7755 Order SQRT(|X|) 1 1.22917e-08 2 1.11072 3 0.660439 4 1.02235 TEST065 Approximate the integral of f(x,y) over the semicircle -1 <= x <= 1, y = sqrt ( 1 - x^2 ) using N Chebyshev points. If p(x,y) involves any term of odd degree in y, the estimate will only be approximate. Polynomial N Integral Estimate Error 1 10 1.5708 1.5708 2.22045e-16 x 10 0 -1.04083e-17 1.04083e-17 y 10 0.666667 0.666723 5.65402e-05 x^2 10 0.392699 0.392699 5.55112e-17 x y 10 0 -2.21177e-17 2.21177e-17 y^2 10 0.392699 0.392699 0 x^3 10 0 2.42861e-17 2.42861e-17 x^2y 10 0.133333 0.133392 5.88566e-05 x y^2 10 0 4.77049e-18 4.77049e-18 y^3 10 0.266667 0.266666 1.15821e-06 x^4 10 0.19635 0.19635 0 x^2y^2 10 0.0654498 0.0654498 1.38778e-17 y^4 10 0.19635 0.19635 5.55112e-17 x^4y 10 0.0571429 0.0572043 6.13939e-05 x^2y^3 10 0.0380952 0.038094 1.26862e-06 y^5 10 0.152381 0.152381 7.361e-08 x^6 10 0.122718 0.122718 2.77556e-17 x^4y^2 10 0.0245437 0.0245437 0 x^2y^4 10 0.0245437 0.0245437 3.46945e-18 y^6 10 0.122718 0.122718 2.77556e-17 CHEBYSHEV3_COMPUTE_TEST CHEBYSHEV3_COMPUTE computes a Chebyshev Type 3 quadrature rule over [-1,1] of given order. Index X W 0 0 3.14159 0 -1 1.5708 1 1 1.5708 0 -1 0.785398 1 6.12323e-17 1.5708 2 1 0.785398 0 -1 0.523599 1 -0.5 1.0472 2 0.5 1.0472 3 1 0.523599 0 -1 0.392699 1 -0.707107 0.785398 2 6.12323e-17 0.785398 3 0.707107 0.785398 4 1 0.392699 0 -1 0.314159 1 -0.809017 0.628319 2 -0.309017 0.628319 3 0.309017 0.628319 4 0.809017 0.628319 5 1 0.314159 0 -1 0.261799 1 -0.866025 0.523599 2 -0.5 0.523599 3 6.12323e-17 0.523599 4 0.5 0.523599 5 0.866025 0.523599 6 1 0.261799 0 -1 0.224399 1 -0.900969 0.448799 2 -0.62349 0.448799 3 -0.222521 0.448799 4 0.222521 0.448799 5 0.62349 0.448799 6 0.900969 0.448799 7 1 0.224399 0 -1 0.19635 1 -0.92388 0.392699 2 -0.707107 0.392699 3 -0.382683 0.392699 4 6.12323e-17 0.392699 5 0.382683 0.392699 6 0.707107 0.392699 7 0.92388 0.392699 8 1 0.19635 0 -1 0.174533 1 -0.939693 0.349066 2 -0.766044 0.349066 3 -0.5 0.349066 4 -0.173648 0.349066 5 0.173648 0.349066 6 0.5 0.349066 7 0.766044 0.349066 8 0.939693 0.349066 9 1 0.174533 CLENSHAW_CURTIS_COMPUTE_TEST CLENSHAW_CURTIS_COMPUTE computes a Clenshaw-Curtis quadrature rule over [-1,1] of given order. Index X W 0 0 2 0 1 1 1 -1 1 0 1 0.333333 1 6.12323e-17 1.33333 2 -1 0.333333 0 1 0.111111 1 0.5 0.888889 2 -0.5 0.888889 3 -1 0.111111 0 1 0.0666667 1 0.707107 0.533333 2 6.12323e-17 0.8 3 -0.707107 0.533333 4 -1 0.0666667 0 1 0.04 1 0.809017 0.360743 2 0.309017 0.599257 3 -0.309017 0.599257 4 -0.809017 0.360743 5 -1 0.04 0 1 0.0285714 1 0.866025 0.253968 2 0.5 0.457143 3 6.12323e-17 0.520635 4 -0.5 0.457143 5 -0.866025 0.253968 6 -1 0.0285714 0 1 0.0204082 1 0.900969 0.190141 2 0.62349 0.352242 3 0.222521 0.437208 4 -0.222521 0.437208 5 -0.62349 0.352242 6 -0.900969 0.190141 7 -1 0.0204082 0 1 0.015873 1 0.92388 0.146219 2 0.707107 0.279365 3 0.382683 0.361718 4 6.12323e-17 0.393651 5 -0.382683 0.361718 6 -0.707107 0.279365 7 -0.92388 0.146219 8 -1 0.015873 0 1 0.0123457 1 0.939693 0.116567 2 0.766044 0.225284 3 0.5 0.30194 4 0.173648 0.343863 5 -0.173648 0.343863 6 -0.5 0.30194 7 -0.766044 0.225284 8 -0.939693 0.116567 9 -1 0.0123457 CLENSHAW_CURTIS_SET_TEST CLENSHAW_CURTIS_SET sets up a Clenshaw-Curtis rule; Estimate the integral of sqrt(abs(x)) over [-1,+1]. N Estimate Error 1 0 1.33333 2 2 0.666667 3 0.666667 0.666667 4 1.4793 0.145968 5 1.03029 0.303044 6 1.39519 0.0618555 7 1.17633 0.157005 8 1.37053 0.0371962 9 1.23019 0.103139 10 1.35863 0.0252997 FEJER1_COMPUTE_TEST FEJER1_COMPUTE computes a Fejer type 1 quadrature rule; Order W X 1 2 0 2 1 -0.707107 1 0.707107 3 0.444444 -0.866025 1.11111 6.12323e-17 0.444444 0.866025 4 0.264298 -0.92388 0.735702 -0.382683 0.735702 0.382683 0.264298 0.92388 5 0.167781 -0.951057 0.525552 -0.587785 0.613333 6.12323e-17 0.525552 0.587785 0.167781 0.951057 6 0.118661 -0.965926 0.377778 -0.707107 0.503561 -0.258819 0.503561 0.258819 0.377778 0.707107 0.118661 0.965926 7 0.0867162 -0.974928 0.287831 -0.781831 0.398242 -0.433884 0.454422 6.12323e-17 0.398242 0.433884 0.287831 0.781831 0.0867162 0.974928 8 0.0669829 -0.980785 0.222988 -0.83147 0.324153 -0.55557 0.385877 -0.19509 0.385877 0.19509 0.324153 0.55557 0.222988 0.83147 0.0669829 0.980785 9 0.0527366 -0.984808 0.179189 -0.866025 0.264037 -0.642788 0.330845 -0.34202 0.346384 6.12323e-17 0.330845 0.34202 0.264037 0.642788 0.179189 0.866025 0.0527366 0.984808 10 0.0429391 -0.987688 0.145875 -0.891007 0.220317 -0.707107 0.280879 -0.45399 0.309989 -0.156434 0.309989 0.156434 0.280879 0.45399 0.220317 0.707107 0.145875 0.891007 0.0429391 0.987688 FEJER1_SET_TEST FEJER1_SET sets a Fejer type 1 quadrature rule; Order W X 1 2 0 2 1 -0.707107 1 0.707107 3 0.444444 -0.866025 1.11111 0 0.444444 0.866025 4 0.264298 -0.92388 0.735702 -0.382683 0.735702 0.382683 0.264298 0.92388 5 0.167781 -0.951057 0.525552 -0.587785 0.613333 0 0.525552 0.587785 0.167781 0.951057 6 0.118661 -0.965926 0.377778 -0.707107 0.503561 -0.258819 0.503561 0.258819 0.377778 0.707107 0.118661 0.965926 7 0.0867162 -0.974928 0.287831 -0.781831 0.398242 -0.433884 0.454422 0 0.398242 0.433884 0.287831 0.781831 0.0867162 0.974928 8 0.0669829 -0.980785 0.222988 -0.83147 0.324153 -0.55557 0.385877 -0.19509 0.385877 0.19509 0.324153 0.55557 0.222988 0.83147 0.0669829 0.980785 9 0.0527366 -0.984808 0.179189 -0.866025 0.264037 -0.642788 0.330845 -0.34202 0.346384 0 0.330845 0.34202 0.264037 0.642788 0.179189 0.866025 0.0527366 0.984808 10 0.0429391 -0.987688 0.145875 -0.891007 0.220317 -0.707107 0.280879 -0.45399 0.309989 -0.156434 0.309989 0.156434 0.280879 0.45399 0.220317 0.707107 0.145875 0.891007 0.0429391 0.987688 FEJER2_COMPUTE_TEST FEJER2_COMPUTE computes a Fejer type 2 quadrature rule; Order W X 1 2 0 2 1 -0.5 1 0.5 3 0.666667 -0.707107 0.666667 6.12323e-17 0.666667 0.707107 4 0.425464 -0.809017 0.574536 -0.309017 0.574536 0.309017 0.425464 0.809017 5 0.311111 -0.866025 0.4 -0.5 0.577778 6.12323e-17 0.4 0.5 0.311111 0.866025 6 0.226915 -0.900969 0.326794 -0.62349 0.446291 -0.222521 0.446291 0.222521 0.326794 0.62349 0.226915 0.900969 7 0.177965 -0.92388 0.247619 -0.707107 0.393464 -0.382683 0.361905 6.12323e-17 0.393464 0.382683 0.247619 0.707107 0.177965 0.92388 8 0.13977 -0.939693 0.20637 -0.766044 0.314286 -0.5 0.339575 -0.173648 0.339575 0.173648 0.314286 0.5 0.20637 0.766044 0.13977 0.939693 9 0.114781 -0.951057 0.165433 -0.809017 0.27379 -0.587785 0.279011 -0.309017 0.333968 6.12323e-17 0.279011 0.309017 0.27379 0.587785 0.165433 0.809017 0.114781 0.951057 10 0.0944195 -0.959493 0.141135 -0.841254 0.226387 -0.654861 0.253051 -0.415415 0.285007 -0.142315 0.285007 0.142315 0.253051 0.415415 0.226387 0.654861 0.141135 0.841254 0.0944195 0.959493 FEJER2_SET_TEST FEJER2_SET sets a Fejer type 2 quadrature rule; Order W X 1 2 0 2 1 -0.5 1 0.5 3 0.666667 -0.707107 0.666667 0 0.666667 0.707107 4 0.425464 -0.809017 0.574536 -0.309017 0.574536 0.309017 0.425464 0.809017 5 0.311111 -0.866025 0.4 -0.5 0.577778 0 0.4 0.5 0.311111 0.866025 6 0.226915 -0.900969 0.326794 -0.62349 0.446291 -0.222521 0.446291 0.222521 0.326794 0.62349 0.226915 0.900969 7 0.177965 -0.92388 0.247619 -0.707107 0.393464 -0.382683 0.361905 0 0.393464 0.382683 0.247619 0.707107 0.177965 0.92388 8 0.13977 -0.939693 0.20637 -0.766044 0.314286 -0.5 0.339575 -0.173648 0.339575 0.173648 0.314286 0.5 0.20637 0.766044 0.13977 0.939693 9 0.114781 -0.951057 0.165433 -0.809017 0.27379 -0.587785 0.279011 -0.309017 0.333968 0 0.279011 0.309017 0.27379 0.587785 0.165433 0.809017 0.114781 0.951057 10 0.0944195 -0.959493 0.141135 -0.841254 0.226387 -0.654861 0.253051 -0.415415 0.285007 -0.142315 0.285007 0.142315 0.253051 0.415415 0.226387 0.654861 0.141135 0.841254 0.0944195 0.959493 GEGENBAUER_COMPUTE_TEST GEGENBAUER_COMPUTE computes a Gauss-Gegenbauer rule; The printed output of this routine can be inserted into a C++ program. // // Abscissas X and weights W for a Gauss Gegenbauer rule // of ORDER = 5 // with ALPHA = 0.5 // x[ 0] = -0.8660254037844387; x[ 1] = -0.5; x[ 2] = 0; x[ 3] = 0.5; x[ 4] = 0.8660254037844387; w[ 0] = 0.130899693899574; w[ 1] = 0.3926990816987242; w[ 2] = 0.5235987755982989; w[ 3] = 0.3926990816987242; w[ 4] = 0.1308996938995745; GEGENBAUER_COMPUTE_TEST GEGENBAUER_COMPUTE computes a Gauss-Gegenbauer rule; The printed output of this routine can be inserted into a C++ program. // // Abscissas X and weights W for a Gauss Gegenbauer rule // of ORDER = 10 // with ALPHA = -0.5 // x[ 0] = -0.9876883405951378; x[ 1] = -0.8910065241883679; x[ 2] = -0.7071067811865476; x[ 3] = -0.4539904997395468; x[ 4] = -0.1564344650402309; x[ 5] = 0.1564344650402309; x[ 6] = 0.4539904997395468; x[ 7] = 0.7071067811865476; x[ 8] = 0.8910065241883679; x[ 9] = 0.9876883405951378; w[ 0] = 0.3141592653589749; w[ 1] = 0.3141592653589789; w[ 2] = 0.3141592653589792; w[ 3] = 0.3141592653589794; w[ 4] = 0.3141592653589794; w[ 5] = 0.3141592653589794; w[ 6] = 0.3141592653589789; w[ 7] = 0.3141592653589792; w[ 8] = 0.3141592653589789; w[ 9] = 0.3141592653589749; TEST08 HERMITE_EK_COMPUTE computes a Gauss-Hermite rule; The integration interval is ( -oo, +oo ). The weight function is exp ( - x * x ) Order 1 X X^2 X^3 X^4 1 1.7724539 0 0 0 0 2 1.7724539 0 0.88622693 0 0.44311346 3 1.7724539 1.6653345e-16 0.88622693 3.3306691e-16 1.3293404 4 1.7724539 -3.3306691e-16 0.88622693 7.2164497e-16 1.3293404 5 1.7724539 -2.4980018e-16 0.88622693 -4.7184479e-16 1.3293404 6 1.7724539 -7.4593109e-16 0.88622693 -1.1934898e-15 1.3293404 7 1.7724539 4.5840068e-16 0.88622693 5.4470317e-16 1.3293404 8 1.7724539 -6.6689276e-16 0.88622693 -3.6602665e-16 1.3293404 9 1.7724539 6.4740422e-16 0.88622693 6.3946244e-16 1.3293404 10 1.7724539 -7.4011706e-16 0.88622693 -1.9349756e-15 1.3293404 11 1.7724539 2.6337219e-16 0.88622693 8.5692629e-17 1.3293404 12 1.7724539 3.8976221e-16 0.88622693 4.8242931e-16 1.3293404 13 1.7724539 -5.1145723e-16 0.88622693 1.656555e-16 1.3293404 14 1.7724539 -6.4449914e-16 0.88622693 -1.1203095e-15 1.3293404 15 1.7724539 -5.8740827e-17 0.88622693 -2.5719512e-16 1.3293404 16 1.7724539 -1.7110753e-16 0.88622693 -6.4570306e-16 1.3293404 17 1.7724539 -6.5347698e-16 0.88622693 -1.0432232e-15 1.3293404 18 1.7724539 5.030657e-16 0.88622693 -4.1672307e-16 1.3293404 19 1.7724539 -6.3065156e-16 0.88622693 -9.2967833e-16 1.3293404 20 1.7724539 -2.8386493e-16 0.88622693 -2.4048745e-16 1.3293404 Order X^5 X^6 X^7 SIN(X) EXP(X) 1 0 0 0 0 1.7724539 2 0 0.22155673 0 0 2.2343409 3 4.4408921e-16 1.9940106 6.6613381e-16 1.110223e-16 2.2738014 4 2.8865799e-15 3.323351 1.0658141e-14 -4.3021142e-16 2.2758017 5 -2.553513e-15 3.323351 -1.1546319e-14 -2.0469737e-16 2.2758737 6 -3.1641356e-15 3.323351 -1.2656542e-14 -6.0585217e-16 2.2758757 7 1.7486013e-15 3.323351 6.4392935e-15 3.1875544e-16 2.2758758 8 2.5673907e-16 3.323351 3.8302694e-15 -5.4834202e-16 2.2758758 9 8.500145e-16 3.323351 2.6922908e-15 4.7527739e-16 2.2758758 10 -4.021089e-15 3.323351 -5.7245875e-15 -4.2971548e-16 2.2758758 11 -2.9240933e-16 3.323351 3.694961e-16 2.7821676e-16 2.2758758 12 -2.5175174e-16 3.323351 -9.6476646e-15 2.8510528e-16 2.2758758 13 2.2168817e-15 3.323351 1.0511991e-14 -5.4168812e-16 2.2758758 14 -1.638465e-15 3.323351 -2.1540116e-15 -5.039288e-16 2.2758758 15 -1.5683188e-15 3.323351 -3.2878363e-15 -1.7600657e-17 2.2758758 16 -1.2588405e-15 3.323351 -4.1586268e-16 -4.9521987e-17 2.2758758 17 -1.6159685e-15 3.323351 -3.6337951e-15 -5.3298113e-16 2.2758758 18 -1.9106795e-15 3.323351 -3.787404e-15 5.0645261e-16 2.2758758 19 -2.6015292e-15 3.323351 -1.0253596e-14 -4.4712238e-16 2.2758758 20 1.4646164e-15 3.323351 1.2052348e-14 -1.8750385e-16 2.2758758 Order SQRT(|X|) 1 0 2 1.4904501 3 0.65384754 4 1.3749793 5 0.82747983 6 1.3339991 7 0.91327495 8 1.3122322 9 0.96550308 10 1.2985043 11 1.0010473 12 1.2889609 13 1.026994 14 1.2818946 15 1.0468727 16 1.2764253 17 1.062651 18 1.2720506 19 1.0755182 20 1.2684616 TEST085 HERMITE_EK_COMPUTE computes a Gauss-Hermite rule which is appropriate for integrands of the form f(x) * exp(-x*x) from -oo to +oo. HERMITE_INTEGRAL determines the exact value of this integal when f(x) = x^n. N Order Estimate Exact Error 0 1 1.7724539 1.7724539 2.220446e-16 0 2 1.7724539 1.7724539 2.220446e-16 0 3 1.7724539 1.7724539 2.220446e-16 0 4 1.7724539 1.7724539 4.4408921e-16 0 5 1.7724539 1.7724539 1.3322676e-15 0 6 1.7724539 1.7724539 6.6613381e-16 0 7 1.7724539 1.7724539 1.3322676e-15 0 8 1.7724539 1.7724539 8.8817842e-16 0 9 1.7724539 1.7724539 1.3322676e-15 0 10 1.7724539 1.7724539 6.6613381e-16 2 1 0 0.88622693 0.88622693 2 2 0.88622693 0.88622693 3.3306691e-16 2 3 0.88622693 0.88622693 1.2212453e-15 2 4 0.88622693 0.88622693 3.3306691e-16 2 5 0.88622693 0.88622693 4.4408921e-16 2 6 0.88622693 0.88622693 7.7715612e-16 2 7 0.88622693 0.88622693 6.6613381e-16 2 8 0.88622693 0.88622693 4.4408921e-16 2 9 0.88622693 0.88622693 1.5543122e-15 2 10 0.88622693 0.88622693 1.110223e-16 4 1 0 1.3293404 1.3293404 4 2 0.44311346 1.3293404 0.88622693 4 3 1.3293404 1.3293404 2.6645353e-15 4 4 1.3293404 1.3293404 1.3322676e-15 4 5 1.3293404 1.3293404 4.4408921e-16 4 6 1.3293404 1.3293404 1.7763568e-15 4 7 1.3293404 1.3293404 1.3322676e-15 4 8 1.3293404 1.3293404 1.3322676e-15 4 9 1.3293404 1.3293404 3.7747583e-15 4 10 1.3293404 1.3293404 2.220446e-15 6 1 0 3.323351 3.323351 6 2 0.22155673 3.323351 3.1017942 6 3 1.9940106 3.323351 1.3293404 6 4 3.323351 3.323351 5.3290705e-15 6 5 3.323351 3.323351 1.3322676e-15 6 6 3.323351 3.323351 3.1086245e-15 6 7 3.323351 3.323351 3.9968029e-15 6 8 3.323351 3.323351 7.9936058e-15 6 9 3.323351 3.323351 1.1546319e-14 6 10 3.323351 3.323351 1.110223e-14 8 1 0 11.631728 11.631728 8 2 0.11077837 11.631728 11.52095 8 3 2.9910159 11.631728 8.6407125 8 4 8.9730476 11.631728 2.6586808 8 5 11.631728 11.631728 1.7763568e-15 8 6 11.631728 11.631728 0 8 7 11.631728 11.631728 1.2434498e-14 8 8 11.631728 11.631728 4.4408921e-14 8 9 11.631728 11.631728 3.907985e-14 8 10 11.631728 11.631728 6.0396133e-14 10 1 0 52.342778 52.342778 10 2 0.055389183 52.342778 52.287389 10 3 4.4865238 52.342778 47.856254 10 4 24.42663 52.342778 27.916148 10 5 45.696076 52.342778 6.6467019 10 6 52.342778 52.342778 6.3948846e-14 10 7 52.342778 52.342778 5.6843419e-14 10 8 52.342778 52.342778 2.2737368e-13 10 9 52.342778 52.342778 1.6342483e-13 10 10 52.342778 52.342778 3.2684966e-13 TEST087 HERMITE_EK_COMPUTE computes a Gauss-Hermite rule; Compute the data for N = 31 x[ 0] = -6.99568012371854; x[ 1] = -6.27507870494286; x[ 2] = -5.673961444618588; x[ 3] = -5.133595577112374; x[ 4] = -4.631559506312859; x[ 5] = -4.156271755818146; x[ 6] = -3.700743403231469; x[ 7] = -3.260320732313541; x[ 8] = -2.831680453390201; x[ 9] = -2.41231770548042; x[10] = -2.000258548935638; x[11] = -1.593885860472139; x[12] = -1.191826998350046; x[13] = -0.7928769769153088; x[14] = -0.3959427364714228; x[15] = 0; x[16] = 0.3959427364714231; x[17] = 0.7928769769153078; x[18] = 1.191826998350046; x[19] = 1.593885860472139; x[20] = 2.00025854893564; x[21] = 2.412317705480417; x[22] = 2.831680453390206; x[23] = 3.260320732313543; x[24] = 3.70074340323147; x[25] = 4.156271755818143; x[26] = 4.631559506312856; x[27] = 5.133595577112382; x[28] = 5.673961444618589; x[29] = 6.275078704942855; x[30] = 6.995680123718541; w[ 0] = 4.618968394464047e-22; w[ 1] = 5.110609007927174e-18; w[ 2] = 5.899556498753857e-15; w[ 3] = 1.860373521452179e-12; w[ 4] = 2.352492003208652e-10; w[ 5] = 1.461198834491038e-08; w[ 6] = 5.043712558939861e-07; w[ 7] = 1.049860275767553e-05; w[ 8] = 0.0001395209039504714; w[ 9] = 0.001233683307306888; w[10] = 0.00748279991403519; w[11] = 0.0318472307313004; w[12] = 0.09671794816087065; w[13] = 0.2121327886687647; w[14] = 0.338772657894108; w[15] = 0.3957785560986103; w[16] = 0.3387726578941075; w[17] = 0.2121327886687649; w[18] = 0.09671794816087051; w[19] = 0.03184723073130045; w[20] = 0.007482799914035171; w[21] = 0.001233683307306884; w[22] = 0.0001395209039504693; w[23] = 1.049860275767565e-05; w[24] = 5.043712558939818e-07; w[25] = 1.461198834491067e-08; w[26] = 2.352492003208638e-10; w[27] = 1.860373521452118e-12; w[28] = 5.899556498753869e-15; w[29] = 5.110609007927332e-18; w[30] = 4.618968394464018e-22; TEST089 HERMITE_PROBABILIST_SET sets up a Hermite probabilist rule; The integration interval is ( -oo, +oo ). The weight function is exp ( - x * x / 2 ) / sqrt ( 2 * pi ). Order 1 X X^2 X^3 X^4 1 1 0 0 0 0 2 1 0 1 0 1 3 1 0 1 0 3 4 1 0 1 0 3 5 1 6.9388939e-18 1 -5.5511151e-17 3 6 1 3.469447e-18 1 -5.5511151e-17 3 7 1 1.1709383e-17 1 -1.7347235e-17 3 8 1 5.7462715e-18 1 -2.6020852e-17 3 9 1 -1.7916441e-17 1 -5.507747e-17 3 10 1 3.6693467e-18 1 6.2558465e-17 3 Order X^5 X^6 X^7 SIN(X) EXP(X) 1 0 0 0 0 1 2 0 1 0 0 1.5430806 3 0 9 0 0 1.6381925 4 0 15 0 -6.9388939e-18 1.647969 5 0 15 0 1.3010426e-17 1.6486794 6 2.220446e-16 15 0 -1.7076184e-17 1.6487194 7 1.110223e-16 15 0 5.6378513e-18 1.6487212 8 2.7755576e-16 15 4.4408921e-16 7.8604658e-18 1.6487213 9 7.6327833e-17 15 -1.3322676e-15 6.5899163e-18 1.6487213 10 3.989864e-17 15 -1.3322676e-15 -7.0608666e-18 1.6487213 Order SQRT(|X|) 1 0 2 1 3 0.43869134 4 0.92252624 5 0.55518788 6 0.89503104 7 0.61275111 8 0.88042681 9 0.64779296 10 0.8712162 TEST09 HERMITE_SET sets up a Gauss-Hermite rule; The integration interval is ( -oo, +oo ). The weight function is exp ( - x * x ) Order 1 X X^2 X^3 X^4 1 1.7724539 0 0 0 0 2 1.7724539 0 0.88622693 0 0.44311346 3 1.7724539 0 0.88622693 0 1.3293404 4 1.7724539 5.5511151e-17 0.88622693 0 1.3293404 5 1.7724539 2.7755576e-17 0.88622693 2.7755576e-17 1.3293404 6 1.7724539 -2.9490299e-17 0.88622693 -1.3877788e-17 1.3293404 7 1.7724539 0 0.88622693 -2.0816682e-17 1.3293404 8 1.7724539 6.1582683e-17 0.88622693 -3.469447e-18 1.3293404 9 1.7724539 -1.8865118e-17 0.88622693 -1.3444107e-17 1.3293404 10 1.7724539 3.3589939e-17 0.88622693 3.2363435e-17 1.3293404 11 1.7724539 -1.4518145e-17 0.88622693 2.6603611e-17 1.3293404 12 1.7724539 6.1898627e-17 0.88622693 -8.0840824e-18 1.3293404 13 1.7724539 1.3433678e-17 0.88622693 -4.4762303e-17 1.3293404 14 1.7724539 3.0928449e-17 0.88622693 -2.6265645e-17 1.3293404 15 1.7724539 3.524672e-17 0.88622693 1.5026391e-17 1.3293404 16 1.7724539 1.0255247e-17 0.88622693 1.7313638e-17 1.3293404 17 1.7724539 -1.4656165e-17 0.88622693 -4.8976352e-17 1.3293404 18 1.7724539 -7.2840329e-18 0.88622693 3.4918918e-17 1.3293404 19 1.7724539 3.3776209e-17 0.88622693 2.9347069e-17 1.3293404 20 1.7724539 -1.2945466e-17 0.88622693 3.5305685e-17 1.3293404 Order X^5 X^6 X^7 SIN(X) EXP(X) 1 0 0 0 0 1.7724539 2 0 0.22155673 0 0 2.2343409 3 0 1.9940106 0 0 2.2738014 4 1.110223e-16 3.323351 0 -1.3877788e-17 2.2758017 5 0 3.323351 0 -1.0408341e-17 2.2758737 6 1.110223e-16 3.323351 2.220446e-16 2.3852448e-17 2.2758757 7 -5.5511151e-17 3.323351 2.220446e-16 6.8846838e-18 2.2758758 8 -2.0816682e-17 3.323351 5.5511151e-17 3.7797998e-17 2.2758758 9 1.3357371e-16 3.323351 1.3877788e-16 -1.7416268e-17 2.2758758 10 -1.0755286e-16 3.323351 2.6367797e-16 -1.6850026e-17 2.2758758 11 -6.4618449e-17 3.323351 2.2551405e-17 1.0216488e-17 2.2758758 12 -1.0649576e-16 3.323351 -8.1532003e-17 7.1873128e-18 2.2758758 13 -1.9610507e-17 3.323351 -3.1929754e-16 2.564958e-17 2.2758758 14 7.1152462e-17 3.323351 3.4829995e-16 -2.4183765e-17 2.2758758 15 -1.1643315e-17 3.323351 -2.7151133e-16 2.7418208e-17 2.2758758 16 -1.4319727e-16 3.323351 1.2448674e-16 1.8966371e-17 2.2758758 17 -9.2793703e-17 3.323351 -4.4755527e-16 2.2876239e-17 2.2758758 18 -2.3258135e-17 3.323351 -2.8651821e-16 -2.4390084e-17 2.2758758 19 -3.1362646e-17 3.323351 -4.7575816e-16 6.1457269e-18 2.2758758 20 5.1781832e-17 3.323351 1.7674285e-16 1.2888963e-17 2.2758758 Order SQRT(|X|) 1 0 2 1.4904501 3 0.65384754 4 1.3749793 5 0.82747983 6 1.3339991 7 0.91327495 8 1.3122322 9 0.96550308 10 1.2985043 11 1.0010473 12 1.2889609 13 1.026994 14 1.2818946 15 1.0468727 16 1.2764253 17 1.062651 18 1.2720506 19 1.0755182 20 1.2684616 TEST095 HERMITE_GK16_SET sets up a nested rule for the Hermite integration problem. The integration interval is ( -oo, +oo ). The weight function is exp ( - x * x ) HERMITE_INTEGRAL determines the exact value of the integal when f(x) = x^m. M N Estimate Exact Error 0 1 1.7724539 1.7724539 0 2 1 0 0.88622693 0.88622693 0 3 1.7724539 1.7724539 2.220446e-16 2 3 0.88622693 0.88622693 2.220446e-16 4 3 1.3293404 1.3293404 4.4408921e-16 6 3 1.9940106 3.323351 1.3293404 0 7 1.7724539 1.7724539 2.220446e-16 2 7 0.88622693 0.88622693 4.4408921e-16 4 7 1.3293404 1.3293404 8.8817842e-16 6 7 3.323351 3.323351 1.3322676e-15 8 7 16.991017 11.631728 5.3592884 0 9 1.7724539 1.7724539 2.220446e-16 2 9 0.88622693 0.88622693 1.110223e-16 4 9 1.3293404 1.3293404 2.220446e-16 6 9 3.323351 3.323351 0 8 9 11.631728 11.631728 1.7763568e-15 10 9 52.342778 52.342778 1.4210855e-14 12 9 287.88528 287.88528 5.6843419e-14 14 9 1871.2543 1871.2543 9.094947e-13 16 9 13798.865 14034.407 235.5425 0 17 1.7724539 1.7724539 2.220446e-16 2 17 0.88622693 0.88622693 4.4408921e-16 4 17 1.3293404 1.3293404 6.6613381e-16 6 17 3.323351 3.323351 1.7763568e-15 8 17 11.631728 11.631728 5.3290705e-15 10 17 52.342778 52.342778 2.1316282e-14 12 17 287.88528 287.88528 1.1368684e-13 14 17 1871.2543 1871.2543 2.2737368e-13 16 17 14034.407 14034.407 0 18 17 122706.04 119292.46 3413.5818 0 19 1.7724539 1.7724539 8.8817842e-16 2 19 0.88622693 0.88622693 0 4 19 1.3293404 1.3293404 8.8817842e-16 6 19 3.323351 3.323351 2.220446e-15 8 19 11.631728 11.631728 1.0658141e-14 10 19 52.342778 52.342778 4.2632564e-14 12 19 287.88528 287.88528 1.1368684e-13 14 19 1871.2543 1871.2543 1.3642421e-12 16 19 14034.407 14034.407 2.0008883e-11 18 19 119292.46 119292.46 2.4738256e-10 20 19 1133278.4 1133278.4 1.8626451e-09 0 31 1.7724539 1.7724539 2.220446e-16 2 31 0.88622693 0.88622693 3.3306691e-16 4 31 1.3293404 1.3293404 2.220446e-16 6 31 3.323351 3.323351 4.4408921e-16 8 31 11.631728 11.631728 3.5527137e-15 10 31 52.342778 52.342778 2.1316282e-14 12 31 287.88528 287.88528 3.4106051e-13 14 31 1871.2543 1871.2543 4.0927262e-12 16 31 14034.407 14034.407 4.1836756e-11 18 31 119292.46 119292.46 3.783498e-10 20 31 1133278.4 1133278.4 3.4924597e-09 0 33 1.7724539 1.7724539 8.8817842e-16 2 33 0.88622693 0.88622693 1.110223e-16 4 33 1.3293404 1.3293404 8.8817842e-16 6 33 3.323351 3.323351 1.7763568e-15 8 33 11.631728 11.631728 3.5527137e-15 10 33 52.342778 52.342778 2.8421709e-14 12 33 287.88528 287.88528 2.8421709e-13 14 33 1871.2543 1871.2543 2.7284841e-12 16 33 14034.407 14034.407 2.3646862e-11 18 33 119292.46 119292.46 2.4738256e-10 20 33 1133278.4 1133278.4 2.0954758e-09 0 35 1.7724539 1.7724539 8.8817842e-16 2 35 0.88622693 0.88622693 8.8817842e-16 4 35 1.3293404 1.3293404 1.3322676e-15 6 35 3.323351 3.323351 1.7763568e-15 8 35 11.631728 11.631728 1.7763568e-15 10 35 52.342778 52.342778 2.1316282e-14 12 35 287.88528 287.88528 2.8421709e-13 14 35 1871.2543 1871.2543 3.1832315e-12 16 35 14034.407 14034.407 2.7284841e-11 18 35 119292.46 119292.46 2.6193447e-10 20 35 1133278.4 1133278.4 2.0954758e-09 TEST096 HERMITE_GK**_SET sets up a nested rule for the Hermite integration problem. The integration interval is ( -oo, +oo ). The weight function is exp ( - x * x ) HERMITE_INTEGRAL determines the exact value of the integal when f(x) = x^m. Here, we just test the highest order rule. HERMITE_GK16_SET: M N Estimate Exact Error 0 35 1.7724539 1.7724539 8.8817842e-16 2 35 0.88622693 0.88622693 8.8817842e-16 4 35 1.3293404 1.3293404 1.3322676e-15 6 35 3.323351 3.323351 1.7763568e-15 8 35 11.631728 11.631728 1.7763568e-15 10 35 52.342778 52.342778 2.1316282e-14 12 35 287.88528 287.88528 2.8421709e-13 14 35 1871.2543 1871.2543 3.1832315e-12 16 35 14034.407 14034.407 2.7284841e-11 18 35 119292.46 119292.46 2.6193447e-10 20 35 1133278.4 1133278.4 2.0954758e-09 HERMITE_GK18_SET: M N Estimate Exact Error 0 37 1 1.7724539 0.77245385 2 37 0.5 0.88622693 0.38622693 4 37 0.75 1.3293404 0.57934039 6 37 1.875 3.323351 1.448351 8 37 6.5625 11.631728 5.0692284 10 37 29.53125 52.342778 22.811528 12 37 162.42188 287.88528 125.4634 14 37 1055.7422 1871.2543 815.51212 16 37 7918.0664 14034.407 6116.3409 18 37 67303.564 119292.46 51988.898 20 37 639383.86 1133278.4 493894.53 HERMITE_GK22_SET: M N Estimate Exact Error 0 41 1 1.7724539 0.77245385 2 41 0.5 0.88622693 0.38622693 4 41 0.75 1.3293404 0.57934039 6 41 1.875 3.323351 1.448351 8 41 6.5625 11.631728 5.0692284 10 41 29.53125 52.342778 22.811528 12 41 162.42188 287.88528 125.4634 14 41 1055.7422 1871.2543 815.51212 16 41 7918.0664 14034.407 6116.3409 18 41 67303.564 119292.46 51988.898 20 41 639383.86 1133278.4 493894.53 HERMITE_GK24_SET: M N Estimate Exact Error 0 43 1 1.7724539 0.77245385 2 43 0.5 0.88622693 0.38622693 4 43 0.75 1.3293404 0.57934039 6 43 1.875 3.323351 1.448351 8 43 6.5625 11.631728 5.0692284 10 43 29.53125 52.342778 22.811528 12 43 162.42187 287.88528 125.4634 14 43 1055.7422 1871.2543 815.51212 16 43 7918.0664 14034.407 6116.3409 18 43 67303.564 119292.46 51988.898 20 43 639383.86 1133278.4 493894.53 TEST10 JACOBI_EK_COMPUTE computes a Gauss-Jacobi rule; SUM_SUB carries it out. The integration interval is [-1,1]. The number of subintervals is 1 Quadrature order will vary. Integrand will vary. ALPHA = 0 BETA = 0 Order 1 X X^2 X^3 X^4 1 2 0 0 0 0 2 2 0 0.66666667 0 0.22222222 3 2 -2.7755576e-16 0.66666667 -3.8857806e-16 0.4 4 2 -7.7715612e-16 0.66666667 -5.5511151e-16 0.4 5 2 -2.7755576e-17 0.66666667 -1.6653345e-16 0.4 6 2 2.220446e-16 0.66666667 1.9428903e-16 0.4 7 2 8.8817842e-16 0.66666667 4.4408921e-16 0.4 8 2 -4.1633363e-16 0.66666667 -1.9428903e-16 0.4 9 2 3.6082248e-16 0.66666667 3.3306691e-16 0.4 Order X^5 X^6 X^7 SIN(X) EXP(X) 1 0 0 0 0 2 2 0 0.074074074 0 0 2.3426961 3 -3.0531133e-16 0.24 -2.6367797e-16 -2.7755576e-16 2.3503369 4 -5.2735594e-16 0.28571429 -4.3021142e-16 -7.7715612e-16 2.3504021 5 -2.4980018e-16 0.28571429 -2.6367797e-16 0 2.3504024 6 1.9428903e-16 0.28571429 1.9428903e-16 2.4980018e-16 2.3504024 7 2.4980018e-16 0.28571429 1.5265567e-16 8.6042284e-16 2.3504024 8 -1.3877788e-16 0.28571429 -1.2490009e-16 -4.57967e-16 2.3504024 9 6.9388939e-17 0.28571429 -1.110223e-16 3.1918912e-16 2.3504024 Order SQRT(|X|) 1 0 2 1.5196714 3 0.97790193 4 1.4061049 5 1.1535178 6 1.3747215 7 1.2205122 8 1.3608784 9 1.254222 ALPHA = 1 BETA = 0 Order 1 X X^2 X^3 X^4 1 2 -0.66666667 0.22222222 -0.074074074 0.024691358 2 2 -0.66666667 0.66666667 -0.4 0.29333333 3 2 -0.66666667 0.66666667 -0.4 0.4 4 2 -0.66666667 0.66666667 -0.4 0.4 5 2 -0.66666667 0.66666667 -0.4 0.4 6 2 -0.66666667 0.66666667 -0.4 0.4 7 2 -0.66666667 0.66666667 -0.4 0.4 8 2 -0.66666667 0.66666667 -0.4 0.4 9 2 -0.66666667 0.66666667 -0.4 0.4 Order X^5 X^6 X^7 SIN(X) EXP(X) 1 -0.0082304527 0.0027434842 -0.00091449474 -0.65438939 1.4330626 2 -0.19733333 0.1376 -0.094506667 -0.60162582 1.6107516 3 -0.28571429 0.25959184 -0.19941691 -0.60234176 1.6146106 4 -0.28571429 0.28571429 -0.22222222 -0.60233734 1.6146434 5 -0.28571429 0.28571429 -0.22222222 -0.60233736 1.6146435 6 -0.28571429 0.28571429 -0.22222222 -0.60233736 1.6146435 7 -0.28571429 0.28571429 -0.22222222 -0.60233736 1.6146435 8 -0.28571429 0.28571429 -0.22222222 -0.60233736 1.6146435 9 -0.28571429 0.28571429 -0.22222222 -0.60233736 1.6146435 Order SQRT(|X|) 1 1.1547005 2 1.4485438 3 1.3310986 4 1.3720836 5 1.3386022 6 1.3535579 7 1.3386548 8 1.3460607 9 1.3379243 TEST105 JACOBI_EK_COMPUTE computes a Gauss-Jacobi rule; JACOBI_SS_COMPUTE computes a Gauss-Jacobi rule; Here, we simply compute a single rule and print it, to check for accuracy. The integration interval is [-1,1]. N = 20 ALPHA = 1.5 BETA = 0.5 JACOBI_EK_COMPUTE: I X(I) W(I) 1 -0.98933183 0.0061723698 2 -0.9575547 0.023779836 3 -0.90534588 0.050239487 4 -0.83381811 0.081707862 5 -0.74449588 0.11368903 6 -0.63928294 0.14173351 7 -0.52042172 0.16210935 8 -0.39044554 0.17233353 9 -0.25212461 0.17147901 10 -0.10840699 0.16021398 11 0.037644213 0.14057864 12 0.18291619 0.11555093 13 0.32431273 0.088488838 14 0.45882024 0.062555273 15 0.58357193 0.040230591 16 0.69590902 0.022996616 17 0.79343737 0.011240111 18 0.87407869 0.0043793978 19 0.93611541 0.0011741686 20 0.97823193 0.00014378075 JACOBI_SS_COMPUTE: I X(I) W(I) 1 -0.98933183 0.0061723698 2 -0.9575547 0.023779836 3 -0.90534588 0.050239487 4 -0.83381811 0.081707862 5 -0.74449588 0.11368903 6 -0.63928294 0.14173351 7 -0.52042172 0.16210935 8 -0.39044554 0.17233353 9 -0.25212461 0.17147901 10 -0.10840699 0.16021398 11 0.037644213 0.14057864 12 0.18291619 0.11555093 13 0.32431273 0.088488838 14 0.45882024 0.062555273 15 0.58357193 0.040230591 16 0.69590902 0.022996616 17 0.79343737 0.011240111 18 0.87407869 0.0043793978 19 0.93611541 0.0011741686 20 0.97823193 0.00014378075 TEST108 JACOBI_EK_COMPUTE computes a Gauss-Jacobi rule; The printed output of this test can be inserted into a C++ program. // // Abscissas X and weights W for a Gauss Jacobi rule // of ORDER = 10 // with ALPHA = 0.5 // and BETA = 2 // x[ 0] = -0.9057833107479928; x[ 1] = -0.7536615689945177; x[ 2] = -0.5486368932258151; x[ 3] = -0.3051523832352314; x[ 4] = -0.04048417093085138; x[ 5] = 0.226568549721492; x[ 6] = 0.4770321235676096; x[ 7] = 0.6931099037348964; x[ 8] = 0.8594479437211198; x[ 9] = 0.9642264730559575; w[ 0] = 0.00149340697509531; w[ 1] = 0.0145191036605351; w[ 2] = 0.05753614967752356; w[ 3] = 0.141826393407261; w[ 4] = 0.2526743544928462; w[ 5] = 0.3464772296000077; w[ 6] = 0.3724465193703724; w[ 7] = 0.3072940130036494; w[ 8] = 0.1778276475883614; w[ 9] = 0.05189885826012076; TEST11 KRONROD_SET sets up a Kronrod rule; LEGENDRE_SET sets up Gauss-Legendre rule; SUMMER_GK carries it out. The integration interval is [-1, 1]. Integrand is X**2 / SQRT ( 1.1 - X**2 ). 10 1.073789659 21 1.074744084 -0.0009544251929 TEST12 KRONROD_SET sets up a Kronrod rule; LEGENDRE_SET sets up Gauss-Legendre rule; SUM_SUB_GK carries it out. The integration interval is [-1,1] Number of subintervals is 5 Integrand is X**2 / SQRT ( 1.1 - X**2 ). 7 1.074724759 15 1.074743089 1.832906306e-05 TEST13 LAGUERRE_EK_COMPUTE computes a Gauss-Laguerre rule; LAGUERRE_SUM carries it out. The integration interval is [1, +oo). Quadrature order will vary. Integrand will vary. The weight function is EXP ( - X ). Order 1 X X^2 X^3 X^4 1 0.36787944 0.73575888 1.4715178 2.9430355 5.8860711 2 0.36787944 0.73575888 1.8393972 5.8860711 22.440646 3 0.36787944 0.73575888 1.8393972 5.8860711 23.912164 4 0.36787944 0.73575888 1.8393972 5.8860711 23.912164 5 0.36787944 0.73575888 1.8393972 5.8860711 23.912164 6 0.36787944 0.73575888 1.8393972 5.8860711 23.912164 7 0.36787944 0.73575888 1.8393972 5.8860711 23.912164 8 0.36787944 0.73575888 1.8393972 5.8860711 23.912164 9 0.36787944 0.73575888 1.8393972 5.8860711 23.912164 10 0.36787944 0.73575888 1.8393972 5.8860711 23.912164 11 0.36787944 0.73575888 1.8393972 5.8860711 23.912164 12 0.36787944 0.73575888 1.8393972 5.8860711 23.912164 13 0.36787944 0.73575888 1.8393972 5.8860711 23.912164 14 0.36787944 0.73575888 1.8393972 5.8860711 23.912164 15 0.36787944 0.73575888 1.8393972 5.8860711 23.912164 16 0.36787944 0.73575888 1.8393972 5.8860711 23.912164 17 0.36787944 0.73575888 1.8393972 5.8860711 23.912164 18 0.36787944 0.73575888 1.8393972 5.8860711 23.912164 19 0.36787944 0.73575888 1.8393972 5.8860711 23.912164 20 0.36787944 0.73575888 1.8393972 5.8860711 23.912164 Order X^5 X^6 X^7 SIN(X) EXP(X) 1 11.772142 23.544284 47.088568 0.33451183 2.7182818 2 93.441378 403.56375 1767.2928 0.26247204 5.9842834 3 119.9287 706.69641 4616.1512 0.24610565 9.4409304 4 119.9287 719.94007 5039.9483 0.25590478 12.999133 5 119.9287 719.94007 5039.9483 0.2541117 16.621868 6 119.9287 719.94007 5039.9483 0.25409157 20.28984 7 119.9287 719.94007 5039.9483 0.25418388 23.991579 8 119.9287 719.94007 5039.9483 0.25416093 27.719653 9 119.9287 719.94007 5039.9483 0.25416257 31.468942 10 119.9287 719.94007 5039.9483 0.25416319 35.23575 11 119.9287 719.94007 5039.9483 0.25416296 39.017314 12 119.9287 719.94007 5039.9483 0.25416299 42.811508 13 119.9287 719.94007 5039.9483 0.25416299 46.616655 14 119.9287 719.94007 5039.9483 0.25416299 50.431409 15 119.9287 719.94007 5039.9483 0.25416299 54.25467 16 119.9287 719.94007 5039.9483 0.25416299 58.085527 17 119.9287 719.94007 5039.9483 0.25416299 61.923214 18 119.9287 719.94007 5039.9483 0.25416299 65.767084 19 119.9287 719.94007 5039.9483 0.25416299 69.616579 20 119.9287 719.94007 5039.9483 0.25416299 73.471221 Order SQRT(|X|) 1 0.5202601 2 0.50861083 3 0.50755159 4 0.50735604 5 0.50730644 6 0.50729121 7 0.50728588 8 0.50728382 9 0.50728297 10 0.50728259 11 0.50728241 12 0.50728233 13 0.50728228 14 0.50728226 15 0.50728225 16 0.50728224 17 0.50728224 18 0.50728224 19 0.50728224 20 0.50728223 TEST14 LAGUERRE_EK_COMPUTE sets up a Gauss-Laguerre rule; LAGUERRE_SUM carries it out. The integration interval is [0, +oo). Quadrature order will vary. Integrand will vary. The weight function is EXP ( - X ). Order 1 X X^2 X^3 X^4 1 1 1 1 1 1 2 1 1 2 6 20 3 1 1 2 6 24 4 1 1 2 6 24 5 1 1 2 6 24 6 1 1 2 6 24 7 1 1 2 6 24 8 1 1 2 6 24 9 1 1 2 6 24 10 1 1 2 6 24 11 1 1 2 6 24 12 1 1 2 6 24 13 1 1 2 6 24 14 1 1 2 6 24 15 1 1 2 6 24 16 1 1 2 6 24 17 1 1 2 6 24 18 1 1 2 6 24 19 1 1 2 6 24 20 1 1 2 6 24 Order X^5 X^6 X^7 SIN(X) EXP(X) 1 1 1 1 0.84147098 2.7182818 2 68 232 792 0.43245945 5.9842834 3 120 684 4140 0.49602983 9.4409304 4 120 720 5040 0.50487928 12.999133 5 120 720 5040 0.49890332 16.621868 6 120 720 5040 0.50004947 20.28984 7 120 720 5040 0.50003891 23.991579 8 120 720 5040 0.49998775 27.719653 9 120 720 5040 0.50000135 31.468942 10 120 720 5040 0.5000002 35.23575 11 120 720 5040 0.49999989 39.017314 12 120 720 5040 0.50000002 42.811508 13 120 720 5040 0.5 46.616655 14 120 720 5040 0.5 50.431409 15 120 720 5040 0.5 54.25467 16 120 720 5040 0.5 58.085527 17 120 720 5040 0.5 61.923214 18 120 720 5040 0.5 65.767084 19 120 720 5040 0.5 69.616579 20 120 720 5040 0.5 73.471221 Order SQRT(|X|) 1 1 2 0.92387953 3 0.90644045 4 0.89928022 5 0.8955375 6 0.89329552 7 0.89182852 8 0.89080711 9 0.89006239 10 0.8894997 11 0.88906231 12 0.88871436 13 0.88843218 14 0.8881996 15 0.88800521 16 0.88784077 17 0.8877002 18 0.88757892 19 0.88747341 20 0.88738094 TEST15 GEN_LAGUERRE_EK_COMPUTE computes a generalized Gauss-Laguerre rule; LAGUERRE_SUM carries it out. The integration interval is [0, +oo). Quadrature order will vary. Integrand will vary. The weight function is EXP ( - X ) * X^ 1. Order 1 X X^2 X^3 X^4 1 1 2 4 8 16 2 1 2 6 24 108 3 1 2 6 24 120 4 1 2 6 24 120 5 1 2 6 24 120 6 1 2 6 24 120 7 1 2 6 24 120 8 1 2 6 24 120 9 1 2 6 24 120 10 1 2 6 24 120 11 1 2 6 24 120 12 1 2 6 24 120 13 1 2 6 24 120 14 1 2 6 24 120 15 1 2 6 24 120 16 1 2 6 24 120 17 1 2 6 24 120 18 1 2 6 24 120 19 1 2 6 24 120 20 1 2 6 24 120 Order X^5 X^6 X^7 SIN(X) EXP(X) 1 32 64 128 0.90929743 7.3890561 2 504 2376 11232 0.54149948 26.793923 3 720 4896 35712 0.43015059 59.245569 4 720 5040 40320 0.51992138 105.29742 5 720 5040 40320 0.49895082 165.302 6 720 5040 40320 0.49896982 239.50655 7 720 5040 40320 0.50037016 328.09559 8 720 5040 40320 0.49995417 431.21297 9 720 5040 40320 0.49999205 548.97449 10 720 5040 40320 0.50000471 681.47572 11 720 5040 40320 0.49999913 828.79708 12 720 5040 40320 0.49999999 991.00739 13 720 5040 40320 0.50000005 1168.1663 14 720 5040 40320 0.49999999 1360.326 15 720 5040 40320 0.5 1567.5328 16 720 5040 40320 0.5 1789.8281 17 720 5040 40320 0.5 2027.2488 18 720 5040 40320 0.5 2279.8286 19 720 5040 40320 0.5 2547.5979 20 720 5040 40320 0.5 2830.5848 Order SQRT(|X|) 1 1.4142136 2 1.3477747 3 1.3367339 4 1.3331544 5 1.3316058 6 1.330814 7 1.3303619 8 1.3300827 9 1.3298998 10 1.3297743 11 1.3296849 12 1.3296194 13 1.3295701 14 1.3295321 15 1.3295024 16 1.3294788 17 1.3294597 18 1.3294441 19 1.3294312 20 1.3294205 TEST16 GEN_LAGUERRE_EK_COMPUTE computes a generalized Gauss-Laguerre rule; LAGUERRE_SUM carries it out. The integration interval is [0, +oo). Quadrature order will vary. Integrand will vary. The weight function is EXP ( - X ) * X^ 2. Order 1 X X^2 X^3 X^4 1 2 6 18 54 162 2 2 6 24 120 672 3 2 6 24 120 720 4 2 6 24 120 720 5 2 6 24 120 720 6 2 6 24 120 720 7 2 6 24 120 720 8 2 6 24 120 720 9 2 6 24 120 720 10 2 6 24 120 720 11 2 6 24 120 720 12 2 6 24 120 720 13 2 6 24 120 720 14 2 6 24 120 720 15 2 6 24 120 720 16 2 6 24 120 720 17 2 6 24 120 720 18 2 6 24 120 720 19 2 6 24 120 720 20 2 6 24 120 720 Order X^5 X^6 X^7 SIN(X) EXP(X) 1 486 1458 4374 0.28224002 40.171074 2 3936 23424 140160 1.2242384 212.79798 3 5040 39600 334800 0.2162965 617.93502 4 5040 40320 362880 0.51796865 1360.8688 5 5040 40320 362880 0.52321346 2550.2457 6 5040 40320 362880 0.49028003 4297.0688 7 5040 40320 362880 0.50136955 6714.0982 8 5040 40320 362880 0.50027722 9915.4622 9 5040 40320 362880 0.49981951 14016.389 10 5040 40320 362880 0.50003665 19133.014 11 5040 40320 362880 0.50000038 25382.236 12 5040 40320 362880 0.49999768 32881.603 13 5040 40320 362880 0.50000065 41749.232 14 5040 40320 362880 0.49999995 52103.731 15 5040 40320 362880 0.49999998 64064.147 16 5040 40320 362880 0.50000001 77749.917 17 5040 40320 362880 0.5 93280.828 18 5040 40320 362880 0.5 110776.98 19 5040 40320 362880 0.5 130358.78 20 5040 40320 362880 0.5 152146.87 Order SQRT(|X|) 1 3.4641016 2 3.3460652 3 3.3306163 4 3.3264697 5 3.3249375 6 3.3242535 7 3.3239069 8 3.3237145 9 3.3236 10 3.323528 11 3.3234807 12 3.3234485 13 3.3234259 14 3.3234096 15 3.3233976 16 3.3233886 17 3.3233817 18 3.3233763 19 3.3233721 20 3.3233688 TEST165 GEN_LAGUERRE_EK_COMPUTE computes a generalized Gauss-Laguerre rule; The printed output of this routine can be inserted into a C++ program. // // Abscissas X and weights W for a Gauss Laguerre rule // of ORDER = 11 // with ALPHA = 0 // x[ 0] = 0.1257964421879683; x[ 1] = 0.6654182558392305; x[ 2] = 1.647150545872172; x[ 3] = 3.091138143035256; x[ 4] = 5.029284401579835; x[ 5] = 7.509887863806619; x[ 6] = 10.60595099954696; x[ 7] = 14.43161375806418; x[ 8] = 19.17885740321467; x[ 9] = 25.21770933967755; x[10] = 33.49719284717553; w[ 0] = 0.2849332128942019; w[ 1] = 0.3897208895278488; w[ 2] = 0.2327818318489906; w[ 3] = 0.07656445354619654; w[ 4] = 0.01439328276735066; w[ 5] = 0.001518880846484868; w[ 6] = 8.513122435471919e-05; w[ 7] = 2.292403879574514e-06; w[ 8] = 2.486353702767809e-08; w[ 9] = 7.712626933691331e-11; w[10] = 2.883775868323617e-14; TEST165 GEN_LAGUERRE_EK_COMPUTE computes a generalized Gauss-Laguerre rule; The printed output of this routine can be inserted into a C++ program. // // Abscissas X and weights W for a Gauss Laguerre rule // of ORDER = 11 // with ALPHA = 0.5 // x[ 0] = 0.2102574184831794; x[ 1] = 0.8448394164252118; x[ 2] = 1.915565574736173; x[ 3] = 3.443537268140792; x[ 4] = 5.461644772694418; x[ 5] = 8.019112688782045; x[ 6] = 11.18987571617644; x[ 7] = 15.08912822002116; x[ 8] = 19.91025764276847; x[ 9] = 26.02565538189142; x[10] = 34.39012589988069; w[ 0] = 0.1564919998464263; w[ 1] = 0.3356460803810045; w[ 2] = 0.2639277337279423; w[ 3] = 0.104732321018378; w[ 4] = 0.02260648913203014; w[ 5] = 0.002655315844729844; w[ 6] = 0.0001622374407044614; w[ 7] = 4.693742912624462e-06; w[ 8] = 5.414115327653785e-08; w[ 9] = 1.774072162971759e-10; w[10] = 6.98833812589817e-14; TEST165 GEN_LAGUERRE_EK_COMPUTE computes a generalized Gauss-Laguerre rule; The printed output of this routine can be inserted into a C++ program. // // Abscissas X and weights W for a Gauss Laguerre rule // of ORDER = 11 // with ALPHA = 2 // x[ 0] = 0.5297880635681311; x[ 1] = 1.43183424851105; x[ 2] = 2.753324209989986; x[ 3] = 4.518949913023012; x[ 4] = 6.764325462912582; x[ 5] = 9.541162512224671; x[ 6] = 12.92592983812984; x[ 7] = 17.03674989811997; x[ 8] = 22.07099934899301; x[ 9] = 28.40788699071938; x[10] = 37.01904951380838; w[ 0] = 0.1154861791808026; w[ 1] = 0.5427759748685616; w[ 2] = 0.7432051572620305; w[ 3] = 0.4448454978860327; w[ 4] = 0.1320746211103723; w[ 5] = 0.02004515682275456; w[ 6] = 0.001514234411685173; w[ 7] = 5.246733328213359e-05; w[ 8] = 7.084465340665172e-07; w[ 9] = 2.676735958607222e-09; w[10] = 1.209708239787263e-12; TEST17 LAGUERRE_SET sets up a Gauss-Laguerre rule; LAGUERRE_SUM carries it out. The integration interval is [1, +oo). Quadrature order will vary. Integrand will vary. The weight function is EXP ( - X ). Order 1 X X^2 X^3 X^4 1 0.36787944 0.73575888 1.4715178 2.9430355 5.8860711 2 0.36787944 0.73575888 1.8393972 5.8860711 22.440646 3 0.36787944 0.73575888 1.8393972 5.8860711 23.912164 4 0.36787944 0.73575888 1.8393972 5.8860711 23.912164 5 0.36787944 0.73575888 1.8393972 5.8860711 23.912164 6 0.36787944 0.73575888 1.8393972 5.8860711 23.912164 7 0.36787944 0.73575888 1.8393972 5.8860711 23.912164 8 0.36787944 0.73575888 1.8393972 5.8860711 23.912164 9 0.36787944 0.73575888 1.8393972 5.8860711 23.912164 10 0.36787944 0.73575888 1.8393972 5.8860711 23.912164 11 0.36787944 0.73575888 1.8393972 5.8860711 23.912164 12 0.36787944 0.73575888 1.8393972 5.8860711 23.912164 13 0.36787944 0.73575888 1.8393972 5.8860711 23.912164 14 0.36787944 0.73575888 1.8393972 5.8860711 23.912164 15 0.36787944 0.73575888 1.8393972 5.8860711 23.912164 16 0.36787944 0.73575888 1.8393972 5.8860711 23.912164 17 0.36787944 0.73575888 1.8393972 5.8860711 23.912164 18 0.36787944 0.73575888 1.8393972 5.8860711 23.912164 19 0.36787944 0.73575888 1.8393972 5.8860711 23.912164 20 0.36787944 0.73575888 1.8393972 5.8860711 23.912164 Order X^5 X^6 X^7 SIN(X) EXP(X) 1 11.772142 23.544284 47.088568 0.33451183 2.7182818 2 93.441378 403.56375 1767.2928 0.26247204 5.9842834 3 119.9287 706.69641 4616.1512 0.24610565 9.4409304 4 119.9287 719.94007 5039.9483 0.25590478 12.999133 5 119.9287 719.94007 5039.9483 0.2541117 16.621868 6 119.9287 719.94007 5039.9483 0.25409157 20.28984 7 119.9287 719.94007 5039.9483 0.25418388 23.991579 8 119.9287 719.94007 5039.9483 0.25416093 27.719653 9 119.9287 719.94007 5039.9483 0.25416257 31.468942 10 119.9287 719.94007 5039.9483 0.25416319 35.23575 11 119.9287 719.94007 5039.9483 0.25416296 39.017314 12 119.9287 719.94007 5039.9483 0.25416299 42.811508 13 119.9287 719.94007 5039.9483 0.25416299 46.616655 14 119.9287 719.94007 5039.9483 0.25416299 50.431409 15 119.9287 719.94007 5039.9483 0.25416299 54.25467 16 119.9287 719.94007 5039.9483 0.25416299 58.085527 17 119.9287 719.94007 5039.9483 0.25416299 61.923214 18 119.9287 719.94007 5039.9483 0.25416299 65.767084 19 119.9287 719.94007 5039.9483 0.25416299 69.616579 20 119.9287 719.94007 5039.9483 0.25416299 73.471221 Order SQRT(|X|) 1 0.5202601 2 0.50861083 3 0.50755159 4 0.50735604 5 0.50730644 6 0.50729121 7 0.50728588 8 0.50728382 9 0.50728297 10 0.50728259 11 0.50728241 12 0.50728233 13 0.50728228 14 0.50728226 15 0.50728225 16 0.50728224 17 0.50728224 18 0.50728224 19 0.50728224 20 0.50728223 TEST18 LEGENDRE_EK_COMPUTE computes a Gauss-Legendre rule; LEGENDRE_SET looks up the same data. Compare the data for N = 31 Maximum abscissa difference is 4.4408921e-16 for index I = 1 Computed:-0.98468591 Stored: -0.98468591 Maximum weight difference is 1.4016566e-15 for index I = 16 Computed:0.099225011 Stored: 0.099225011 TEST18 LEGENDRE_EK_COMPUTE computes a Gauss-Legendre rule; LEGENDRE_SET looks up the same data. Compare the data for N = 64 Maximum abscissa difference is 8.8817842e-16 for index I = 11 Computed:-0.8406293 Stored: -0.8406293 Maximum weight difference is 1.2802259e-15 for index I = 53 Computed:0.024352703 Stored: 0.024352703 TEST18 LEGENDRE_EK_COMPUTE computes a Gauss-Legendre rule; LEGENDRE_SET looks up the same data. Compare the data for N = 129 Maximum abscissa difference is 8.8817842e-16 for index I = 7 Computed:-0.98237074 Stored: -0.98237074 Maximum weight difference is 1.9428903e-15 for index I = 39 Computed:0.019932748 Stored: 0.019932748 TEST18 LEGENDRE_EK_COMPUTE computes a Gauss-Legendre rule; LEGENDRE_SET looks up the same data. Compare the data for N = 255 Maximum abscissa difference is 2.4424907e-15 for index I = 77 Computed:-0.5767884 Stored: -0.5767884 Maximum weight difference is 2.697495e-15 for index I = 76 Computed:0.0099564211 Stored: 0.0099564211 TEST185 LEGENDRE_EK_COMPUTE computes a Gauss-Legendre rule; Compute the data for N = 31 x[ 0] = -0.9970874818194769; x[ 1] = -0.984685909665152; x[ 2] = -0.9625039250929499; x[ 3] = -0.9307569978966479; x[ 4] = -0.8897600299482711; x[ 5] = -0.8399203201462674; x[ 6] = -0.7817331484166247; x[ 7] = -0.7157767845868533; x[ 8] = -0.6427067229242603; x[ 9] = -0.5632491614071492; x[10] = -0.4781937820449024; x[11] = -0.388385901608233; x[12] = -0.2947180699817016; x[13] = -0.1981211993355711; x[14] = -0.09955531215234163; x[15] = 3.489633410533028e-16; x[16] = 0.09955531215234145; x[17] = 0.1981211993355706; x[18] = 0.2947180699817015; x[19] = 0.3883859016082329; x[20] = 0.478193782044902; x[21] = 0.5632491614071493; x[22] = 0.6427067229242601; x[23] = 0.715776784586853; x[24] = 0.7817331484166246; x[25] = 0.8399203201462675; x[26] = 0.8897600299482712; x[27] = 0.9307569978966479; x[28] = 0.9625039250929497; x[29] = 0.9846859096651527; x[30] = 0.9970874818194768; w[ 0] = 0.007470831579248542; w[ 1] = 0.01731862079031049; w[ 2] = 0.02700901918497904; w[ 3] = 0.03643227391238547; w[ 4] = 0.04549370752720182; w[ 5] = 0.05410308242491684; w[ 6] = 0.06217478656102796; w[ 7] = 0.06962858323541093; w[ 8] = 0.07639038659877655; w[ 9] = 0.08239299176158954; w[10] = 0.08757674060847752; w[11] = 0.09189011389364128; w[12] = 0.09529024291232013; w[13] = 0.09774333538632861; w[14] = 0.09922501122667343; w[15] = 0.09972054479342662; w[16] = 0.09922501122667091; w[17] = 0.09774333538632798; w[18] = 0.09529024291231952; w[19] = 0.09189011389364156; w[20] = 0.08757674060847907; w[21] = 0.08239299176158944; w[22] = 0.07639038659877682; w[23] = 0.06962858323540988; w[24] = 0.06217478656102759; w[25] = 0.05410308242491674; w[26] = 0.04549370752720092; w[27] = 0.0364322739123866; w[28] = 0.02700901918497872; w[29] = 0.01731862079031096; w[30] = 0.007470831579248427; TEST19 LEGENDRE_EK_COMPUTE computes a Gauss-Legendre rule; SUM_SUB carries it out over subintervals. The integration interval is [0,1] Here, we use a fixed order N = 2 and use more and more subintervals. NSUB Integral 1 0.47157381 2 0.51475612 4 0.53156894 8 0.53634334 16 0.53724874 32 0.537361 64 0.5373708 128 0.5373715 256 0.53737154 512 0.53737154 TEST20 LEGENDRE_EK_COMPUTE sets up a Gauss-Legendre rule; SUM_SUB carries it out. The integration interval is [ 0,1]. The number of subintervals is 1. Quadrature order will vary. Integrand will vary. Order 1 X X^2 X^3 X^4 1 1 0.5 0.25 0.125 0.0625 2 1 0.5 0.33333333 0.25 0.19444444 3 1 0.5 0.33333333 0.25 0.2 4 1 0.5 0.33333333 0.25 0.2 5 1 0.5 0.33333333 0.25 0.2 6 1 0.5 0.33333333 0.25 0.2 7 1 0.5 0.33333333 0.25 0.2 8 1 0.5 0.33333333 0.25 0.2 9 1 0.5 0.33333333 0.25 0.2 10 1 0.5 0.33333333 0.25 0.2 Order X^5 X^6 X^7 SIN(X) EXP(X) 1 0.03125 0.015625 0.0078125 0.47942554 1.6487213 2 0.15277778 0.12037037 0.094907407 0.45958781 1.7178964 3 0.16666667 0.1425 0.12375 0.45969793 1.718281 4 0.16666667 0.14285714 0.125 0.45969769 1.7182818 5 0.16666667 0.14285714 0.125 0.45969769 1.7182818 6 0.16666667 0.14285714 0.125 0.45969769 1.7182818 7 0.16666667 0.14285714 0.125 0.45969769 1.7182818 8 0.16666667 0.14285714 0.125 0.45969769 1.7182818 9 0.16666667 0.14285714 0.125 0.45969769 1.7182818 10 0.16666667 0.14285714 0.125 0.45969769 1.7182818 Order SQRT(|X|) 1 0.70710678 2 0.67388734 3 0.66917963 4 0.66782765 5 0.66729679 6 0.66704644 7 0.66691309 8 0.66683558 9 0.66678747 10 0.66675604 TEST21 LEGENDRE_SET sets up a Gauss-Legendre rule; SUM_SUB carries it out. The integration interval is [ 0,1]. The number of subintervals is 1. Quadrature order will vary. Integrand will vary. Order 1 X X^2 X^3 X^4 1 1 0.5 0.25 0.125 0.0625 2 1 0.5 0.33333333 0.25 0.19444444 3 1 0.5 0.33333333 0.25 0.2 4 1 0.5 0.33333333 0.25 0.2 5 1 0.5 0.33333333 0.25 0.2 6 1 0.5 0.33333333 0.25 0.2 7 1 0.5 0.33333333 0.25 0.2 8 1 0.5 0.33333333 0.25 0.2 9 1 0.5 0.33333333 0.25 0.2 10 1 0.5 0.33333333 0.25 0.2 11 1 0.5 0.33333333 0.25 0.2 12 1 0.5 0.33333333 0.25 0.2 13 1 0.5 0.33333333 0.25 0.2 14 1 0.5 0.33333333 0.25 0.2 15 1 0.5 0.33333333 0.25 0.2 16 1 0.5 0.33333333 0.25 0.2 17 1 0.5 0.33333333 0.25 0.2 18 1 0.5 0.33333333 0.25 0.2 19 1 0.5 0.33333333 0.25 0.2 20 1 0.5 0.33333333 0.25 0.2 Order X^5 X^6 X^7 SIN(X) EXP(X) 1 0.03125 0.015625 0.0078125 0.47942554 1.6487213 2 0.15277778 0.12037037 0.094907407 0.45958781 1.7178964 3 0.16666667 0.1425 0.12375 0.45969793 1.718281 4 0.16666667 0.14285714 0.125 0.45969769 1.7182818 5 0.16666667 0.14285714 0.125 0.45969769 1.7182818 6 0.16666667 0.14285714 0.125 0.45969769 1.7182818 7 0.16666667 0.14285714 0.125 0.45969769 1.7182818 8 0.16666667 0.14285714 0.125 0.45969769 1.7182818 9 0.16666667 0.14285714 0.125 0.45969769 1.7182818 10 0.16666667 0.14285714 0.125 0.45969769 1.7182818 11 0.16666667 0.14285714 0.125 0.45969769 1.7182818 12 0.16666667 0.14285714 0.125 0.45969769 1.7182818 13 0.16666667 0.14285714 0.125 0.45969769 1.7182818 14 0.16666667 0.14285714 0.125 0.45969769 1.7182818 15 0.16666667 0.14285714 0.125 0.45969769 1.7182818 16 0.16666667 0.14285714 0.125 0.45969769 1.7182818 17 0.16666667 0.14285714 0.125 0.45969769 1.7182818 18 0.16666667 0.14285714 0.125 0.45969769 1.7182818 19 0.16666667 0.14285714 0.125 0.45969769 1.7182818 20 0.16666667 0.14285714 0.125 0.45969769 1.7182818 Order SQRT(|X|) 1 0.70710678 2 0.67388734 3 0.66917963 4 0.66782765 5 0.66729679 6 0.66704644 7 0.66691309 8 0.66683558 9 0.66678747 10 0.66675604 11 0.66673464 12 0.66671956 13 0.66670864 14 0.66670053 15 0.66669438 16 0.66668963 17 0.66668591 18 0.66668295 19 0.66668057 20 0.66667863 TEST22 LEGENDRE_SET sets up a Gauss-Legendre rule for integrating F(X) over [-1,1]; RULE_ADJUST adjusts a rule for a new interval. LEGENDRE_SET_X0_01 sets up a Gauss-Legendre rule for integrating F(X) over [0,1]; We will use LEGENDRE_SET to get a rule for [-1,1], adjust it to [0,1] using RULE_ADJUST, and compare the results of LEGENDRE_SET_X0_01. Abscissas: Original Adjusted Stored 0 -0.906179845939 0.0469100770307 0.046910077 1 -0.538469310106 0.230765344947 0.2307653449 2 0 0.5 0.5 3 0.538469310106 0.769234655053 0.7692346551 4 0.906179845939 0.953089922969 0.953089923 Weights: Original Adjusted Stored 0 0.236926885056 0.118463442528 0.1184634425 1 0.478628670499 0.23931433525 0.2393143352 2 0.568888888889 0.284444444444 0.2844444444 3 0.478628670499 0.23931433525 0.2393143352 4 0.236926885056 0.118463442528 0.1184634425 TEST23 LEGENDRE_SET_COS sets up a Gauss-Legendre rule over [-PI/2,PI/2] with weight function COS(X); SUM_SUB carries it out. The integration interval is [-1.57079632679,1.57079632679]. The number of subintervals is 1 Quadrature order will vary. Integrand will vary. Order 1 X X^2 X^3 X^4 1 2 0 0 0 0 2 2 0 0.9348022 0 0.43692758 4 2 -5.5511151e-17 0.9348022 0 0.95850997 8 2 -4.1633363e-17 0.9348022 2.7755576e-17 0.95850997 16 2 -3.989864e-17 0.9348022 6.9388939e-18 0.95850997 Order X^5 X^6 X^7 SIN(X) EXP(X) 1 0 0 0 0 2 2 0 0.20422043 0 0 2.4858924 4 0 1.2881131 0 -5.5511151e-17 2.5091737 8 -2.7755576e-17 1.2881131 0 -3.469447e-17 2.5091785 16 4.1633363e-17 1.2881131 -3.469447e-17 2.9056618e-17 2.5091785 Order SQRT(|X|) 1 0 2 1.6536836 4 1.5175561 8 1.4541365 16 1.4262807 TEST24 LEGENDRE_SET_SQRTX_01 sets up a Gauss-Legendre rule over [0,1] with weight function SQRT(X); The integration interval is [0,1]. Quadrature order will vary. Integrand will vary. Order 1 X X^2 X^3 X^4 1 0.66666667 0.4 0.24 0.144 0.0864 2 0.66666667 0.4 0.28571429 0.22222222 0.17888637 4 0.66666667 0.4 0.28571429 0.22222222 0.18181818 8 0.66666667 0.4 0.28571429 0.22222222 0.18181818 Order X^5 X^6 X^7 SIN(X) EXP(X) 1 0.05184 0.031104 0.0186624 0.37642832 1.2147459 2 0.14585258 0.11946643 0.098013672 0.36415913 1.2554174 4 0.15384615 0.13333333 0.11764706 0.36422193 1.2556301 8 0.15384615 0.13333333 0.11764706 0.36422193 1.2556301 Order SQRT(|X|) 1 0.51639778 2 0.50205963 4 0.50020905 8 0.50001755 TEST25 LEGENDRE_SET_SQRTX2_01 sets up a Gauss-Legendre rule over [0,1] with weight function 1/SQRT(X); The integration interval is [0,1]. Quadrature order will vary. Integrand will vary. Order 1 X X^2 X^3 X^4 1 1.1111111 0.66666667 0.4 0.24 0.144 2 1.4311111 0.66666667 0.4 0.28571429 0.22222222 4 1.6697606 0.66666667 0.4 0.28571429 0.22222222 8 1.8205535 0.66666667 0.4 0.28571429 0.22222222 Order X^5 X^6 X^7 SIN(X) EXP(X) 1 0.0864 0.05184 0.031104 0.62738053 2.0245764 2 0.17888637 0.14585258 0.11946643 0.62051486 2.3563758 4 0.18181818 0.15384615 0.13333333 0.6205366 2.5950641 8 0.18181818 0.15384615 0.13333333 0.6205366 2.745857 Order SQRT(|X|) 1 0.86066297 2 0.94485044 4 0.98168976 8 0.99462159 TEST26 LEGENDRE_SET_COS2 sets up a Gauss-Legendre rule over [0,PI/2] with weight function COS(X); SUM_SUB carries it out. The integration interval is [-1.5707963,1.5707963]. The number of subintervals is 1 Quadrature order will vary. Integrand will vary. Order 1 X X^2 X^3 X^4 2 1 0.57079633 0.4674011 0.45100662 0.45813342 4 1 0.57079633 0.4674011 0.45100662 0.47925499 8 1 0.57079633 0.4674011 0.45100662 0.47925499 16 1 0.57079633 0.4674011 0.45100662 0.47925499 Order X^5 X^6 X^7 SIN(X) EXP(X) 2 0.47191765 0.48788986 0.50487644 0.49946251 1.9034786 4 0.54298266 0.64405656 0.79076895 0.49999999 1.9052387 8 0.54298266 0.64405656 0.79076895 0.5 1.9052387 16 0.54298266 0.64405656 0.79076895 0.5 1.9052387 Order SQRT(|X|) 2 0.71452828 4 0.70593166 8 0.70433678 16 0.70408047 TEST27 LEGENDRE_SET_LOG sets up a Gauss-Legendre rule for integrating -LOG(X) * F(X) over [0,1]; SUM_SUB carries it out. The integration interval is [ 0,1]. The number of subintervals is 1. Quadrature order will vary. Integrand will vary. Order 1 X X^2 X^3 X^4 1 1 0.25 0.0625 0.015625 0.00390625 2 1 0.25 0.11111111 0.0625 0.037147266 3 1 0.25 0.11111111 0.0625 0.04 4 1 0.25 0.11111111 0.0625 0.04 5 1 0.25 0.11111111 0.0625 0.04 6 1 0.25 0.11111111 0.0625 0.04 7 1 0.25 0.11111111 0.0625 0.04 8 1 0.25 0.11111111 0.0625 0.04 16 1 0.25 0.11111111 0.0625 0.04 Order X^5 X^6 X^7 SIN(X) EXP(X) 1 0.0009765625 0.00024414062 6.1035156e-05 0.24740396 1.2840254 2 0.022317492 0.013435099 0.0080909543 0.23976772 1.3177264 3 0.027777778 0.020234921 0.015124045 0.23981184 1.3179018 4 0.027777778 0.020408163 0.015625 0.23981174 1.3179022 5 0.027777778 0.020408163 0.015625 0.23981174 1.3179022 6 0.027777778 0.020408163 0.015625 0.23981174 1.3179022 7 0.027777778 0.020408163 0.015625 0.23981174 1.3179022 8 0.027777778 0.020408163 0.015625 0.23981174 1.3179022 16 0.027777778 0.020408163 0.015625 0.23981174 1.3179022 Order SQRT(|X|) 1 0.5 2 0.45891049 3 0.45073646 4 0.4478323 5 0.44650553 6 0.44580318 7 0.4453929 8 0.4451356 16 0.44456943 TEST28 LEGENDRE_SET_X0_01 sets up a Gauss-Legendre rule for integrating F(X) over [0,1]; SUM_SUB carries it out. The integration interval is [ 0,1]. The number of subintervals is 1. Quadrature order will vary. Integrand will vary. Order 1 X X^2 X^3 X^4 1 1 0.5 0.25 0.125 0.0625 2 1 0.5 0.33333333 0.25 0.19444444 3 1 0.5 0.33333333 0.25 0.2 4 1 0.5 0.33333333 0.25 0.2 5 1 0.5 0.33333333 0.25 0.2 6 1 0.5 0.33333333 0.25 0.2 7 1 0.5 0.33333333 0.25 0.2 8 1 0.5 0.33333333 0.25 0.2 Order X^5 X^6 X^7 SIN(X) EXP(X) 1 0.03125 0.015625 0.0078125 0.47942554 1.6487213 2 0.15277778 0.12037037 0.094907407 0.45958781 1.7178964 3 0.16666667 0.1425 0.12375 0.45969793 1.718281 4 0.16666667 0.14285714 0.125 0.45969769 1.7182818 5 0.16666667 0.14285714 0.125 0.45969769 1.7182818 6 0.16666667 0.14285714 0.125 0.45969769 1.7182818 7 0.16666667 0.14285714 0.125 0.45969769 1.7182818 8 0.16666667 0.14285714 0.125 0.45969769 1.7182818 Order SQRT(|X|) 1 0.70710678 2 0.67388734 3 0.66917963 4 0.66782765 5 0.66729679 6 0.66704644 7 0.66691309 8 0.66683558 TEST29 LEGENDRE_SET_X1 sets up a Gauss-Legendre rule for integrating ( 1 + X ) * F(X) over [-1,1]; SUM_SUB carries it out. The integration interval is [ 0,1]. The number of subintervals is 1. Quadrature order will vary. Integrand will vary. Order 1 X X^2 X^3 X^4 1 1 0.66666667 0.44444444 0.2962963 0.19753086 2 1 0.66666667 0.5 0.4 0.33 3 1 0.66666667 0.5 0.4 0.33333333 4 1 0.66666667 0.5 0.4 0.33333333 5 1 0.66666667 0.5 0.4 0.33333333 6 1 0.66666667 0.5 0.4 0.33333333 7 1 0.66666667 0.5 0.4 0.33333333 8 1 0.66666667 0.5 0.4 0.33333333 9 1 0.66666667 0.5 0.4 0.33333333 Order X^5 X^6 X^7 SIN(X) EXP(X) 1 0.13168724 0.087791495 0.058527663 0.6183698 1.947734 2 0.276 0.2322 0.19584 0.60226153 1.9997492 3 0.28571429 0.24979592 0.22141885 0.60233751 1.9999995 4 0.28571429 0.25 0.22222222 0.60233736 2 5 0.28571429 0.25 0.22222222 0.60233736 2 6 0.28571429 0.25 0.22222222 0.60233736 2 7 0.28571429 0.25 0.22222222 0.60233736 2 8 0.28571429 0.25 0.22222222 0.60233736 2 9 0.28571429 0.25 0.22222222 0.60233736 2 Order SQRT(|X|) 1 0.81649658 2 0.80153861 3 0.80033005 4 0.80010349 5 0.80004063 6 0.80001854 7 0.80000942 8 0.8000052 9 0.80000306 TEST30: LEGENDRE_SET_X1 sets up a Gauss-Legendre rule for integrating ( 1 + X ) * F(X) over [-1,1]; RULE_ADJUST adjusts a rule for a new interval. LEGENDRE_SET_X1_01 sets up a Gauss-Legendre rule for integrating X * F(X) over [0,1]; We will use LEGENDRE_SET_X1 to get a rule for [-1,1], adjust it to [0,1] using RULE_ADJUST, make further adjustments because the weight function is not 1, and compare the results of LEGENDRE_SET_X1_01. Abscissas: Original Adjusted Stored 0 -0.802929828402 0.0985350857988 0.0985350858 1 -0.390928546707 0.304535726646 0.3045357266 2 0.124050379505 0.562025189753 0.5620251898 3 0.603973164253 0.801986582126 0.8019865821 4 0.920380285897 0.960190142949 0.9601901429 Weights: Original Adjusted Stored 0 0.0629916580868 0.0157479145217 0.0157479145 1 0.29563548029 0.0739088700726 0.0739088701 2 0.585547948339 0.146386987085 0.1463869871 3 0.668698552377 0.167174638094 0.1671746381 4 0.387126360907 0.0967815902267 0.0967815902 TEST31 LEGENDRE_SET_X1_01 sets up a Gauss-Legendre rule for integrating X * F(X) over [0,1]; SUM_SUB carries it out. The integration interval is [ 0,1]. The number of subintervals is 1. Quadrature order will vary. Integrand will vary. Order 1 X X^2 X^3 X^4 1 0.5 0.33333333 0.22222222 0.14814815 0.098765432 2 0.5 0.33333333 0.25 0.2 0.165 3 0.5 0.33333333 0.25 0.2 0.16666667 4 0.5 0.33333333 0.25 0.2 0.16666667 5 0.5 0.33333333 0.25 0.2 0.16666667 6 0.50000001 0.33333333 0.25 0.2 0.16666667 7 0.5 0.33333333 0.25 0.2 0.16666667 8 0.5 0.33333333 0.25 0.2 0.16666667 Order X^5 X^6 X^7 SIN(X) EXP(X) 1 0.065843621 0.043895748 0.029263832 0.3091849 0.97386702 2 0.138 0.1161 0.09792 0.30113076 0.99987461 3 0.14285714 0.12489796 0.11070943 0.30116875 0.99999975 4 0.14285714 0.125 0.11111111 0.30116868 1 5 0.14285714 0.125 0.11111111 0.30116868 1 6 0.14285714 0.125 0.11111111 0.30116868 1 7 0.14285714 0.125 0.11111111 0.30116868 1 8 0.14285714 0.125 0.11111111 0.30116868 1 Order SQRT(|X|) 1 0.40824829 2 0.40076931 3 0.40016502 4 0.40005174 5 0.40002032 6 0.40000927 7 0.40000471 8 0.4000026 TEST32 LEGENDRE_SET_X2 sets up a Gauss-Legendre rule for integrating (1 + X)**2 * F(X) over [-1,1]; SUM_SUB carries it out. The integration interval is [ 0,1]. The number of subintervals is 1. Quadrature order will vary. Integrand will vary. Order 1 X X^2 X^3 X^4 1 1.3333333 1 0.75 0.5625 0.421875 2 1.3333333 1 0.8 0.66666667 0.56888889 3 1.3333333 1 0.8 0.66666667 0.57142857 4 1.3333333 1 0.8 0.66666667 0.57142857 5 1.3333333 1 0.8 0.66666667 0.57142857 6 1.3333333 1 0.8 0.66666667 0.57142857 7 1.3333333 1 0.8 0.66666667 0.57142857 8 1.3333333 1 0.8 0.66666667 0.57142857 9 1.3333333 1 0.8 0.66666667 0.57142857 Order X^5 X^6 X^7 SIN(X) EXP(X) 1 0.31640625 0.23730469 0.17797852 0.90885168 2.8226667 2 0.49185185 0.42824691 0.37425514 0.89291418 2.872925 3 0.5 0.44430272 0.39939413 0.89297721 2.8731269 4 0.5 0.44444444 0.4 0.8929771 2.8731273 5 0.5 0.44444444 0.4 0.8929771 2.8731273 6 0.5 0.44444444 0.4 0.8929771 2.8731273 7 0.5 0.44444444 0.4 0.8929771 2.8731273 8 0.5 0.44444444 0.4 0.8929771 2.8731273 9 0.5 0.44444444 0.4 0.8929771 2.8731273 Order SQRT(|X|) 1 1.1547005 2 1.1435362 3 1.1429559 4 1.1428795 5 1.1428638 6 1.1428595 7 1.1428581 8 1.1428576 9 1.1428574 TEST33: LEGENDRE_SET_X2 sets up a Gauss-Legendre rule for integrating ( 1 + X )^2 * F(X) over [-1,1]; RULE_ADJUST adjusts a rule for a new interval. LEGENDRE_SET_X2_01 sets up a Gauss-Legendre rule for integrating X^2 * F(X) over [0,1]; We will use LEGENDRE_SET_X2 to get a rule for [-1,1], adjust it to [0,1] using RULE_ADJUST, make further adjustments because the weight function is not 1, and compare the results of LEGENDRE_SET_X2_01. Abscissas: Original Adjusted Stored 0 -0.702108425894 0.148945787053 0.1489457871 1 -0.268666945262 0.365666527369 0.3656665274 2 0.220227225869 0.610113612934 0.6101136129 3 0.653039358457 0.826519679228 0.8265196792 4 0.930842120164 0.965421060082 0.9654210601 Weights: Original Adjusted Stored 0 0.0329106016248 0.0041138252031 0.0041138252 1 0.256444805784 0.032055600723 0.0320556007 2 0.713601289773 0.0892001612216 0.0892001612 3 1.0095916952 0.1261989619 0.1261989619 4 0.654118274286 0.0817647842858 0.0817647843 TEST34 LEGENDRE_SET_X2_01 sets up a Gauss-Legendre rule for integrating X*X * F(X) over [0,1]; SUM_SUB carries it out. The integration interval is [ 0,1]. The number of subintervals is 1. Quadrature order will vary. Integrand will vary. Order 1 X X^2 X^3 X^4 1 0.33333333 0.25 0.1875 0.140625 0.10546875 2 0.33333333 0.25 0.2 0.16666667 0.14222222 3 0.33333333 0.25 0.2 0.16666667 0.14285714 4 0.33333333 0.25 0.2 0.16666667 0.14285714 5 0.33333333 0.25 0.2 0.16666667 0.14285714 6 0.33333333 0.25 0.2 0.16666667 0.14285714 7 0.33333333 0.25 0.2 0.16666667 0.14285714 8 0.33333333 0.25 0.2 0.16666667 0.14285714 Order X^5 X^6 X^7 SIN(X) EXP(X) 1 0.079101562 0.059326172 0.044494629 0.22721292 0.70566667 2 0.12296296 0.10706173 0.093563786 0.22322855 0.71823124 3 0.125 0.11107568 0.099848533 0.2232443 0.71828174 4 0.125 0.11111111 0.1 0.22324428 0.71828183 5 0.125 0.11111111 0.1 0.22324428 0.71828183 6 0.125 0.11111111 0.1 0.22324428 0.71828183 7 0.125 0.11111111 0.1 0.22324428 0.71828183 8 0.125 0.11111111 0.1 0.22324428 0.71828183 Order SQRT(|X|) 1 0.28867513 2 0.28588404 3 0.28573898 4 0.28571989 5 0.28571595 6 0.28571488 7 0.28571453 8 0.2857144 LOBATTO_COMPUTE_TEST LOBATTO_COMPUTE computes a Lobatto rule; I X W 0 -1 0.16666667 1 -0.4472136 0.83333333 2 0.4472136 0.83333333 3 1 0.16666667 0 -1 0.047619048 1 -0.8302239 0.27682605 2 -0.46884879 0.43174538 3 0 0.48761905 4 0.46884879 0.43174538 5 0.8302239 0.27682605 6 1 0.047619048 0 -1 0.022222222 1 -0.91953391 0.13330599 2 -0.73877387 0.22488934 3 -0.47792495 0.29204268 4 -0.16527896 0.32753976 5 0.16527896 0.32753976 6 0.47792495 0.29204268 7 0.73877387 0.22488934 8 0.91953391 0.13330599 9 1 0.022222222 LOBATTO_SET_TEST LOBATTO_SET sets a Lobatto rule; I X W 0 -1 0.16666667 1 -0.4472136 0.83333333 2 0.4472136 0.83333333 3 1 0.16666667 0 -1 0.047619048 1 -0.8302239 0.27682605 2 -0.46884879 0.43174538 3 0 0.48761905 4 0.46884879 0.43174538 5 0.8302239 0.27682605 6 1 0.047619048 0 -1 0.022222222 1 -0.91953391 0.13330599 2 -0.73877387 0.22488934 3 -0.47792495 0.29204268 4 -0.16527896 0.32753976 5 0.16527896 0.32753976 6 0.47792495 0.29204268 7 0.73877387 0.22488934 8 0.91953391 0.13330599 9 1 0.022222222 MOULTON_SET_TEST MOULTON_SET sets up an Adams-Moulton rule; Index X W 0 1 1 0 1 0.5 1 0 0.5 0 1 0.41666667 1 0 0.66666667 2 -1 -0.083333333 0 1 0.375 1 0 0.79166667 2 -1 -0.20833333 3 -2 0.041666667 0 1 0.34861111 1 0 0.89722222 2 -1 -0.36666667 3 -2 0.14722222 4 -3 -0.026388889 0 1 0.32986111 1 0 0.99097222 2 -1 -0.55416667 3 -2 0.33472222 4 -3 -0.12013889 5 -4 0.01875 0 1 0.31559193 1 0 1.0765873 2 -1 -0.76820437 3 -2 0.62010582 4 -3 -0.33417659 5 -4 0.10436508 6 -5 -0.01426918 0 1 0.30422454 1 0 1.1561591 2 -1 -1.0069196 3 -2 1.0179646 4 -3 -0.73203538 5 -4 0.34308036 6 -5 -0.093840939 7 -6 0.011367394 0 1 0.294868 1 0 1.2310114 2 -1 -1.2689027 3 -2 1.5419307 4 -3 -1.3869929 5 -4 0.86704641 6 -5 -0.35582396 7 -6 0.086219687 8 -7 -0.0093565366 0 1 0.28697545 1 0 1.3020443 2 -1 -1.5530346 3 -2 2.2049052 4 -3 -2.3814548 5 -4 1.8615082 6 -5 -1.0187985 7 -6 0.37035163 8 -7 -0.080389523 9 -8 0.007892554 NCC_SET_TEST NCC_SET sets up a Newton-Cotes Closed rule; Index X W 0 0 2 0 -1 1 1 1 1 0 -1 0.33333333 1 0 1.3333333 2 1 0.33333333 0 -1 0.25 1 -0.33333333 0.75 2 0.33333333 0.75 3 1 0.25 0 -1 0.15555556 1 -0.5 0.71111111 2 0 0.26666667 3 0.5 0.71111111 4 1 0.15555556 0 -1 0.13194444 1 -0.6 0.52083333 2 -0.2 0.34722222 3 0.2 0.34722222 4 0.6 0.52083333 5 1 0.13194444 0 -1 0.097619048 1 -0.66666667 0.51428571 2 -0.33333333 0.064285714 3 0 0.64761905 4 0.33333333 0.064285714 5 0.66666667 0.51428571 6 1 0.097619048 0 -1 0.086921296 1 -0.71428571 0.41400463 2 -0.42857143 0.153125 3 -0.14285714 0.34594907 4 0.14285714 0.34594907 5 0.42857143 0.153125 6 0.71428571 0.41400463 7 1 0.086921296 0 -1 0.069770723 1 -0.75 0.41537919 2 -0.5 -0.065467372 3 -0.25 0.74045855 4 0 -0.32028219 5 0.25 0.74045855 6 0.5 -0.065467372 7 0.75 0.41537919 8 1 0.069770723 0 -1 0.063772321 1 -0.77777778 0.35136161 2 -0.55555556 0.024107143 3 -0.33333333 0.43178571 4 -0.11111111 0.12897321 5 0.11111111 0.12897321 6 0.33333333 0.43178571 7 0.55555556 0.024107143 8 0.77777778 0.35136161 9 1 0.063772321 TEST38 NCC_COMPUTE computes a closed Newton-Cotes rule; SUM_SUB carries it out. The integration interval is [0,1]. The number of subintervals is 1 Quadrature order will vary. Integrand will vary. Order 1 X X^2 X^3 X^4 1 1 0.5 0.25 0.125 0.0625 2 1 0.5 0.5 0.5 0.5 3 1 0.5 0.33333333 0.25 0.20833333 4 1 0.5 0.33333333 0.25 0.2037037 5 1 0.5 0.33333333 0.25 0.2 6 1 0.5 0.33333333 0.25 0.2 7 1 0.5 0.33333333 0.25 0.2 8 1 0.5 0.33333333 0.25 0.2 9 1 0.5 0.33333333 0.25 0.2 10 1 0.5 0.33333333 0.25 0.2 11 1 0.5 0.33333333 0.25 0.2 12 1 0.5 0.33333333 0.25 0.2 13 1 0.5 0.33333333 0.25 0.2 14 1 0.5 0.33333333 0.25 0.2 15 1 0.5 0.33333333 0.25 0.2 16 1 0.5 0.33333333 0.25 0.2 17 1 0.5 0.33333333 0.25 0.2 18 1 0.5 0.33333333 0.25 0.2 19 1 0.5 0.33333333 0.25 0.2 20 0.99999996 0.49999999 0.33333333 0.25 0.2 21 0.9999999 0.49999995 0.3333333 0.24999998 0.19999999 Order X^5 X^6 X^7 SIN(X) EXP(X) 1 0.03125 0.015625 0.0078125 0.47942554 1.6487213 2 0.5 0.5 0.5 0.42073549 1.8591409 3 0.1875 0.17708333 0.171875 0.45986219 1.7188612 4 0.17592593 0.15843621 0.14711934 0.45977056 1.7185402 5 0.16666667 0.14322917 0.12630208 0.45969745 1.7182827 6 0.16666667 0.14306667 0.12573333 0.45969756 1.7182823 7 0.16666667 0.14285714 0.125 0.45969769 1.7182818 8 0.16666667 0.14285714 0.125 0.45969769 1.7182818 9 0.16666667 0.14285714 0.125 0.45969769 1.7182818 10 0.16666667 0.14285714 0.125 0.45969769 1.7182818 11 0.16666667 0.14285714 0.125 0.45969769 1.7182818 12 0.16666667 0.14285714 0.125 0.45969769 1.7182818 13 0.16666667 0.14285714 0.125 0.45969769 1.7182818 14 0.16666667 0.14285714 0.125 0.45969769 1.7182818 15 0.16666667 0.14285714 0.125 0.45969769 1.7182818 16 0.16666667 0.14285714 0.125 0.45969769 1.7182818 17 0.16666667 0.14285714 0.125 0.45969769 1.7182818 18 0.16666667 0.14285714 0.125 0.45969769 1.7182818 19 0.16666667 0.14285714 0.125 0.45969769 1.7182818 20 0.16666667 0.14285714 0.125 0.45969768 1.7182818 21 0.16666666 0.14285714 0.125 0.45969764 1.7182817 Order SQRT(|X|) 1 0.70710678 2 0.5 3 0.63807119 4 0.64769257 5 0.6577566 6 0.65963774 7 0.66229602 8 0.66297345 9 0.6640488 10 0.66437037 11 0.66491152 12 0.66509039 13 0.66540158 14 0.66551186 15 0.66570768 16 0.66578077 17 0.66591226 18 0.66596337 19 0.6660561 20 0.66609332 21 0.66616122 TEST39 NCO_SET sets up an open Newton-Cotes rule; SUM_SUB carries it out. The integration interval is [0,1]. The number of subintervals is 1 Quadrature order will vary. Integrand will vary. Order 1 X X^2 X^3 X^4 1 1 0.5 0.25 0.125 0.0625 2 1 0.5 0.27777778 0.16666667 0.10493827 3 1 0.5 0.33333333 0.25 0.19270833 4 1 0.5 0.33333333 0.25 0.19493333 5 1 0.5 0.33333333 0.25 0.2 6 1 0.5 0.33333333 0.25 0.2 7 1 0.5 0.33333333 0.25 0.2 9 1 0.5 0.33333333 0.25 0.2 Order X^5 X^6 X^7 SIN(X) EXP(X) 1 0.03125 0.015625 0.0078125 0.47942554 1.6487213 2 0.067901235 0.044581619 0.029492455 0.47278225 1.6716732 3 0.1484375 0.11360677 0.086425781 0.4595533 1.7177765 4 0.154 0.12229333 0.09736 0.45959752 1.7179302 5 0.16666667 0.14210391 0.12236368 0.45969819 1.7182801 6 0.16666667 0.14232519 0.12313818 0.45969805 1.7182806 7 0.16666667 0.14285714 0.125 0.45969769 1.7182818 9 0.16666667 0.14285714 0.125 0.45969769 1.7182818 Order SQRT(|X|) 1 0.70710678 2 0.69692343 3 0.67498134 4 0.67354587 5 0.67016159 6 0.66969878 7 0.66859434 9 0.66789365 TEST40 NCO_COMPUTE computes an open Newton-Cotes rule; SUM_SUB carries it out. The integration interval is [0,1]. The number of subintervals is 1 Quadrature order will vary. Integrand will vary. Order 1 X X^2 X^3 X^4 1 1 0.5 0.25 0.125 0.0625 2 1 0.5 0.27777778 0.16666667 0.10493827 3 1 0.5 0.33333333 0.25 0.19270833 4 1 0.5 0.33333333 0.25 0.19493333 5 1 0.5 0.33333333 0.25 0.2 6 1 0.5 0.33333333 0.25 0.2 7 1 0.5 0.33333333 0.25 0.2 8 1 0.5 0.33333333 0.25 0.2 9 1 0.5 0.33333333 0.25 0.2 Order X^5 X^6 X^7 SIN(X) EXP(X) 1 0.03125 0.015625 0.0078125 0.47942554 1.6487213 2 0.067901235 0.044581619 0.029492455 0.47278225 1.6716732 3 0.1484375 0.11360677 0.086425781 0.4595533 1.7177765 4 0.154 0.12229333 0.09736 0.45959752 1.7179302 5 0.16666667 0.14210391 0.12236368 0.45969819 1.7182801 6 0.16666667 0.14232519 0.12313818 0.45969805 1.7182806 7 0.16666667 0.14285714 0.125 0.45969769 1.7182818 8 0.16666667 0.14285714 0.125 0.45969769 1.7182818 9 0.16666667 0.14285714 0.125 0.45969769 1.7182818 Order SQRT(|X|) 1 0.70710678 2 0.69692343 3 0.67498134 4 0.67354587 5 0.67016159 6 0.66969878 7 0.66859434 8 0.66838671 9 0.66789365 TEST401 NCOH_SET sets up an open half Newton-Cotes rule; SUM_SUB carries it out. The integration interval is [0,1]. The number of subintervals is 1 Quadrature order will vary. Integrand will vary. Order 1 X X^2 X^3 X^4 1 1 0.5 0.25 0.125 0.0625 2 1 0.5 0.3125 0.21875 0.16015625 3 1 0.5 0.33333333 0.25 0.19675926 4 1 0.5 0.33333333 0.25 0.19832357 5 1 0.5 0.33333333 0.25 0.2 6 1 0.5 0.33333333 0.25 0.2 7 1 0.5 0.33333333 0.25 0.2 8 1 0.5 0.33333333 0.25 0.2 9 1 0.5 0.33333333 0.25 0.2 Order X^5 X^6 X^7 SIN(X) EXP(X) 1 0.03125 0.015625 0.0078125 0.47942554 1.6487213 2 0.11914062 0.089111328 0.066772461 0.46452136 1.7005127 3 0.15856481 0.12950103 0.10661008 0.45963375 1.7180564 4 0.16247559 0.13584646 0.11513138 0.45966469 1.718165 5 0.16666667 0.14259167 0.12407083 0.45969787 1.7182812 6 0.16666667 0.14269768 0.12444189 0.4596978 1.7182815 7 0.16666667 0.14285714 0.125 0.45969769 1.7182818 8 0.16666667 0.14285714 0.125 0.45969769 1.7182818 9 0.16666667 0.14285714 0.125 0.45969769 1.7182818 Order SQRT(|X|) 1 0.70710678 2 0.6830127 3 0.6721964 4 0.67060294 5 0.6688765 6 0.66845061 7 0.6678745 8 0.66769842 9 0.66743641 TEST402 NCOH_COMPUTE computes an open half Newton-Cotes rule; SUM_SUB carries it out. The integration interval is [0,1]. The number of subintervals is 1 Quadrature order will vary. Integrand will vary. Order 1 X X^2 X^3 X^4 1 1 0.5 0.25 0.125 0.0625 2 1 0.5 0.3125 0.21875 0.16015625 3 1 0.5 0.33333333 0.25 0.19675926 4 1 0.5 0.33333333 0.25 0.19832357 5 1 0.5 0.33333333 0.25 0.2 6 1 0.5 0.33333333 0.25 0.2 7 1 0.5 0.33333333 0.25 0.2 8 1 0.5 0.33333333 0.25 0.2 9 1 0.5 0.33333333 0.25 0.2 Order X^5 X^6 X^7 SIN(X) EXP(X) 1 0.03125 0.015625 0.0078125 0.47942554 1.6487213 2 0.11914062 0.089111328 0.066772461 0.46452136 1.7005127 3 0.15856481 0.12950103 0.10661008 0.45963375 1.7180564 4 0.16247559 0.13584646 0.11513138 0.45966469 1.718165 5 0.16666667 0.14259167 0.12407083 0.45969787 1.7182812 6 0.16666667 0.14269768 0.12444189 0.4596978 1.7182815 7 0.16666667 0.14285714 0.125 0.45969769 1.7182818 8 0.16666667 0.14285714 0.125 0.45969769 1.7182818 9 0.16666667 0.14285714 0.125 0.45969769 1.7182818 Order SQRT(|X|) 1 0.70710678 2 0.6830127 3 0.6721964 4 0.67060294 5 0.6688765 6 0.66845061 7 0.6678745 8 0.66769842 9 0.66743641 TEST403 PATTERSON_SET sets up a Patterson rule; SUM_SUB carries it out. The integration interval is [0,1]. The number of subintervals is 1 Quadrature order will vary. Integrand will vary. Order 1 X X^2 X^3 X^4 1 1 0.5 0.25 0.125 0.0625 3 1 0.5 0.33333333 0.25 0.2 7 1 0.5 0.33333333 0.25 0.2 15 1 0.5 0.33333333 0.25 0.2 31 1 0.5 0.33333333 0.25 0.2 63 1 0.5 0.33333333 0.25 0.2 127 1 0.5 0.33333333 0.25 0.2 Order X^5 X^6 X^7 SIN(X) EXP(X) 1 0.03125 0.015625 0.0078125 0.47942554 1.6487213 3 0.16666667 0.1425 0.12375 0.45969793 1.718281 7 0.16666667 0.14285714 0.125 0.45969769 1.7182818 15 0.16666667 0.14285714 0.125 0.45969769 1.7182818 31 0.16666667 0.14285714 0.125 0.45969769 1.7182818 63 0.16666667 0.14285714 0.125 0.45969769 1.7182818 127 0.16666667 0.14285714 0.125 0.45969769 1.7182818 Order SQRT(|X|) 1 0.70710678 3 0.66917963 7 0.66680883 15 0.66667372 31 0.666667 63 0.66666668 127 0.66666667 TEST404 RADAU_COMPUTE computes a Radau rule; RADAU_SET sets a rule from a table. I X1 X2 W1 W2 1 -1 -1 0.125 0.125 2 -0.57531892 -0.57531892 0.65768864 0.65768864 3 0.18106627 0.18106627 0.77638694 0.77638694 4 0.82282408 0.82282408 0.44092442 0.44092442 1 -1 -1 0.040816327 0.040816327 2 -0.85389134 -0.85389134 0.23922749 0.23922749 3 -0.53846772 -0.53846772 0.38094987 0.38094987 4 -0.11734304 -0.11734304 0.44710983 0.44710983 5 0.32603062 0.32603062 0.42470378 0.42470378 6 0.7038428 0.7038428 0.31820423 0.31820423 7 0.94136715 0.94136715 0.14898847 0.14898847 1 -1 -1 0.02 0.02 2 -0.92748437 -0.92748437 0.12029667 0.12029667 3 -0.76384204 -0.76384204 0.20427013 0.20427013 4 -0.52564603 -0.52564603 0.26819484 0.26819484 5 -0.23623447 -0.23623447 0.30585929 0.30585929 6 0.076059198 0.076059198 0.31358246 0.31358246 7 0.38066484 0.38066484 0.29061016 0.29061016 8 0.64776669 0.64776669 0.23919343 0.23919343 9 0.85122522 0.85122522 0.16437601 0.16437601 10 0.97117518 0.97117518 0.073617005 0.073617005 TEST41 RADAU_SET sets up a Radau rule; SUM_SUB carries it out. The integration interval is [0,1]. The number of subintervals is 1 Quadrature order will vary. Integrand will vary. Order 1 X X^2 X^3 X^4 1 1 0 0 0 0 2 1 0.5 0.33333333 0.22222222 0.14814815 3 1 0.5 0.33333333 0.25 0.2 4 1 0.5 0.33333333 0.25 0.2 5 1 0.5 0.33333333 0.25 0.2 6 1 0.5 0.33333333 0.25 0.2 7 1 0.5 0.33333333 0.25 0.2 9 1 0.5 0.33333333 0.25 0.2 10 1 0.5 0.33333333 0.25 0.2 11 1 0.5 0.33333333 0.25 0.2 12 1 0.5 0.33333333 0.25 0.2 13 1 0.5 0.33333333 0.25 0.2 14 1 0.5 0.33333333 0.25 0.2 15 1 0.5 0.33333333 0.25 0.2 Order X^5 X^6 X^7 SIN(X) EXP(X) 1 0 0 0 0 1 2 0.098765432 0.065843621 0.043895748 0.46377735 1.7108005 3 0.165 0.138 0.1161 0.45968552 1.718259 4 0.16666667 0.14285714 0.12489796 0.45969771 1.7182818 5 0.16666667 0.14285714 0.125 0.45969769 1.7182818 6 0.16666667 0.14285714 0.125 0.45969769 1.7182818 7 0.16666667 0.14285714 0.125 0.45969769 1.7182818 9 0.16666667 0.14285714 0.125 0.45969769 1.7182818 10 0.16666667 0.14285714 0.125 0.45969769 1.7182818 11 0.16666667 0.14285714 0.125 0.45969769 1.7182818 12 0.16666667 0.14285714 0.125 0.45969769 1.7182818 13 0.16666667 0.14285714 0.125 0.45969769 1.7182818 14 0.16666667 0.14285714 0.125 0.45969769 1.7182818 15 0.16666667 0.14285714 0.125 0.45969769 1.7182818 Order SQRT(|X|) 1 0 2 0.61237244 3 0.65136447 4 0.66031525 5 0.6634385 6 0.66480585 7 0.6654976 9 0.66611802 10 0.666267 11 0.66636655 12 0.6664356 13 0.66648499 14 0.66652124 15 0.66654845 QUADRULE_PRB Normal end of execution. 24 April 2015 03:14:44 PM