chaospy.quadrature.chebyshev_1

chaospy.quadrature.chebyshev_1(order, lower=- 1, upper=1, physicist=False)[source]

Chebyshev-Gauss quadrature rule of the first kind.

Compute the sample points and weights for Chebyshev-Gauss quadrature. The sample points are the roots of the nth degree Chebyshev polynomial. These sample points and weights correctly integrate polynomials of degree \(2N-1\) or less.

Gaussian quadrature come in two variants: physicist and probabilist. For first order Chebyshev-Gauss physicist means a weight function \(1/\sqrt{1-x^2}\) and weights that sum to :math`1/2`, and probabilist means a weight function is \(1/\sqrt{x (1-x)}\) and sum to 1.

Args:
order (int):

The quadrature order.

lower (float):

Lower bound for the integration interval.

upper (float):

Upper bound for the integration interval.

physicist (bool):

Use physicist weights instead of probabilist.

Returns:
abscissas (numpy.ndarray):

The order+1 quadrature points for where to evaluate the model function with.

weights (numpy.ndarray):

The quadrature weights associated with each abscissas.

Examples:
>>> abscissas, weights = chaospy.quadrature.chebyshev_1(3)
>>> abscissas
array([[-0.92387953, -0.38268343,  0.38268343,  0.92387953]])
>>> weights
array([0.25, 0.25, 0.25, 0.25])
See also:

chaospy.quadrature.chebyshev_2() chaospy.quadrature.gaussian()