Numerical Integra/on
Applica/ons
The Trapezoidal Rule is a technique to approximate the definite integral where For 1 st order: f(a) f(b) a b
Error Es/mate of Trapezoidal Rule Truncation error: From Newton-Gregory formula (interpolation with equally spaced data) where h = step size between data points
Error Es/mate of Trapezoidal Rule take the first order with error term and integrate Since the limits of integration: Then
Error Es/mate of Trapezoidal Rule For small h, it is assumed that the term approximately constant, then is
Mul/ple- Applica/on Trapezoidal Rule Improving the accuracy of the trapezoidal rule is by dividing the integration interval from a to b into a number of segments and apply the method to each segment. Dividing the interval into equally spaced base points (x 0, x 1, x 2,, x n ), gives n segments of equal width h, where: The total integral: Substituting the trapezoidal rule for each interval yields:
Mul/ple- Applica/on Trapezoidal Rule Or in general form and the error is second derivative at point located at segment i
Simpson s 1/3 Rule uses second-order interpolating polynomial to approximate definite integrals where f 2 (x) is represented by a second-order Lagrange polynomial, hence a is designated as x 0 and b as x 2.
Or in compact form Simpson s 1/3 Rule and the truncation error where
Mul/ple- Applica/on Simpson s 1/3 Rule Simpson s 1/3 rule can be improved by dividing the integration interval into a number of segments of equal width: The total integral can be represented as: and the error: is as in previous slide
Simpson s 3/8 Rule uses a third-order Lagrange interpolating polynomial to approximate definite integrals, the total integral is expressed as and the error is as in previous slide
Example Consider the function over the fixed interval Apply the various quadrature formulas to approximate integral of the function. From substitution of the integral limits into f (x): For the trapezoidal rule,
For Simpson s 1/3 rule, Example For Simpson s 3/8 rule, For multiple application formulas, divide the integral limits into equally spaced points, such as, if n = 5, then
Example If we chose, then and the equally spaced points and their corresponding function values are For the multiple-application trapezoidal rule:
Example For the multiple-application Simpson s 1/3 rule:
Example To compute error estimate for the trapezoidal rule, the function s second derivative over the interval can be computed by differentiating the original functions twice to give: The average value of the second derivative: Use integration by parts to evaluate (see Improper Integrals)
Integra/on with Unequal Segments By applying the trapezoidal rule to each segment, the total integral for problems with unequal step sizes or segments is given by: where h i is the width of segment i.
Example Estimate the integral of spaced points with unequally and The exact value of the integration is 3.3333. The function values at each point are
Example Using the formula for integration with unequal segments: which represent an absolute relative error of
Romberg Integra/on This method uses Richardson extrapolation to approximate the definite integral Starting with the multiple application trapezoidal rule For estimates with halving the step size:
Romberg Integra/on To improve the estimates with higher accuracy, if the step size h is further halved
Example Use Romberg integration based on Richardson extrapolation to estimate the integral of with integration limits from a = 0 to b = 0.8. (The exact value of the integral is For integration limits a = 0 and b = 0.8, the segment h is 0.8: Halving the segment, now we have:
Example The total integral: Relative error:
Adap/ve Quadrature is used for unequally spaced points: where
And the error Adap/ve Quadrature
is given by Gauss Quadrature The truncation error The weights a i are given by where the abscissas x i are the n zeros of the Legendre polynomial P n
Gauss Quadrature Legendre polynomials P n (x) is given by
Improper Integrals Given an improper integral or an integral with a nonregular integrand, such as with unbounded derivatives. Before using some numerical method (e.g., Simpson s formula), the integral may be transformed by substitution, integration by parts or series expansion, etc. Example: the substitution x = t 2 transforms the integrals to the regular forms