Simple algorithm for equal step methods

The algorithm for these integration methods is rather simple, and the number of approximations perhaps unlimited!

  • Choose a step size \( h=(b-a)/N \) where \( N \) is the number of steps and \( a \) and \( b \) the lower and upper limits of integration.
  • With a given step length we rewrite the integral as
$$ \begin{equation*} \int_a^bf(x) dx= \int_a^{a+h}f(x)dx + \int_{a+h}^{a+2h}f(x)dx+\dots \int_{b-h}^{b}f(x)dx. \end{equation*} $$
  • The strategy then is to find a reliable polynomial approximation for \( f(x) \) in the various intervals. Choosing a given approximation for \( f(x) \), we obtain a specific approximation to the integral.
  • With this approximation to \( f(x) \) we perform the integration by computing the integrals over all subintervals.