A Newton-Cotes quadrature integrates a Lagrange interpolation polynomial at equally spaced quadrature nodes. For the Newton-Cotes closed quadrature, the endpoints are included: write , , and use
These quadrature weights depend on the quadrature nodes, not on the sampled function. Open Newton-Cotes quadrature uses equally spaced interior quadrature nodes instead.
For Simpson's rule, use and set , so . The Lagrange cardinal polynomials become
Integrating these quadratic polynomials gives , , , respectively. The change of variable contributes , so
Its degree of precision of a quadrature rule is three: it integrates every quadratic polynomial by construction, and also the cubic nodal polynomial , whose integral vanishes by odd symmetry about . Any cubic polynomial differs from its quadratic polynomial interpolant by a constant multiple of this nodal polynomial.
The product rule applied at the interpolation node gives
Thus Lagrange interpolation gives, away from the interpolation nodes,
Apply the same Lagrange interpolation formula to the constant polynomial one. Since its interpolant is itself,
Dividing the preceding two identities proves the barycentric interpolation formula
The denominator is exactly , so is nonzero away from the interpolation nodes. At , multiply numerator and denominator by and take the limit: their values tend to and , respectively. The removable singularity therefore has value ; in numerical evaluation return the stored value directly at an interpolation node.
For each interpolation node define the Lagrange cardinal polynomial
All denominators are nonzero because the interpolation nodes are distinct. Each polynomial has polynomial degree at most , and , where is the Kronecker delta. Consequently the linear combination
belongs to the vector space of univariate polynomials and has the required values. This proves existence of the Lagrange interpolation polynomial.
For uniqueness, suppose and both work. Their difference is a polynomial of polynomial degree at most with distinct roots of a polynomial. The root bound for a polynomial forces to be the zero polynomial.
The seven supplied values follow . The quadratic polynomial belongs to and takes all seven values, so uniqueness gives
The subscript bounds the polynomial degree; it does not require polynomial degree exactly six.
Since , the QR factorization gives
First compute by a matrix-vector product, costing scalar multiplications and additions for dense . Then solve the upper triangular matrix system by back substitution:
Every denominator is nonzero because is invertible. The back substitution costs multiplications and subtractions together, plus divisions, for arithmetic operations. Including , the total is arithmetic operations under this scalar counting convention, hence , with denoting Big O notation. The already supplied QR factorization is reused; no matrix inverse needs to be computed.
A real square matrix is an orthogonal matrix when , equivalently its columns form an orthonormal basis. Here is the transpose and the identity matrix. For every vector ,
Taking nonnegative square roots proves
Thus an orthogonal matrix preserves the Euclidean norm.
Assume and set , a monic polynomial of polynomial degree . Fix distinct from all the interpolation nodes, and choose
The auxiliary function
vanishes at the distinct points . Order those points and repeatedly apply Rolle's theorem. After applications, there is some strictly between their smallest and largest values, hence in , such that .
Because has polynomial degree at most and is monic of polynomial degree ,
Substituting the resulting value of proves the polynomial interpolation error formula
At an interpolation node, both sides are zero, so any works. Such an interior point exists because and the interpolation nodes are distinct. The selected generally depends on ; the theorem makes an existence assertion, not a regularity assertion about that dependence.
The polynomial interpolates at the interpolation nodes when
For distinct interpolation nodes, define the Lagrange cardinal polynomials
The denominators are nonzero, each polynomial degree is at most , and , with the Kronecker delta. Therefore
is a Lagrange interpolation polynomial belonging to the vector space of univariate polynomials , and it has all the required sampled values.
If also works, has distinct roots of a polynomial while its polynomial degree is at most . The root bound for a polynomial forces it to be the zero polynomial, proving uniqueness. The phrase “degree ” denotes the allowed maximum; the actual polynomial degree may be smaller. No continuity assumption is needed merely to construct the interpolation polynomial from these finitely many values.
Write for the supplied approximation. The asymptotic expansion is
where is Big O notation. At the refined parameter ,
Multiply this identity by nine and subtract the first one. The unknown leading truncation error coefficient cancels:
Thus the Richardson extrapolation estimate is
The two supplied values give
The correction to the finer approximation is . Neglecting the higher-order remainder would also give .
The conclusion is asymptotic: the leading error order improves from two to at least three when both parameter values are in the range of the stated asymptotic expansion. With no bound on the remainder constant, the two finite observations alone do not guarantee that is closer to . Indeed, for any proposed value , the polynomial model
satisfies , and the required asymptotic expansion with true limit . This is why finite observations do not certify Richardson extrapolation accuracy: asymptotic cancellation provides an improved-order estimator, while a numerical error certificate needs quantitative remainder information.

Pinned article: Introduction to the OurBigBook Project

Welcome to the OurBigBook Project! Our goal is to create the perfect publishing platform for STEM subjects, and get university-level students to write the best free STEM tutorials ever.
Everyone is welcome to create an account and play with the site: ourbigbook.com/go/register. We belive that students themselves can write amazing tutorials, but teachers are welcome too. You can write about anything you want, it doesn't have to be STEM or even educational. Silly test content is very welcome and you won't be penalized in any way. Just keep it legal!
We have two killer features:
  1. topics: topics group articles by different users with the same title, e.g. here is the topic for the "Fundamental Theorem of Calculus" ourbigbook.com/go/topic/fundamental-theorem-of-calculus
    Articles of different users are sorted by upvote within each article page. This feature is a bit like:
    • a Wikipedia where each user can have their own version of each article
    • a Q&A website like Stack Overflow, where multiple people can give their views on a given topic, and the best ones are sorted by upvote. Except you don't need to wait for someone to ask first, and any topic goes, no matter how narrow or broad
    This feature makes it possible for readers to find better explanations of any topic created by other writers. And it allows writers to create an explanation in a place that readers might actually find it.
    Figure 1.
    Screenshot of the "Derivative" topic page
    . View it live at: ourbigbook.com/go/topic/derivative
  2. local editing: you can store all your personal knowledge base content locally in a plaintext markup format that can be edited locally and published either:
    This way you can be sure that even if OurBigBook.com were to go down one day (which we have no plans to do as it is quite cheap to host!), your content will still be perfectly readable as a static site.
    Figure 5. . You can also edit articles on the Web editor without installing anything locally.
    Video 3.
    Edit locally and publish demo
    . Source. This shows editing OurBigBook Markup and publishing it using the Visual Studio Code extension.
  3. https://raw.githubusercontent.com/ourbigbook/ourbigbook-media/master/feature/x/hilbert-space-arrow.png
  4. Infinitely deep tables of contents:
    Figure 6.
    Dynamic article tree with infinitely deep table of contents
    .
    Descendant pages can also show up as toplevel e.g.: ourbigbook.com/cirosantilli/chordate-subclade
All our software is open source and hosted at: github.com/ourbigbook/ourbigbook
Further documentation can be found at: docs.ourbigbook.com
Feel free to reach our to us for any help or suggestions: docs.ourbigbook.com/#contact