numeric::ncdata
-- weights and
abscissae of Newton-Cotes quadraturenumeric::ncdata
(n)
returns the weights and
the abscissae of the Newton-Cotes quadrature rule with n
equidistant nodes.
numeric::ncdata(n)
n |
- | the number of nodes: a positive integer |
A 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.
The function uses option
remember
. It is not sensitive to the environment variable
DIGITS
.
numeric::gldata
,
numeric::gtdata
,
numeric::quadrature
The 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]]
numeric::quadrature
calls
numeric::ncdata
to provide the data for Newton-Cotes
quadrature.