Although other problems may require more trial and error to choose the right definition of u, but all such problems will have the same procedure as the one outlined above. See the problem set for more examples.

The Trapezoid Rule

The trapezoid rule gives a formula with which we can numerically approximate the value of definite integrals. In previous sections, the area under the curve was approximated using rectangles. The trapezoid rule is based on a method of approximating via trapezoids, as shown below:

Figure %: Using trapezoids to approximate area with 3 subdivisions

The formula for the area of a trapezoid is (base)(average height).

Substituting in the variables in the diagram, this becomes

AΔx + Δx + Δx    

Generalizing from the example and consolidating terms generates the trapezoid rule:

f (x)dxf (x0)+2f (x1)+2f (x3)+...+2f (xn-1)+f (xn)    

As was the case with the other approximations, n is the number of subdivisions,