Computer-Based Numerical & Statistical Techniques

Numerical Integration and Differentiation
Introduction, Numerical Differentiation,
Numerical Integration,
Trapezoidal Rule, Simpson s
and
Rule, Boole s Rule, Weddle s Rule.
Consider a function of a single variable y = f( x). If f( x) is defined as an expression, its derivative or integral may often be determined using the techniques of calculus.
However, when f( x) is a complicated function or when it is given in a tabular form, numerical methods are used.
This section discusses numerical methods for approximating the derivative(s) f ( r )( x), r ? 1 of a given function f( x) and for the evaluation of the integral
where a, b may be finite or infinite.
The accuracy attainable by these methods would depend on the given function and the order of the polynomial used. If the polynomial fitted is exact then the error would be, theoretically, zero. In practice, however, rounding errors will introduce errors in the calculated values.
The error introduced in obtaining derivatives is, in general, much worse than that introduced in determining integrals.
It may be observed that any errors in approximating a function are amplified while taking the derivative whereas they are smoothed out in integration.
Thus numerical differentiations should be avoided if an alternative exists.
In the case of numerical data, the functional form of f( x