The methods we have presented hitherto are tailored to problems where the mesh points \( x_i \) are equidistantly spaced, \( x_i \) differing from \( x_{i+1} \) by the step \( h \).
The basic idea behind all integration methods is to approximate the integral $$ \begin{equation*} I=\int_a^bf(x)dx \approx \sum_{i=1}^N\omega_if(x_i), \end{equation*} $$ where \( \omega \) and \( x \) are the weights and the chosen mesh points, respectively. In our previous discussion, these mesh points were fixed at the beginning, by choosing a given number of points \( N \). The weigths \( \omega \) resulted then from the integration method we applied. Simpson's rule, see Eq. (6) would give $$ \begin{equation*} \omega : \left\{h/3,4h/3,2h/3,4h/3,\dots,4h/3,h/3\right\}, \end{equation*} $$ for the weights, while the trapezoidal rule resulted in $$ \begin{equation*} \omega : \left\{h/2,h,h,\dots,h,h/2\right\}. \end{equation*} $$