4.8. Numerical Integration http://www.ck12.org
The area of a trapezoid isA=h(b^12 +b^2 ), whereb 1 andb 2 are the lengths of the parallel sides andhis the height. In
our trapezoids the height is 4 xandb 1 andb 2 are the values of the function. Therefore in finding the areas of the
trapezoids we actually average the left and right endpoints of each sub-interval. Therefore a typical trapezoid would
have the area
A=^42 x(f(xi− 1 )+f(xi)).
To approximate∫abf(x)dxwithnof these trapezoids, we have
∫b
a f(x)dx≈
1
2
[n
∑i= 1 f(xi− 1 )^4 x+
n
∑i= 1 f(xi)^4 x
]
=^42 x[f(x 0 )+f(x 1 )+f(x 1 )+f(x 2 )+f(x 2 )+...+f(xn− 1 )+f(xn)]
=^42 x[f(x 0 )+ 2 f(x 1 )+ 2 f(x 2 )+...+ 2 f(xn− 1 )+f(xn)], 4 x=b−na.
Example 1:
Use the Trapezoidal Rule to approximate∫ 03 x^2 dxwithn=6.
Solution:
We find 4 x=b−na=^3 − 60 =^12.
∫ 3
0 x
(^2) dx≈^1
4
[f( 0 )+ 2 f( 1
2 )+^2 f(^1 )+^2 f(^32 )+^2 f(^2 )+^2 f(^52 )+f(^3 )
]
=^14 [ 0 +( 2 ·^14 )+( 2 · 1 )+( 2 ·^94 )+( 2 · 4 )+( 2 ·^254 )+ 9 ]
=^14 [^732 ]=^738 = 9. 125.
Of course, this estimate is not nearly as accurate as we would like. For functions such asf(x) =x^2 ,we can easily
find an antiderivative with which we can apply the Fundamental Theorem that∫ 03 x^2 dx=x 33
] 3
0
= 9 .But it is not
always easy to find an antiderivative. Indeed, for many integrals it is impossible to find an antiderivative. Another