| gaussint {cmna} | R Documentation |
Gaussian integration method driver
Description
Use the Gaussian method to evaluate integrals
Usage
gaussint(f, x, w)
gauss.legendre(f, m = 5)
gauss.laguerre(f, m = 5)
gauss.hermite(f, m = 5)
Arguments
f |
function to integrate |
x |
list of evaluation points |
w |
list of weights |
m |
number of evaluation points |
Details
The gaussint function uses the Gaussian integration to
evaluate an integral. The function itself is a driver and expects
the integration points and associated weights as options.
Value
the value of the integral
See Also
Other integration:
adaptint(),
giniquintile(),
mcint(),
midpt(),
revolution-solid,
romberg(),
simp38(),
simp(),
trap()
Examples
w = c(1, 1)
x = c(-1 / sqrt(3), 1 / sqrt(3))
f <- function(x) { x^3 + x + 1 }
gaussint(f, x, w)
[Package cmna version 1.0.5 Index]