chaospy.quadrature.chebyshev_2

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

Chebyshev-Gauss quadrature rule of the second 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 second order Chebyshev-Gauss physicist means a weight function \(\sqrt{1-x^2}\) and weights that sum to :math`2`, and probabilist means a weight function is \(\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_2(3)
>>> abscissas
array([[-0.80901699, -0.30901699,  0.30901699,  0.80901699]])
>>> weights
array([0.1381966, 0.3618034, 0.3618034, 0.1381966])
See also:

chaospy.quadrature.chebyshev_1() chaospy.quadrature.gaussian()