Numerical integration is a method used to calculate an approximate value of a definite integral . This Demonstration compares various Newton–Cotes methods to approximate the integrals of several different functions over the interval . Typically, the error decreases as the order of the method is increased. Likewise, more segments usually leads to a more accurate approximation of the integral.