A quadrature rule replaces an integral with a weighted sum of finitely many function values. Newton–Cotes rules choose equally spaced nodes, interpolate, and integrate the polynomial. The nodes determine the weights; smoothness determines whether the error theorem applies.

Lecture note Sections 5.1–5.5 and 5.7 are the primary source. Write the exact integral as II, the approximation as Q(f)Q(f), and the signed error as exact minus approximate:

I=∫abf(x) dx,E(f)=I−Q(f).I=\int_a^b f(x)\,dx,\qquad E(f)=I-Q(f).

The interpolant uses the lecture note’s lowercase pnp_n. For general open rules we add the explicit indexing convention x0=a+hx_0=a+h, followed by equally spaced interior nodes. The workbook supplements the open two-point and Milne error derivations; their signs and constants are proved independently below [1][1] S. Rojas, “Lecture Notes on Computational Mathematics,” 2025. Course lecture note distributed with MTH2051; local source course-lecture-notes.pdf., [2][2] M. U. School of Mathematics, “MTH2051: Introduction to Computational Mathematics: Course Lecture Notes and Study Workbooks,” 2026. Monash University course materials and study workbooks, Semester 2, 2026., [3][3] R. L. Burden and J. D. Faires, Numerical Analysis, 9th ed. Brooks/Cole, Cengage Learning, 2011..

Interpolatory quadrature and degree of precision

DefinitionInterpolatory quadrature

For distinct nodes x0,…,xnx_0,\ldots,x_n, form the Lagrange interpolant pnp_n and define

Q(f)=∫abpn(x) dx=∑i=0nwif(xi),wi=∫abℓi(x) dx.Q(f)=\int_a^b p_n(x)\,dx =\sum_{i=0}^n w_i f(x_i),\qquad w_i=\int_a^b\ell_i(x)\,dx.
DefinitionDegree of precision

A rule has degree of precision mm if it is exact for every polynomial of degree at most mm and fails for at least one polynomial of degree m+1m+1.

PropositionInterpolatory exactness

The rule above is exact for every polynomial of degree at most nn.

Proof

Such a polynomial is its own unique interpolant. Equivalently, exactness through degree mm is the moment condition

∑iwixik=bk+1−ak+1k+1,0≤k≤m.\sum_iw_ix_i^k=\frac{b^{k+1}-a^{k+1}}{k+1},\qquad 0\leq k\leq m.

Necessity follows by taking monomials; sufficiency follows by linearity for their linear combinations.

A closed rule includes endpoints: xi=a+ihx_i=a+ih, with h=(b−a)/nh=(b-a)/n and n≥1n\geq1. An open rule excludes them: xi=a+(i+1)hx_i=a+(i+1)h, with h=(b−a)/(n+2)h=(b-a)/(n+2) and n≥0n\geq0. In both constructions, nn is the interpolation degree and there are n+1n+1 nodes. The open spacing must not be confused with the closed spacing.

Deriving the common rules

Let L=b−aL=b-a and m=(a+b)/2m=(a+b)/2. Integrating the basis polynomials gives trapezoidal and midpoint rules:

T(f)=L2[f(a)+f(b)],M(f)=Lf(m).T(f)=\frac L2[f(a)+f(b)],\qquad M(f)=Lf(m).

The three-point closed rule is Simpson’s rule:

S(f)=L6[f(a)+4f(m)+f(b)].S(f)=\frac L6[f(a)+4f(m)+f(b)].

The open two-point rule uses the interior trisection points:

O2(f)=L2[f ⁣(a+L3)+f ⁣(a+2L3)].O_2(f)=\frac L2\left[f\!\left(a+\frac L3\right)+f\!\left(a+\frac{2L}3\right)\right].

Milne’s rule uses three interior quarter points:

O3(f)=L3[2f ⁣(a+L4)−f(m)+2f ⁣(a+3L4)].O_3(f)=\frac L3\left[2f\!\left(a+\frac L4\right)-f(m)+2f\!\left(a+\frac{3L}4\right)\right].
ProofWeights and symmetry

Use coordinates centred at mm. The two linear basis integrals in the trapezoidal and open two-point rules are equal and sum to LL, so each weight is L/2L/2. The midpoint rule integrates a constant basis, with weight LL.

For Simpson’s nodes −L/2,0,L/2-L/2,0,L/2, the endpoint quadratic basis integrals are L/6L/6 and the middle integral is 2L/32L/3. For Milne’s nodes −L/4,0,L/4-L/4,0,L/4, an outer basis is s(s+L/4)/(2(L/4)2)s(s+L/4)/(2(L/4)^2), integrating to 2L/32L/3. The middle basis 1−s2/(L/4)21-s^2/(L/4)^2 integrates to −L/3-L/3.

These quadratic interpolatory rules already integrate quadratics exactly. Symmetric nodes and weights also integrate every centred odd function to zero, including a centred cubic. Consequently Simpson and Milne integrate every cubic exactly.

Endpoint line and three-node quadratic quadrature

Endpoint line and three-node quadratic quadrature

Proving errors with an integrable remainder

A pointwise interpolation remainder involves f(r)(ξx)f^{(r)}(\xi_x). The unknown location changes with xx and need not vary continuously, so it cannot simply be taken outside the integral. An integral Taylor remainder avoids that difficulty.

TheoremPeano kernel representation

Let f∈Cr[a,b]f\in C^r[a,b] and suppose the linear error functional EE annihilates polynomials of degree below rr. Then

E(f)=∫abf(r)(t)Kr(t) dt,E(f)=\int_a^b f^{(r)}(t)K_r(t)\,dt,Kr(t)=(b−t)rr!−∑iwi(xi−t)+r−1(r−1)!,u+=max⁡(u,0).K_r(t)=\frac{(b-t)^r}{r!} -\sum_iw_i\frac{(x_i-t)_+^{r-1}}{(r-1)!}, \qquad u_+=\max(u,0).
Proof

Repeated integration of the fundamental theorem of calculus gives

f(x)=∑k=0r−1f(k)(a)k!(x−a)k+∫abf(r)(t)(x−t)+r−1(r−1)! dt.f(x)=\sum_{k=0}^{r-1}\frac{f^{(k)}(a)}{k!}(x-a)^k +\int_a^b f^{(r)}(t)\frac{(x-t)_+^{r-1}}{(r-1)!}\,dt.

Apply EE. Its polynomial part vanishes. Interchange the integrals over the compact triangle a≤t≤x≤ba\leq t\leq x\leq b and move the finite weighted sum inside the integral. The resulting factor is precisely KrK_r.

LemmaA kernel with one sign gives one remainder location

If KrK_r has a fixed sign and a nonzero integral, there is ξ∈[a,b]\xi\in[a,b] such that

E(f)=f(r)(ξ)∫abKr(t) dt.E(f)=f^{(r)}(\xi)\int_a^bK_r(t)\,dt.
Proof

Bound the continuous derivative between its minimum and maximum, multiply by ∣Kr∣|K_r|, and integrate. Division by the positive integral of ∣Kr∣|K_r| puts the weighted average between those extrema. The intermediate value theorem supplies ξ\xi. Restore the sign if the kernel is negative. No continuity of an unknown remainder location is assumed.

For checking constants, scale each rule to the following reference interval. For symmetric rules and even remainder order, reflection about the midpoint makes the kernel symmetric, so a left-half expression suffices.

Rule and intervalKernel on the left halfIntegral over the whole interval
Trapezoidal, [0,1][0,1], r=2r=2t(t−1)/2t(t-1)/2 on the whole interval−1/12-1/12
Midpoint, [0,1][0,1], r=2r=2t2/2t^2/2 for 0≤t≤1/20\leq t\leq1/21/241/24
Open two-point, [0,3][0,3], r=2r=2t2/2t^2/2; subtract 3(t−1)/23(t-1)/2 on [1,3/2][1,3/2]3/43/4
Simpson, [0,2][0,2], r=4r=4t3(3t−4)/72t^3(3t-4)/72 on [0,1][0,1]−1/90-1/90
Milne, [0,4][0,4], r=4r=4t4/24t^4/24; subtract 4(t−1)3/94(t-1)^3/9 on [1,2][1,2]14/4514/45

Substitution into the kernel theorem gives these expressions; replacing xx by a+b−xa+b-x verifies reflection symmetry. Trapezoidal and Simpson kernels are nonpositive, and the midpoint kernel is nonnegative. The open two-point kernel on [1,3/2][1,3/2] is (t2−3t+3)/2>0(t^2-3t+3)/2>0. For Milne, t4/(t−1)3t^4/(t-1)^3 decreases on (1,2](1,2] to 16>32/316>32/3, proving positivity there. Integrating the piecewise polynomials proves the constants rather than inferring them from examples.

TheoremSigned errors of five rules

Let L=b−aL=b-a. Require f∈C2f\in C^2 for the first three rules and f∈C4f\in C^4 for the last two. Each row has its own remainder location ξ\xi.

RuleDegree of precisionI−Q(f)I-Q(f)
Trapezoidal1−L3f′′(ξ)/12-L^3f''(\xi)/12
Midpoint1L3f′′(ξ)/24L^3f''(\xi)/24
Open two-point1L3f′′(ξ)/36L^3f''(\xi)/36
Simpson3−L5f(4)(ξ)/2880-L^5f^{(4)}(\xi)/2880
Milne37L5f(4)(ξ)/230407L^5f^{(4)}(\xi)/23040
Proof

Use the kernel representation and the fixed-sign lemma. Affine scaling multiplies a second-order kernel integral by the cube of the scale and a fourth-order kernel integral by its fifth power. This gives all listed constants. A centred quadratic or quartic has a nonzero constant derivative and therefore a nonzero error. Combined with the established exactness, the degrees are exactly one or three.

On [0,1][0,1], the open two-point error on x2x^2 is 1/181/18, and Milne’s error on x4x^4 is 7/9607/960. These verify both signs and constants. Different rules generally have different ξ\xi values: a factor of two between constants does not imply that every pair of actual errors has that ratio.

The closed hierarchy: three-eighths and Boole

Week 7 also lists two higher-degree closed rules. Here nn remains the interpolation degree, h=L/nh=L/n, and fi=f(a+ih)f_i=f(a+ih):

S3/8(f)=3h8(f0+3f1+3f2+f3),n=3,S_{3/8}(f)=\frac{3h}{8}(f_0+3f_1+3f_2+f_3),\qquad n=3, B(f)=2h45(7f0+32f1+12f2+32f3+7f4),n=4.B(f)=\frac{2h}{45}(7f_0+32f_1+12f_2+32f_3+7f_4),\qquad n=4.

Integrating the corresponding Lagrange bases gives these weights. Substitution into the moment equations verifies exactness through degree three and five respectively. A symmetric closed rule with even interpolation degree nn gains at least one extra degree: interpolation covers through nn, and the next centred monomial is odd, hence integrates and sums to zero. Odd nn has no such automatic extra guarantee.

TheoremThree-eighths and Boole errors

Require f∈C4f\in C^4 for three-eighths and f∈C6f\in C^6 for Boole. There are respective remainder locations with

I−S3/8(f)=−3h580f(4)(ξ)=−L56480f(4)(ξ),I-S_{3/8}(f)=-\frac{3h^5}{80}f^{(4)}(\xi) =-\frac{L^5}{6480}f^{(4)}(\xi),I−B(f)=−8h7945f(6)(η)=−L71935360f(6)(η).I-B(f)=-\frac{8h^7}{945}f^{(6)}(\eta) =-\frac{L^7}{1935360}f^{(6)}(\eta).

Their degrees of precision are exactly three and five.

Proof

Use the proved Peano representation. On the reference interval [0,3][0,3], the three-eighths fourth-order kernel on the left half is

K4(t)=t3(2t−3)48−316(t−1)+3,0≤t≤32.K_4(t)=\frac{t^3(2t-3)}{48}-\frac3{16}(t-1)_+^3, \qquad0\leq t\leq\frac32.

Both terms are nonpositive; reflection covers the full interval. Piecewise integration gives ∫K4=−3/80\int K_4=-3/80.

For Boole on [0,4][0,4], the sixth-order kernel on the left half is

K6(t)=t5(15t−28)−128(t−1)+510800,0≤t≤2.K_6(t)=\frac{t^5(15t-28)-128(t-1)_+^5}{10800}, \qquad0\leq t\leq2.

It is nonpositive for t≤28/15t\leq28/15. On the remaining range use F(t)=t5(15t−28)/(t−1)5F(t)=t^5(15t-28)/(t-1)^5, whose derivative is

F′(t)=5t4[3(t−3)2+1](t−1)6>0.F'(t)=\frac{5t^4[3(t-3)^2+1]}{(t-1)^6}>0.

Thus F(t)≤F(2)=64<128F(t)\leq F(2)=64<128, proving the kernel is still nonpositive. Reflect and integrate to get ∫K6=−8/945\int K_6=-8/945. The fixed-sign lemma and scaling give the error formulas. Nonzero errors on quartic and sextic monomials, together with moment exactness, establish the exact degrees of precision.

Both rules are also available in the experiment. Higher-degree rules require higher regularity; extra nodes alone do not certify greater accuracy.

Experiment: what curve is integrated?

This interactive figure needs JavaScript.

Switch rules to compare their nodes, weights, and green interpolants. Milne’s negative weight is intentional. The square-root example can be evaluated by midpoint and open rules, but its endpoint derivatives do not satisfy the standard error hypotheses.

PropositionAmplification of sample perturbations

If each sampled value has perturbation at most δ\delta in magnitude, the quadrature perturbation is at most δ∑i∣wi∣\delta\sum_i|w_i|. This worst-case bound is attainable.

Proof

Apply the triangle inequality to the weighted perturbations. Choosing perturbation δsign⁡(wi)\delta\operatorname{sign}(w_i) at node ii makes all contributions have the same sign and reaches the bound.

Positive weights give ∑∣wi∣=L\sum|w_i|=L, whereas Milne gives 5L/35L/3. Increasing the degree of equally spaced interpolation is not automatically more reliable. A common alternative is to retain a low-degree rule and use composite quadrature on smaller panels.

References

  1. [1] S. Rojas, “Lecture Notes on Computational Mathematics,” 2025. Course lecture note distributed with MTH2051; local source course-lecture-notes.pdf. ↩
  2. [2] M. U. School of Mathematics, “MTH2051: Introduction to Computational Mathematics: Course Lecture Notes and Study Workbooks,” 2026. Monash University course materials and study workbooks, Semester 2, 2026. ↩
  3. [3] R. L. Burden and J. D. Faires, Numerical Analysis, 9th ed. Brooks/Cole, Cengage Learning, 2011. ↩