Numerical integration using Newton formulae:
Trapezium rule for an interval from to :
Simpson rule for an interval from to :
These rules are accurate if the interval from to is sufficiently small. To integrate over an interval that is not small, divide it into small ones, then integrate over each small interval and add the results.