Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Numerical Integration

 Numerical integration is the method to calculate the approximate value of the integral
by using numerical techniques

 Numerical integration is sometimes referred to as quadrature which means


construction of a square having the same area as some curvilinear figure.

Newton-Cotes Formulas

1. Trapezoidal Rule

 the trapezoidal rule is equivalent to approximating the area of the trapezoid under the
straight line connecting f(a) and f(b)

The Composite Trapezoidal Rule

 One way to improve the accuracy of the trapezoidal rule is to divide the integration
interval from a to b into a number of segments and apply the method to each segment;
and the areas of individual segments can then be added to yield the integral for the
entire interval
Substituting the trapezoidal rule for each integral

or, grouping terms:

Error Analysis:

Where: f ″(ξi) is the second derivative at a point ξi located in segment i

Simplifying by estimating the mean or average value of the second derivative for the
entire interval as

Approximation error:
Example 1: Find the approximate integral of the curve and the x – axis on the interval
[1,4] using composite trapezoidal rule for n = 4.

Example 2: Evaluate the following integral:

(a) analytically, (b) single application of the trapezoidal rule,


(c) composite trapezoidal rule with n = 2 and 4,

2. Simpson’s Rule – uses the concept of Trapezoidal Rule in the refinement of the approximation
of the area of the curve y = f(x)
a. Simpson’s 1∕3 Rule – an extension of trapezoidal rule where the integrand is
approximated by a second order polynomial.

Consider :

Using second order polynomial (utilizing three points):

where a and b are designated as x0 and x2.


Integrating:

where, for this case, h = (b − a)∕2

the equation can also be expressed in the form:

where a = x0, b = x2, and x1 = the point midway between a and b, which is given
by (a + b)∕2
Truncation Error:

b. Composite Simpson’s 1∕3 Rule - dividing the integration interval into a number of
segments of equal width
- the method can be employed only if the number of segments is even.

Substituting Simpson’s 1∕3 rule for each integral yields

Error Estimate:

where f (4) is the average fourth derivative for the interval


c. Simpson’s 3∕8 Rule – uses third order Lagrange polynomial to fit to four points

Integration will yield:

where h = (b − a)∕3

The equation can also be expressed in the form:

Thus, the two interior points are given weights of three-eighths, whereas the
end points are weighted with one-eighth

Truncation Error:

 Simpson’s 1∕3 rule is usually the method of preference because it attains third-order
accuracy with three points rather than the four points required for the 3∕8 version.

 However, the 3∕8 rule has utility when the number of segments is odd.

 One option would be to use a composite version of the trapezoidal rule.

 An alternative would be to apply Simpson’s 1∕3 rule to the first two segments and Simpson’s
3∕8 rule to the remaining segments.
Example 1: Evaluate the integral numerically and then by a.) single application of
Simpson’s 1∕3 rule, b.) composite Simpson’s 1∕3 rule with n = 4, c.) Simpson’s 3∕8 rule, and d.) composite
Simpson’s rule, with n = 5. For each of the numerical estimates (a) through (d), determine the true
percent relative error based on analytical value.

Example 2: Evaluate the following integral using the methods in example 1 :

You might also like