Learn R Programming

pracma (version 0.5-3)

quadQK15: Gaussian Quadrature

Description

Gaussian quadrature.

Usage

quadQK15(f, a, b, ...)

Arguments

f
function to be integrated.
a, b
end points of the interval.
...
variables to be passed to the function.

Value

  • List of value and absolute error.

Details

Gaussian quadrature of degree 15 with Gauss-Kronrod for error estimation.

References

Fausett, L. V. (2007). Applied Numerical Analysis Using Matlab. Second edition, Prentice Hall.

See Also

romberg

Examples

Run this code
quadQK15(sin, 0, pi)  #  2.000000000001791 , rel.error: 1.14e-12
quadQK15(exp, 0, 1)   #  1.718281828459045 , rel.error: 0
                      #  1.718281828459045 , i.e. exp(1) - 1

Run the code above in your browser using DataLab