You are on page 1of 8

NUMERICAL DIFFERENTIATION AND INTEGRATION

Differentiation and integration are basic mathematical operations with


a wide range of applications in many areas of science. It is therefore
important to have good methods to compute and manipulate
derivatives and integrals.

General strategy for deriving both numerical integration and


numerical differentiation methods.

The basic idea is to evaluate a function at a few points, find the


polynomial that interpolates the function at these points, and use the
derivative or integral of the polynomial as an approximation to the
function. This technique also allows us to keep track of the so-called
truncation error, the mathematical error committed by integrating or
differentiating the polynomial instead of the function itself. However,
when it comes to round-off error, we have to treat differentiation and
integration differently: Numerical integration is very insensitive to
round-off errors, while numerical differentiation behaves in the
opposite way; it is very sensitive to round-off errors.

Problem 11.1 (Numerical differentiation). Let f be a given function


that is only known at a number of isolated points. The problem of
numerical differentiation is to compute an approximation to the
derivative f'1 of f by suitable combinations of the known values of f.
Explanation
Algorithm:
To derive and analyse a numerical differentiation method, the
following steps are necessary:

1. Derive the method using polynomial interpolation.


2. Estimate the truncation error using Taylor series with remainders.
3. Estimate the total error (truncation error + round-off error) by
assuming all function evaluations are replaced by the nearest floating-
point numbers.
4. Estimate the optimal value of h.
Definition of Integration Procedure:
The following is a general procedure for deriving numerical
methods for differentiation and integration:

1. Interpolate the function f by a polynomial p at suitable points.


2. Approximate the derivative or integral of f by the derivative or
integral of p. This makes it possible to express the approximation in
terms of function values of f .
3. Derive an estimate for the error by expanding the function values
(other than the one at a) in Taylor series with remainders.
4D. For numerical differentiation, derive an estimate of the round-off
error by assuming that the relative errors in the function values are
bounded by epsilon. By minimising the total error, an optimal step
length h can be determined.
4I. For numerical integration, the global error can easily be derived
from the local error.

Simpsons Rule 1/3rd and 3/8th


In numerical analysis, Simpson's rule is a method for numerical
integration, the numerical approximation of definite integrals.
Specifically, it is the following approximation (1/3rd )

Simpson's rule also corresponds to the three-point Newton-Cotes


quadrature rule.
The method is credited to the mathematician Thomas Simpson (1710
1761) of Leicestershire, England. Kepler used similar formulas over
100 years earlier. For this reason the method is sometimes called
Kepler's rule, orKeplersche Fassregel in German.
Simpson's 3/8 rule
Simpson's 3/8 rule is another method for numerical integration
proposed by Thomas Simpson. It is based upon a cubic interpolation
rather than a quadratic interpolation. Simpson's 3/8 rule is as follows:
where b - a = 3h. The error of this method is:

where is some number between and . Thus, the 3/8 rule is about
twice as accurate as the standard method, but it uses one more
function value. A composite 3/8 rule also exists, similarly as above.[5]
A further generalization of this concept for interpolation with
arbitrary degree polynomials are the NewtonCotes formulas.
Trapezoidal Rule
In numerical analysis, the trapezoidal rule (also known as
the trapezoid rule or trapezium rule) is a technique for
approximating the definite integral

The trapezoidal rule works by approximating the region under the


graph of the function as a trapezoid and calculating its area. It
follows that

Gauss Quadrature Method 2 point and 3 point


Refer the notes on Gaussian Quadrature
Double Integration
Simpsons Rule and Trapezoidal Rule
The trapezoidal rule and Simpson's rule for ordinary integrals can be
extended to multiple integrals.
Theorem (Trapezoidal 2D Rule) Consider over the
rectangle . Given that the
interval is subdivided into subintervals of
equal width by using the equally spaced sample
points for . Also, assume that the
interval is subdivided into subintervals of

equal width by using the equally spaced sample


points for .
The composite Trapezoidal rule is

where

It can be shown that the error term is of the


form , that is

Remark. The Trapezoidal rule had the pattern of


weights and the Trapezoidal 2D
rule extends this pattern to a grid in the rectangle R.

Theorem (Simpson's 2D Rule) Consider over the


rectangle . Given that the
interval is subdivided
into subintervals of equal

width by using the equally spaced sample


points for . Also, assume that the
interval is subdivided

into subintervals of equal

width by using the equally spaced sample


points for .
The composite Simpson's rule is

where
It can be shown that the error term is of the
form , that is

Remark. Simpson's rule had the pattern of


weights and Simpson's 2D rule
extends this pattern to a grid in the rectangle R.

Example 1.Use the composite Simpson's rule for multiple integrals to


numerically approximate the iterated integral .
Remark. This is the volume of the solid bounded by the
surface , that lies above the
square in the xy-
plane.

Example 2. Find the analytic solution to the iterated

integral .

Example 3. How good are the Trapezoidal rule approximations

to that were calculated in Example 1?

Example 4. Use the composite Simpson's rule for multiple integrals


to numerically approximate the iterated

integral .
Remark. This is the volume of the solid bounded by the
surface , that lies above the
square in the xy-
plane.

Example 5. How good are the Simpson's rule approximations

to that were calculated in Example 4?

Example 6. Compare the 2D Trapezoidal and 2D Simpson rule

approximations to that were calculated


in Examples 1 and 4?

********************************************************
Numerical Integration of Ordinary Differential Equations
Euler Method
Taylors Method
Runge Kutta Method

You might also like