clenshaw_curtis: Clenshaw-Curtis Quadrature Formula
Description
Clenshaw-Curtis Quadrature Formula
Usage
clenshaw_curtis(f, a = -1, b = 1, n = 32, ...)
Arguments
f
function, the integrand, without singularities.
a, b
lower and upper limit of the integral; must be finite.
n
Number of Chebyshev nodes to account for.
...
Additional parameters to be passed to the function
Value
Numerical scalar, the value of the integral.
Details
Clenshaw-Curtis quadrature is based on sampling the integrand on
Chebyshev points, an operation that can be implemented using the
Fast Fourier Transform.
References
Trefethen, L. N. (2008). Is Gauss Quadrature Better Than Clenshaw-Curtis?.
http://www.comlab.ox.ac.uk/nick.trefethen/CC.pdf.