Newton-Cotes quadrature (source code)

= Newton-Cotes quadrature
{c}
{title2=$Q(f)=\int_a^bp_n(x)\,dx$}

= Newton-Cotes formula
{c}
{synonym}

A <Newton-Cotes quadrature> is an <interpolatory quadrature rule> whose <quadrature nodes> are equally spaced. Integrating the <Lagrange interpolation polynomial> gives <quadrature weights> $W_j=\int_a^b\ell_j(x)\,dx$. A <Newton-Cotes closed quadrature> includes both endpoints; an open rule uses interior <quadrature nodes>. <Simpson's rule> is the closed rule with three <quadrature nodes>. Its <quadrature weights> are $(b-a)(1,4,1)/6$.