naginterfaces.library.ode.bvp_​ps_​lin_​quad_​weights

naginterfaces.library.ode.bvp_ps_lin_quad_weights(n)[source]

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://support.nag.com/numeric/nl/nagdoc_30.2/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