Professional Documents
Culture Documents
INSTITUTE OF TECHNOLOGY
School of Mechanical and Chemical Engineering
Department of Mechanical Engineering
Numerical Methods
Chapter Four
Numerical Differentiation and Integration
Introduction
Numerical differentiation is a method to compute the derivatives of a function at
some values of independent variable x, when the function f (x) is explicitly
unknown, however it is known only for a set of arguments.
Numerical differentiation is not a particularly accurate process. It suffers from a
conflict between roundoff errors (due to limited machine precision) and errors
inherent in interpolation. For this reason, a derivative of a function can never be
computed with the same precision as the function itself.
In many applications in science and engineering, most integrals cannot be
evaluated because most integrals do not have anti-derivatives F(x) expressible in
terms of elementary functions.
Numerical integration (or numerical quadrature, as it is sometimes called) is an
alternative approach to solve such problems. As in other numerical techniques,
it often results in approximate solution. The integration can be performed on a
continuous function or a set of data.
Derivatives using Newton’s Forward Difference Formula
• Newton’s Forward Difference formula is
Cont…
• ..
Cont…
•Putting
p=0, we obtain
Similarly
Remarks
We use the Newtons Forward formula when the values of x are equidistant
and we need the value of near the beginning of the table, again we use
Newtons backward formula when the values of x are equidistant and we need
the value of near the end of the table
Cont…
• We use Stirling or Bessel’s formula to determine for values near the middle of
the table
We use Newtons Divided Difference Formula to determine
………………… (3)
• Each subinterval with the line approximation for the function forms a
trapezoid as shown in Fig
• The area of each trapezoid is computed by multiplying the interval size h by
the average value of the function value in that subinterval.
Cont…
• Substituting n = 1 in Eq.(7.7) and considering the curve y = f(x) through the
points (x0, y0) and (x1, y1) as a straight line (a polynomial of first degree so
that the differences of order higher than first become zero), we get
Similarly, we have
In general, we have
Cont…
• Adding all the integrals and using the interval additive property of the definite
integrals, we obtain
…….. ( 4)
….. (5)
• Equation (5) is known as Simpson’s 1/3 rule. Simpson’s 1/3 rule requires the
whole range (the given interval) must be divided into even number of equal
subintervals.
Cont….
Cont…