bvp_ps_lin_quad_weights obtains the weights for Clenshaw–Curtis quadrature at Chebyshev points. This allows for fast approximations of integrals for functions specified on Chebyshev Gauss–Lobatto points on .

For full information please refer to the NAG Library document for d02uy

https://www.nag.com/numeric/nl/nagdoc_28.5/flhtml/d02/d02uyf.html

Parameters
nint

, where the number of grid points is .

Returns
wfloat, ndarray, shape

The Clenshaw–Curtis quadrature weights, , for .

Raises
NagValueError
(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: is even.

Notes

bvp_ps_lin_quad_weights obtains the weights for Clenshaw–Curtis quadrature at Chebyshev points.

Given the (Clenshaw–Curtis) weights , for , and function values (where , for , are the Chebyshev Gauss–Lobatto points), then .

For a function discretized on a Chebyshev Gauss–Lobatto grid on the resultant summation must be multiplied by the factor .

References

Trefethen, L N, 2000, Spectral Methods in MATLAB, SIAM