naginterfaces.library.ode.bvp_​ps_​lin_​cgl_​deriv

naginterfaces.library.ode.bvp_ps_lin_cgl_deriv(f)[source]

bvp_ps_lin_cgl_deriv differentiates a function discretized on Chebyshev Gauss–Lobatto points. The grid points on which the function values are to be provided are normally returned by a previous call to bvp_ps_lin_cgl_grid().

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

https://www.nag.com/numeric/nl/nagdoc_29.3/flhtml/d02/d02udf.html

Parameters
ffloat, array-like, shape

The function values , for

Returns
fdfloat, ndarray, shape

The approximations to the derivatives of the function evaluated at the Chebyshev Gauss–Lobatto points. For functions defined on , the returned derivative values (corresponding to the domain ) must be multiplied by the factor to obtain the correct values on .

Raises
NagValueError
(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: is even.

Notes

bvp_ps_lin_cgl_deriv differentiates a function discretized on Chebyshev Gauss–Lobatto points on . The polynomial interpolation on Chebyshev points is equivalent to trigonometric interpolation on equally spaced points. Hence the differentiation on the Chebyshev points can be implemented by the Fast Fourier transform (FFT).

Given the function values on Chebyshev Gauss–Lobatto points , for , is differentiated with respect to by means of forward and backward FFTs on the function values . bvp_ps_lin_cgl_deriv returns the computed derivative values , for . The derivatives are computed with respect to the standard Chebyshev Gauss–Lobatto points on ; for derivatives of a function on the returned values have to be scaled by a factor .

References

Canuto, C, Hussaini, M Y, Quarteroni, A and Zang, T A, 2006, Spectral Methods: Fundamentals in Single Domains, Springer

Greengard, L, 1991, Spectral integration and two-point boundary value problems, SIAM J. Numer. Anal. (28(4)), 1071–80

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