# Quadrature test

**Keywords:** quadrature test

**Description:** QUADRATURE_TEST is a MATLAB program which reads three files that define a quadrature rule, applies the quadrature rule to a set of test integrals, and reports the results. The quadrature rule is

**QUADRATURE_TEST** is a MATLAB program which reads three files that define a quadrature rule, applies the quadrature rule to a set of test integrals, and reports the results.

*the "X" file*lists the abscissas (N rows, M columns);*the "W" file*lists the weights (N rows);*the "R" file*lists the integration region corners (2 rows, M columns);

**QUADRATURE_RULES**listing below. The list of integrand functions includes:

- f(x) = ( sum ( x(1:m) ) )**2;
- f(x) = ( sum ( 2 * x(1:m) - 1 ) )**4;
- f(x) = ( sum ( x(1:m) ) )**5;
- f(x) = ( sum ( 2 * x(1:m) - 1 ) )**6;
- f(x) = 1 / ( 1 + sum ( 2 * x(1:m) ) );
- f(x) = product ( 2 * abs ( 2 * x(1:m) - 1 ) );
- f(x) = product ( pi / 2 ) * sin ( pi * x(1:m) );
- f(x) = ( sin ( (pi/4) * sum ( x(1:m) ) ) )**2;
- f(x) = exp ( sum ( c(1:m) * x(1:m) ) );
- f(x) = sum ( abs ( x(1:m) - 0.5 ) );
- f(x) = exp ( sum ( abs ( 2 * x(1:m) - 1 ) ) );
- f(x) = product ( 1
**quadrature_test**( '*prefix*' ) where*prefix*the common prefix for the files containing the abscissa (X), weight (W) and region (R) information of the quadrature rule;

The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.

NINT_EXACTNESS. a MATLAB program which demonstrates how to measure the polynomial exactness of a multidimensional quadrature rule.

QUADRATURE_RULES. a dataset directory which contains a description and examples of quadrature rules defined by a set of "X", "W" and "R" files.

QUADRATURE_TEST_2D. a MATLAB program which reads files defining a 2D quadrature rule, and applies them to all the test integrals defined by **TEST_INT_2D**.

STROUD. a MATLAB library which contains quadrature rules for a variety of unusual areas, surfaces and volumes in 2D, 3D and N-dimensions.

TEST_NINT. a MATLAB library which defines a set of integrand functions to be used for testing multidimensional quadrature rules and routines.

TESTPACK. a MATLAB library which defines a set of integrands used to test multidimensional quadrature.

Chebyshev Approximations for the Natural Logarithm of the Gamma Function, Mathematics of Computation,

Volume 5016, 2003, pages 161-172.**CC_D6_LEVEL3**is a Clenshaw-Curtis sparse grid quadrature rule in dimension 6 of level 3, 389 points.

- cc_d6_level3_x.txt. the "X" file.
- cc_d6_level3_w.txt. the "W" file.
- cc_d6_level3_r.txt. the "R" file.
- cc_d6_level3_test.txt. the test results.

**CC_D6_LEVEL4**is a Clenshaw-Curtis sparse grid quadrature rule in dimension 6 of level 4, 1457 points.

- cc_d6_level4_x.txt. the "X" file.
- cc_d6_level4_w.txt. the "W" file.
- cc_d6_level4_r.txt. the "R" file.
- cc_d6_level4_test.txt. the test results.

**CC_D6_LEVEL5**is a Clenshaw-Curtis sparse grid quadrature rule in dimension 6 of level 5, 4865 points.

- cc_d6_level5_x.txt. the "X" file.
- cc_d6_level5_w.txt. the "W" file.
- cc_d6_level5_r.txt. the "R" file.
- cc_d6_level5_test.txt. the test results.