Numerical Integration

Introduction

Newton-Cotes formulas are numerical integration schemes that simplify a complicated function/data into a approximating function:

where a polynomial with the form

where is the polynomial’s order.

We can use a piecewise function and straight lines to approximate the integral of a polynomial using a method known as the strip method. Besides this, we can two possible forms of Newton-Cotes formulas: closed and open. The closed forms knows the data points at the beginning and end of the limits of integration, whereas open forms have integration limits that extend beyond the data’s range.

Trapezoidal Rule

The trapezoidal rule is applicable in cases where the polynomial is in the first order. When given a first order polynomial like

we can use the trapezoidal rule and approximate the resulting integration

It is based on the geometrical approximation of the area of a trapezoid, which is formed by connecting the two points— and —with a straight line. Hence, it can also be represented as

All Newton-Cotes closed formulas follow this format but only differ with how the average height is formulated.

Error

To estimate the local truncation error of a single application of the trapezoidal rule, we use

where lies somewhere in the interval from to . The trapezoidal rule will be exact when the function being integrated is linear—error occurs when we have higher-order derivatives.

Multiple Application

TODO

Error

TODO

Simpson’s Rule

Simpson’s rules use higher-order polynomials to estimate an integral.

Simpson’s 1/3 Rule

The Simpson’s rule is

where

The is what gives it the 1/3 in its name. It can also be expressed in the format

The Simpson’s 1/3 rule has a error estimate of

or

where lies somewhere in the interval from to .

This rule is more accurate than the trapezoidal rule and its error is proportional to the fourth derivative. Although it is based on only three points, it is third-order accurate; thus, it yields exact results for cubic polynomials even though it is derived from a parabola.

Multiple-Application

TODO

Simpson’s 3/8 Rule

This rule can be fit to four points and integrated to get

where .

The is what gives it the 3/8 in its name. It can also be expressed in the format

It has an error estimate of

In addition, it is more accurate than the 1/3 rule.

This rule is preferred over the 1/3 one whenever the number of segments is odd.

Sources

  1. Numerical Methods for Engineers by Steven Chapra and Raymond Canale (Chapter 21)