Deriving the first and second order Newton-Cotes formulas

Click For Summary
SUMMARY

The discussion focuses on deriving the first and second order Newton-Cotes formulas, which are numerical integration techniques that fit cubic and quartic curves, respectively, across discrete points. The first order formula approximates integrals using the trapezoidal method, while the second order formula, also known as Boole's rule, enhances accuracy by fitting quartic curves. Key equations and systems of equations are presented to derive these formulas, demonstrating their application in approximating definite integrals over specified intervals.

PREREQUISITES
  • Understanding of definite integrals and the Fundamental Theorem of Calculus (FTOC)
  • Familiarity with polynomial functions and their properties
  • Knowledge of numerical integration techniques, specifically Simpson's Rule
  • Basic algebra skills for manipulating equations and systems of equations
NEXT STEPS
  • Study the derivation of Simpson's Rule in detail
  • Learn about higher-order Newton-Cotes formulas and their applications
  • Explore numerical methods for solving integrals in computational software like MATLAB or Python
  • Investigate error analysis in numerical integration techniques
USEFUL FOR

Mathematicians, engineers, and computer scientists involved in numerical analysis, particularly those focused on numerical integration methods and their applications in various fields.

MarkFL
Gold Member
MHB
Messages
13,284
Reaction score
12

Overview​


Much like Simpson's Rule (also known as the prismoidal method) improves upon the trapezoidal rule by fitting parabolic arcs across discrete points of a function ##f(x)## rather than line segments, Newton–Cotes formulas of order 1 and 2 fit cubic and quartic polynomials, respectively, across points on the curve.

Newton–Cotes Formula: Order 1

We begin by computing the definite integral

$$
\int_{-h}^h Ax^3+Bx^2+Cx+D\,dx
$$

Applying the Fundamental Theorem of Calculus, we obtain

$$
\int_{-h}^h Ax^3+Bx^2+Cx+D\,dx
=
\left[\frac{Ax^4}{4}+\frac{Bx^3}{3}+\frac{Cx^2}{2}+Dx \right]_{-h}^h
$$

$$
=
\left(\frac{Ah^4}{4}+\frac{Bh^3}{3}+\frac{Ch^2}{2}+Dh\right)
-
\left(\frac{A(-h)^4}{4}+\frac{B(-h)^3}{3}+\frac{C(-h)^2}{2}+D(-h)\right)
$$

$$
=
\frac{2Bh^3}{3}+2Dh
=
\frac{2h}{3}\left(Bh^2+3D \right)
$$

We require that the cubic interpolant pass through the points

$$
\left(-h,y_0 \right),\,
\left(-\frac{h}{3},y_1 \right),\,
\left(\frac{h}{3},y_2 \right),\,
\left(h,y_3 \right)
$$

This yields the system

$$
y_0=-Ah^3+Bh^2-Ch+D
$$

$$
y_1=-\frac{Ah^3}{27}+\frac{Bh^2}{9}-\frac{Ch}{3}+D
$$

$$
y_2=\frac{Ah^3}{27}+\frac{Bh^2}{9}+\frac{Ch}{3}+D
$$

$$
y_3=Ah^3+Bh^2+Ch+D
$$

From these equations we find

$$
y_0-y_1-y_2+y_3=\frac{16}{9}Bh^2
$$

$$
Bh^2=\frac{9}{16}\left(y_0-y_1-y_2+y_3 \right)
$$

and

$$
-y_0+9y_1+9y_2-y_3=16D
$$

$$
3D=\frac{3}{16}\left(-y_0+9y_1+9y_2-y_3 \right)
$$

Substituting these results gives

$$
\int_{-h}^h Ax^3+Bx^2+Cx+D\,dx
=
\frac{2h}{3}\left(Bh^2+3D \right)
=
\frac{h}{4}\left(y_0+3y_1+3y_2+y_3 \right)
$$

Now suppose the interval ##[a,b]## is partitioned into ##n## subintervals of equal width

$$
\Delta x=x_{k+1}-x_k=\frac{b-a}{n}
$$

where ##n## is a multiple of 3. On each subinterval ##[x_{k-3},x_k]##, with

$$
h=\frac{3\Delta x}{2}
$$

the integral may be approximated by

$$
\int_{x_{k-3}}^{x_k} f(x)\,dx
\approx
\frac{3\Delta x}{8}
\left(
f\left(x_{k-3}\right)
+3f\left(x_{k-2}\right)
+3f\left(x_{k-1}\right)
+f\left(x_k\right)
\right)
$$

Hence,

$$
\int_a^b f(x)\,dx
\approx
\frac{3(b-a)}{8n}
\left(
f\left(x_0\right)
+3f\left(x_1\right)
+3f\left(x_2\right)
+2f\left(x_3\right)
+\cdots
\right.
$$

$$
\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\left.
+2f\left(x_{n-3}\right)
+3f\left(x_{n-2}\right)
+3f\left(x_{n-1}\right)
+f\left(x_n\right)
\right)
$$

This is also known as Simpson's ##3/8## rule.

Newton–Cotes Formula: Order 2

We now proceed similarly to derive the second-order Newton–Cotes formula. First, compute

$$
\int_{-h}^h Ax^4+Bx^3+Cx^2+Dx+E\,dx
=
\frac{2h}{15}\left(3Ah^4+5Ch^2+15E \right)
$$

We require that the quartic interpolant pass through the points

$$
\left(-h,y_0 \right),\,
\left(-\frac{h}{2},y_1 \right),\,
\left(0,y_2 \right),\,
\left(\frac{h}{2},y_3 \right),\,
\left(h,y_4 \right)
$$

This gives the system

$$
y_0=Ah^4-Bh^3+Ch^2-Dh+E
$$

$$
y_1=\frac{Ah^4}{16}-\frac{Bh^3}{8}+\frac{Ch^2}{4}-\frac{Dh}{2}+E
$$

$$
y_2=E
$$

$$
y_3=\frac{Ah^4}{16}+\frac{Bh^3}{8}+\frac{Ch^2}{4}+\frac{Dh}{2}+E
$$

$$
y_4=Ah^4+Bh^3+Ch^2+Dh+E
$$

From these equations we obtain

$$
y_0-4y_1+6y_2-4y_3+y_4=\frac{3Ah^4}{2}
$$

$$
Ah^4=\frac{2}{3}\left(y_0-4y_1+6y_2-4y_3+y_4 \right)
$$

and

$$
-y_0+16y_1-30y_2+16y_3-y_4=6Ch^2
$$

$$
Ch^2=\frac{1}{6}\left(-y_0+16y_1-30y_2+16y_3-y_4 \right)
$$

Substitution yields

$$
\int_{-h}^h Ax^4+Bx^3+Cx^2+Dx+E\,dx
=
\frac{2h}{15}\left(3Ah^4+5Ch^2+15E \right)
=
\frac{h}{45}\left(7y_0+32y_1+12y_2+32y_3+7y_4 \right)
$$

Finally,

$$
\int_a^b f(x)\,dx
\approx
\frac{2(b-a)}{45n}
\left(
7f\left(x_0\right)
+32f\left(x_1\right)
+12f\left(x_2\right)
+32f\left(x_3\right)
+14f\left(x_4\right)
+\cdots
\right.
$$

$$
\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\left.
+14f\left(x_{n-4}\right)
+32f\left(x_{n-3}\right)
+12f\left(x_{n-2}\right)
+32f\left(x_{n-1}\right)
+7f\left(x_n\right)
\right)
$$

This is also known as Boole's rule.
 
Last edited by a moderator:
Physics news on Phys.org

Similar threads

  • · Replies 2 ·
Replies
2
Views
14K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 0 ·
Replies
0
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
1K
Replies
1
Views
14K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 5 ·
Replies
5
Views
1K
  • · Replies 7 ·
Replies
7
Views
4K
  • · Replies 7 ·
Replies
7
Views
3K