numeric::ncdata -- weights and
abscissae of Newton-Cotes quadrature
Introductionnumeric::ncdata(n) returns the weights and
the abscissae of the Newton-Cotes quadrature rule with n
equidistant nodes.
Call(s)numeric::ncdata(n)
Parametersn |
- | the number of nodes: a positive integer |
ReturnsA list [b,c] is returned. The lists
b=[b[1],..,b[n]] and c=[c[1],..,c[n]] are the
rational weights and abscissae of the Newton-Cotes quadrature rule,
respectively.
Side
EffectsThe function uses option
remember. It is not sensitive to the environment variable
DIGITS.
Related
Functionsnumeric::gldata,
numeric::gtdata,
numeric::quadrature
Details
Example
1The following call produces exact data for the quadrature rule with four nodes:
>> numeric::ncdata(4)
[[1/8, 3/8, 3/8, 1/8], [0, 1/3, 2/3, 1]]
Backgroundnumeric::quadrature calls
numeric::ncdata to provide the data for Newton-Cotes
quadrature.