computing integrals visual inspection of the numbers shows how fast the digits stabilize in both methods it appears that digits have stabilized in the last two rows remark the trapezoidal and midpoint methods are just two examples in jungle of numerical integration rules other famous methods are simpson' rule and gauss quadrature they all work in the same wayzb /dx wi xi that isthe integral is approximated by sum of function evaluationswhere each evaluation xi is given weight wi the different methods differ in the way they construct the evaluation points xi and the weights wi we have used equally spaced points xi but higher accuracy can be obtained by optimizing the location of xi testing problems with brief testing procedures testing of the programs for numerical integration has so far employed two strategies if we have an exact answerwe compute the error and see that increasing decreases the error when the exact answer is not availablewe can (as in the comparison example in the previous sectionlook at the integral values and see that they stabilize as grows unfortunatelythese are very weak test procedures and not at all satisfactory for claiming that the software we have produced is correctly implemented to see thiswe can introduce bug in the application function that calls trapezoidalinstead of integrating we write "accidentally but keep the same anti-derivative / for computing the error with the bug and