DefinitionFor the purpose of numerical integration, values of definite integrals are calculated based on discrete data points or values. Such techniques are the trapezoidal rule, Simpson's rule, and numerical quadrature. For instance, if f(x)=x2 and we wish to approximate ∫01x2dx using the trapezoidal rule with n=2 intervals, we have∫01x2dx≈21[(02+12)+2⋅(21)2]=21(0+1+2⋅0.25)=0.375.