You are on page 1of 62

Chapter five

Numerical Differentiation and Integration


Introduction
• The differentiation and integration are losely linked processes which are actually
inversely related.
• For example, if the given function y(t) represents an objects position as a function
of time, its differentiation provides its velocity
• On the other hand, if we are provided with velocity v(t) as a function of time, its
integration denotes its position.
NUMERICAL DIFFERENTIATION
• The method of obtaining the derivatives of a function using a numerical technique
is known as numerical differentiation.
• There are essentially two situations where numerical differentiation is required.
They are:
1. The function values are known but the function is unknown, such functions are
called tabulated function.
2. The function to be differentiated is complicated and, therefore, it is difficult to
differentiate.
• if the derivative at a point near the beginning of a set of values given by a table is
required then we use Newton forward formula,
• if the same is required at a point near the end of the set of given tabular values, then
we use Newton’s backward interpolation formula.
• The central difference formula (Bessel’s and Stirling’s) used to calculate value for
points near the middle of the set of given tabular values.
• If the values of x are not equally spaced, we use Newton’s divided difference
interpolation formula or Lagrange’s interpolation formula to get the required value
of the derivative.
Derivation Using Newton’s Forward Interpolation Formula
Derivatives Using Newton’s Backward Difference Formula
Derivatives Using Stirling’s Formula
• If we want to determine the values of the derivatives of the function
near the middle of the given set of arguments, We may apply any
central difference formula.
• Therefore using Stirling’s formula, we get.
Derivative Using Newton’s Divided Difference Formula
• Newton’s divided difference formula for finding the successive differentiation at
the given value of x. Let us consider a function f(x) of degree n, then

• Differentiate this equation w.r.t. ‘x’ as many times as we require and


put x = xi, we get the required derivatives.
Therefore, we apply Newton’s forward difference formula
Example three
Here, x0 = 50, h = 1. Then, we
have Newton’s forward
difference formula.
Example four Find f′(1.5) from the following table:

Solution, Here we want to find the derivatives of f (x) at x = 1.5,


which is near the end of the arguments.
Therefore, apply Newton’s backward formula.
Example ,
Example,

Solution , Here the arguments are not equally spaced. So we use


Newton’s divide difference formula.
Example, Find f ′(0.6) and f ′′(0.6) from the following table:

Solution, Here, the derivatives are required at the central point


x = 0.6, so we use Stirling’s formula.
NUMERICAL INTEGRATION
• Like numerical differentiation, we need to seek the help of numerical integration
techniques in the following situations:
• 1. Functions do not possess closed from solutions. Example:

• 2. Closed form solutions exist but these solutions are complex and difficult to use
for calculations.
• 3. Data for variables are available in the form of a table, but no mathematical
relationship between them is known as is often the case with experimental data.
GENERAL QUADRATURE FORMULA
• Let y = f (x) be a function, where y takes the values y0, y1, y2, ....... yn for x = x0,
x1, x2, ...... xn.
• We want to find the vaule of

• Let the Interval of integration (a, b) be divided into n equal subintervals of width
h=(b-a)/n
So that x0 = a, x1 = x0 +h, x2 = x0 +2hT,............,xn = x0 +nh =b
TRAPEZOIDAL RULE GENERAL RULE
• Putting n =1 in equation (2) and taking the curve y = f(x) through (x0, y0) and (x0, y0)
• as a polynomial of degree one so that differences of order higher than one vanish
we get
SIMPSON’S ONE-THIRD RULE
• Putting n = 2 in equation (2 ) and taking the curve through (x0 , y0 ),(x1 , y1) and
(x2 , y2 ) as a
• polynomial of degree two so that differences of order higher than two vanish, we
get
SIMPSON’S THREE-EIGHT RULE
• Putting n = 3 in equation (2) and taking the curve through (x0, y0), (x1, y1), (x2, y2)
and (x3, y3) as a
• polynomial of degree three so that differences of order higher than three vanish, we
get
BOOLE’S RULE
• Putting n = 4 in equation (2) and neglecting all differences of order higher than
four, we get
WEDDLE’S RULE
Putting n = 6 in equation (2) and neglecting all differences of order higher than
six, we get
.
.
.

You might also like