quadrature.nodes.weights {spc}R Documentation

Calculate quadrature nodes and weights

Description

Computation of the nodes and weights to enable numerical quadrature.

Usage

quadrature.nodes.weights(n, type="GL", x1=-1, x2=1)

Arguments

n

number of nodes (and weights).

type

quadrature type – currently Gauss-Legendre, "GL", and Radau, "Ra", are supported.

x1

lower limit of the integration interval.

x2

upper limit of the integration interval.

Details

A more detailed description will follow soon. The algorithm for the Gauss-Legendre quadrature was delivered by Knut Petras to me, while the one for the Radau quadrature was taken from John Burkardt.

Value

Returns two vectors which hold the needed quadrature nodes and weights.

Author(s)

Sven Knoth

References

H. Brass and K. Petras (2011), Quadrature Theory. The Theory of Numerical Integration on a Compact Interval, Mathematical Surveys and Monographs, American Mathematical Society.

John Burkardt (2015), https://people.math.sc.edu/Burkardt/c_src/quadrule/quadrule.c

See Also

Many of the ARL routines use the Gauss-Legendre nodes.

Examples

# GL
n <- 10
qnw <-quadrature.nodes.weights(n, type="GL")
qnw

# Radau
n <- 10
qnw <-quadrature.nodes.weights(n, type="Ra")
qnw

[Package spc version 0.6.8 Index]