Last chance! 50% off unlimited learning
Sale ends in
clenshaw_curtis(f, a = -1, b = 1, n = 32, ...)
gaussLegendre
, gauss_kronrod
## Quadrature with Chebyshev nodes and weights
f <- function(x) sin(x+cos(10*exp(x))/3)
ezplot(f, -1, 1, fill = TRUE)
cc <- clenshaw_curtis(f, n = 64) #=> 0.0325036517151 , true error > 1.3e-10
Run the code above in your browser using DataLab