Chapter 6 : Numerical integration and differential equations
This is the area of the trapezoid (trapezium)shown in fig 1. Hence this is called the trapezoidal rule.
Fig 6.1 An illustration of the trapezoidal rule between two adjacent points.
If there are (n+1) data points, there will be n intervening trapezoids between and the area of all these trapezoids is
(6.5)
The last two points have the coefficients h/2 and all the intermediate points having the coefficient h.
The next improvement over the trapezoidal rule is the Simpson’s rule, wherein we interpolate between using a quadratic polynomial. The integration for the segment is
(6.6)
Here, we have divided the intervals into)… or with . As in trapezoidal rule, we need (n +1) values of and , i.e. the values of n = even and the total number of data points n +1 is odd.