Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

quadcc

Adaptive Clenshaw-Curtis Quadrature


Description

Adaptive Clenshaw-Curtis Quadrature.

Usage

quadcc(f, a, b, tol = .Machine$double.eps^0.5, ...)

Arguments

f

integrand as function, may have singularities at the endpoints.

a, b

endpoints of the integration interval.

tol

relative tolerence.

...

Additional parameters to be passed to the function f.

Details

Adaptive version of the Clenshaw-Curtis quadrature formula with an (4, 8)-point erroe term.

Value

List with two components, value the value of the integral and the relative error error.

See Also

clenshaw_curtis

Examples

## Not run: 
##  Dilogarithm function
flog <- function(t) log(1-t)/t
quadcc(flog, 1, 0, tol = 1e-12)
# 1.644934066848128 - pi^2/6 < 1e-13

## End(Not run)

pracma

Practical Numerical Math Functions

v2.3.3
GPL (>= 3)
Authors
Hans W. Borchers [aut, cre]
Initial release
2021-01-22

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.