Home License -- for personal use only. Not for government, academic, research, commercial, or other organizational use. 13-May-2025 16:52:39 quad_fast_rule_test(): MATLAB/Octave version 9.11.0.2358333 (R2021b) Update 7 Test quad_fast_rule(). quad_fast_rule_test01(): clenshaw_curtis_rule_compute() computes a Clenshaw-Curtis quadrature rule. clenshaw_curtis_rule_set() sets a Clenshaw-Curtis quadrature rule. Compare: (X1,W1) from CLENSHAW_CURTIS_RULE_SET (X2,W2) from CLENSHAW_CURTIS_RULE_COMPUTE Order W1 W2 X1 X2 1 2.000000 2.000000 0.000000 0.000000 4 0.111111 0.111111 -1.000000 -1.000000 0.888889 0.888889 -0.500000 -0.500000 0.888889 0.888889 0.500000 0.500000 0.111111 0.111111 1.000000 1.000000 7 0.028571 0.028571 -1.000000 -1.000000 0.253968 0.253968 -0.866025 -0.866025 0.457143 0.457143 -0.500000 -0.500000 0.520635 0.520635 0.000000 0.000000 0.457143 0.457143 0.500000 0.500000 0.253968 0.253968 0.866025 0.866025 0.028571 0.028571 1.000000 1.000000 10 0.012346 0.012346 -1.000000 -1.000000 0.116567 0.116567 -0.939693 -0.939693 0.225284 0.225284 -0.766044 -0.766044 0.301940 0.301940 -0.500000 -0.500000 0.343863 0.343863 -0.173648 -0.173648 0.343863 0.343863 0.173648 0.173648 0.301940 0.301940 0.500000 0.500000 0.225284 0.225284 0.766044 0.766044 0.116567 0.116567 0.939693 0.939693 0.012346 0.012346 1.000000 1.000000 quad_fast_rule_test02(): clenshaw_curtis_rule_compute() computes a Clenshaw-Curtis rule; The integration interval is [-1,1]. Quadrature order will vary. Integrand will vary. Order F1 F2 F3 1 -0.160000 2.222222 1.414214 2 1.758664 0.689655 1.931852 3 0.479555 1.711367 1.586760 4 0.479555 1.542837 1.103539 5 0.479377 1.581331 1.523155 6 0.479422 1.584456 1.491432 7 0.479428 1.581814 1.330965 8 0.479428 1.582296 1.483961 9 0.479428 1.582221 1.476494 10 0.479428 1.582228 1.391306 11 0.479428 1.582235 1.473921 12 0.479428 1.582233 1.470589 13 0.479428 1.582233 1.415409 14 0.479428 1.582233 1.469335 15 0.479428 1.582233 1.467614 16 0.479428 1.582233 1.428316 Exact 0.479428 1.582233 1.460447 quad_fast_rule_test03(): clenshaw_curtis_integrate() applies a Clenshaw-Curtis rule; Clenshaw_curtis_integrate_fast() also applies a Clenshaw-Curtis rule, using an efficient MATLAB scheme; The integration interval is [-1,1]. Quadrature order will vary. Integrand will vary. CLENSHAW_CURTIS_INTEGRATE Order F1 F2 F3 1 -0.160000 2.222222 1.414214 2 1.758664 0.689655 1.931852 3 0.479555 1.711367 1.586760 4 0.479555 1.542837 1.103539 5 0.479377 1.581331 1.523155 6 0.479422 1.584456 1.491432 7 0.479428 1.581814 1.330965 8 0.479428 1.582296 1.483961 9 0.479428 1.582221 1.476494 10 0.479428 1.582228 1.391306 11 0.479428 1.582235 1.473921 12 0.479428 1.582233 1.470589 13 0.479428 1.582233 1.415409 14 0.479428 1.582233 1.469335 15 0.479428 1.582233 1.467614 16 0.479428 1.582233 1.428316 Exact 0.479428 1.582233 1.460447 CLENSHAW_CURTIS_INTEGRATE_FAST Order F1 F2 F3 1 -0.160000 2.222222 1.414214 2 1.758664 0.689655 1.931852 3 0.479555 1.711367 1.586760 4 0.479555 1.542837 1.103539 5 0.479377 1.581331 1.523155 6 0.479422 1.584456 1.491432 7 0.479428 1.581814 1.330965 8 0.479428 1.582296 1.483961 9 0.479428 1.582221 1.476494 10 0.479428 1.582228 1.391306 11 0.479428 1.582235 1.473921 12 0.479428 1.582233 1.470589 13 0.479428 1.582233 1.415409 14 0.479428 1.582233 1.469335 15 0.479428 1.582233 1.467614 16 0.479428 1.582233 1.428316 Exact 0.479428 1.582233 1.460447 quad_fast_rule_test04() gauss_legendre_rule_compute() computes a Clenshaw-Curtis quadrature rule. gauss_legendre_rule_set() sets a Clenshaw-Curtis quadrature rule. Compare: (X1,W1) from GAUSS_LEGENDRE_RULE_SET (X2,W2) from GAUSS_LEGENDRE_RULE_COMPUTE Order W1 W2 X1 X2 1 2.000000 2.000000 0.000000 0.000000 4 0.347855 0.347855 -0.861136 -0.861136 0.652145 0.652145 -0.339981 -0.339981 0.652145 0.652145 0.339981 0.339981 0.347855 0.347855 0.861136 0.861136 7 0.129485 0.129485 -0.949108 -0.949108 0.279705 0.279705 -0.741531 -0.741531 0.381830 0.381830 -0.405845 -0.405845 0.417959 0.417959 0.000000 -0.000000 0.381830 0.381830 0.405845 0.405845 0.279705 0.279705 0.741531 0.741531 0.129485 0.129485 0.949108 0.949108 10 0.066671 0.066671 -0.973907 -0.973907 0.149451 0.149451 -0.865063 -0.865063 0.219086 0.219086 -0.679410 -0.679410 0.269267 0.269267 -0.433395 -0.433395 0.295524 0.295524 -0.148874 -0.148874 0.295524 0.295524 0.148874 0.148874 0.269267 0.269267 0.433395 0.433395 0.219086 0.219086 0.679410 0.679410 0.149451 0.149451 0.865063 0.865063 0.066671 0.066671 0.973907 0.973907 quad_fast_rule_test05(); gauss_legendre_rule_compute() computes a Gauss-Legendre rule; The integration interval is [-1,1]. Quadrature order will vary. Integrand will vary. Order F1 F2 F3 1 -0.160000 2.222222 1.414214 2 0.479457 1.487603 1.316074 3 0.479306 1.585026 1.546873 4 0.479428 1.585060 1.473444 5 0.479428 1.581279 1.415842 6 0.479428 1.582407 1.492684 7 0.479428 1.582218 1.467885 8 0.479428 1.582231 1.437063 9 0.479428 1.582234 1.478380 10 0.479428 1.582233 1.465284 11 0.479428 1.582233 1.445525 12 0.479428 1.582233 1.472232 13 0.479428 1.582233 1.463895 14 0.479428 1.582233 1.449879 15 0.479428 1.582233 1.468941 16 0.479428 1.582233 1.463059 Exact 0.479428 1.582233 1.460447 quad_fast_rule_test06(): gauss_legendre_integrate_fast() applies a Gauss-Legendre rule; The integration interval is [-1,1]. Quadrature order will vary. Integrand will vary. Order F1 F2 F3 1 0.479457 1.487603 1.316074 2 0.479306 1.585026 1.546873 3 0.479428 1.585060 1.473444 4 0.479428 1.581279 1.415842 5 0.479428 1.582407 1.492684 6 0.479428 1.582218 1.467885 7 0.479428 1.582231 1.437063 8 0.479428 1.582234 1.478380 9 0.479428 1.582233 1.465284 10 0.479428 1.582233 1.445525 11 0.479428 1.582233 1.472232 12 0.479428 1.582233 1.463895 13 0.479428 1.582233 1.449879 14 0.479428 1.582233 1.468941 15 0.479428 1.582233 1.463059 16 0.479428 1.582233 1.452461 Exact 0.479428 1.582233 1.460447 quad_fast_rule_test07(): fejer1_rule_compute() computes a Fejer type 1 quadrature rule. fejer1_rule_set() sets a Fejer type 1 quadrature rule. Compare: (X1,W1) from FEJER1_RULE_SET (X2,W2) from FEJER1_RULE_COMPUTE Order W1 W2 X1 X2 1 2.000000 2.000000 0.000000 0.000000 4 0.264298 0.264298 -0.923880 -0.923880 0.735702 0.735702 -0.382683 -0.382683 0.735702 0.735702 0.382683 0.382683 0.264298 0.264298 0.923880 0.923880 7 0.086716 0.086716 -0.974928 -0.974928 0.287831 0.287831 -0.781831 -0.781831 0.398242 0.398242 -0.433884 -0.433884 0.454422 0.454422 0.000000 0.000000 0.398242 0.398242 0.433884 0.433884 0.287831 0.287831 0.781831 0.781831 0.086716 0.086716 0.974928 0.974928 10 0.042939 0.042939 -0.987688 -0.987688 0.145875 0.145875 -0.891007 -0.891007 0.220317 0.220317 -0.707107 -0.707107 0.280879 0.280879 -0.453990 -0.453990 0.309989 0.309989 -0.156434 -0.156434 0.309989 0.309989 0.156434 0.156434 0.280879 0.280879 0.453990 0.453990 0.220317 0.220317 0.707107 0.707107 0.145875 0.145875 0.891007 0.891007 0.042939 0.042939 0.987688 0.987688 quad_fast_rule_test08(): fejer1_rule_compute() computes a Fejer Type 1 rule; The integration interval is [-1,1]. Quadrature order will vary. Integrand will vary. Order F1 F2 F3 1 -0.160000 2.222222 1.414214 2 0.799000 1.212121 1.553774 3 0.479333 1.636326 1.574017 4 0.479500 1.590820 1.430641 5 0.479444 1.579551 1.452333 6 0.479433 1.582389 1.497600 7 0.479428 1.582105 1.452331 8 0.479428 1.582221 1.457881 9 0.479428 1.582256 1.480872 10 0.479428 1.582239 1.455389 11 0.479428 1.582230 1.457906 12 0.479428 1.582232 1.473613 13 0.479428 1.582233 1.457493 14 0.479428 1.582233 1.458820 15 0.479428 1.582233 1.469883 16 0.479428 1.582233 1.458228 Exact 0.479428 1.582233 1.460447 quad_fast_rule_test09() fejer1_integrate_fast() applies a Fejer Type 1 rule; The integration interval is [-1,1]. Quadrature order will vary. Integrand will vary. Order F1 F2 F3 1 -0.160000 2.222222 1.414214 2 0.799000 1.212121 1.553774 3 0.479333 1.636326 1.574017 4 0.479500 1.590820 1.430641 5 0.479444 1.579551 1.452333 6 0.479433 1.582389 1.497600 7 0.479428 1.582105 1.452331 8 0.479428 1.582221 1.457881 9 0.479428 1.582256 1.480872 10 0.479428 1.582239 1.455389 11 0.479428 1.582230 1.457906 12 0.479428 1.582232 1.473613 13 0.479428 1.582233 1.457493 14 0.479428 1.582233 1.458820 15 0.479428 1.582233 1.469883 16 0.479428 1.582233 1.458228 Exact 0.479428 1.582233 1.460447 quad_fast_rule_test10() fejer2_rule_compute() computes a Fejer type 2 quadrature rule. fejer2_rule_set() sets a Fejer type 2 quadrature rule. Compare: (X1,W1) from FEJER2_RULE_SET (X2,W2) from FEJER2_RULE_COMPUTE Order W1 W2 X1 X2 1 2.000000 2.000000 0.000000 0.000000 4 0.425464 0.425464 -0.809017 -0.809017 0.574536 0.574536 -0.309017 -0.309017 0.574536 0.574536 0.309017 0.309017 0.425464 0.425464 0.809017 0.809017 7 0.177965 0.177965 -0.923880 -0.923880 0.247619 0.247619 -0.707107 -0.707107 0.393464 0.393464 -0.382683 -0.382683 0.361905 0.361905 0.000000 0.000000 0.393464 0.393464 0.382683 0.382683 0.247619 0.247619 0.707107 0.707107 0.177965 0.177965 0.923880 0.923880 10 0.094420 0.094420 -0.959493 -0.959493 0.141135 0.141135 -0.841254 -0.841254 0.226387 0.226387 -0.654861 -0.654861 0.253051 0.253051 -0.415415 -0.415415 0.285007 0.285007 -0.142315 -0.142315 0.285007 0.285007 0.142315 0.142315 0.253051 0.253051 0.415415 0.415415 0.226387 0.226387 0.654861 0.654861 0.141135 0.141135 0.841254 0.841254 0.094420 0.094420 0.959493 0.959493 quad_fast_rule_test11(): fejer2_rule_compute() computes a Fejer Type 2 rule; The integration interval is [-1,1]. Quadrature order will vary. Integrand will vary. Order F1 F2 F3 1 -0.160000 2.222222 1.414214 2 0.319667 1.649485 1.000000 3 0.479333 1.548822 1.507254 4 0.479389 1.572934 1.491146 5 0.479400 1.583000 1.360391 6 0.479416 1.582978 1.487936 7 0.479428 1.582556 1.473305 8 0.479428 1.582317 1.386020 9 0.479428 1.582129 1.472308 10 0.479428 1.582195 1.470924 11 0.479428 1.582250 1.420479 12 0.479428 1.582240 1.469975 13 0.479428 1.582231 1.466859 14 0.479428 1.582232 1.426865 15 0.479428 1.582233 1.466397 16 0.479428 1.582233 1.465994 Exact 0.479428 1.582233 1.460447 quad_fast_rule_test12(): fejer2_integrate_fast() applies a Fejer Type 2 rule; The integration interval is [-1,1]. Quadrature order will vary. Integrand will vary. Order F1 F2 F3 1 -0.160000 2.222222 1.414214 2 -0.160000 2.222222 1.414214 3 0.319667 1.649485 1.000000 4 0.479333 1.548822 1.507254 5 0.479389 1.572934 1.491146 6 0.479400 1.583000 1.360391 7 0.479416 1.582978 1.487936 8 0.479428 1.582556 1.473305 9 0.479428 1.582317 1.386020 10 0.479428 1.582129 1.472308 11 0.479428 1.582195 1.470924 12 0.479428 1.582250 1.420479 13 0.479428 1.582240 1.469975 14 0.479428 1.582231 1.466859 15 0.479428 1.582232 1.426865 16 0.479428 1.582233 1.466397 Exact 0.479428 1.582233 1.460447 quad_fast_rule_test(): Normal end of execution. 13-May-2025 16:52:40