<< Chapter < Page Chapter >> Page >

Definition

If B is our estimate of some quantity having an actual value of A , then the absolute error is given by | A B | . The relative error is the error as a percentage of the absolute value and is given by | A B A | = | A B A | · 100 % .

Calculating error in the midpoint rule

Calculate the absolute and relative error in the estimate of 0 1 x 2 d x using the midpoint rule, found in [link] .

The calculated value is 0 1 x 2 d x = 1 3 and our estimate from the example is M 4 = 21 64 . Thus, the absolute error is given by | ( 1 3 ) ( 21 64 ) | = 1 192 0.0052 . The relative error is

1 / 192 1 / 3 = 1 64 0.015625 1.6 % .
Got questions? Get instant answers now!
Got questions? Get instant answers now!

Calculating error in the trapezoidal rule

Calculate the absolute and relative error in the estimate of 0 1 x 2 d x using the trapezoidal rule, found in [link] .

The calculated value is 0 1 x 2 d x = 1 3 and our estimate from the example is T 4 = 11 32 . Thus, the absolute error is given by | 1 3 11 32 | = 1 96 0.0104 . The relative error is given by

1 / 96 1 / 3 = 0.03125 3.1 % .
Got questions? Get instant answers now!
Got questions? Get instant answers now!

In an earlier checkpoint, we estimated 1 2 1 x d x to be 24 35 using T 2 . The actual value of this integral is ln 2 . Using 24 35 0.6857 and ln 2 0.6931 , calculate the absolute error and the relative error.

0.0074, 1.1%

Got questions? Get instant answers now!

In the two previous examples, we were able to compare our estimate of an integral with the actual value of the integral; however, we do not typically have this luxury. In general, if we are approximating an integral, we are doing so because we cannot compute the exact value of the integral itself easily. Therefore, it is often helpful to be able to determine an upper bound for the error in an approximation of an integral. The following theorem provides error bounds for the midpoint and trapezoidal rules. The theorem is stated without proof.

Error bounds for the midpoint and trapezoidal rules

Let f ( x ) be a continuous function over [ a , b ] , having a second derivative f ( x ) over this interval. If M is the maximum value of | f ( x ) | over [ a , b ] , then the upper bounds for the error in using M n and T n to estimate a b f ( x ) d x are

Error in M n M ( b a ) 3 24 n 2

and

Error in T n M ( b a ) 3 12 n 2 .

We can use these bounds to determine the value of n necessary to guarantee that the error in an estimate is less than a specified value.

Determining the number of intervals to use

What value of n should be used to guarantee that an estimate of 0 1 e x 2 d x is accurate to within 0.01 if we use the midpoint rule?

We begin by determining the value of M , the maximum value of | f ( x ) | over [ 0 , 1 ] for f ( x ) = e x 2 . Since f ( x ) = 2 x e x 2 , we have

f ( x ) = 2 e x 2 + 4 x 2 e x 2 .

Thus,

| f ( x ) | = 2 e x 2 ( 1 + 2 x 2 ) 2 · e · 3 = 6 e .

From the error-bound [link] , we have

Error in M n M ( b a ) 3 24 n 2 6 e ( 1 0 ) 3 24 n 2 = 6 e 24 n 2 .

Now we solve the following inequality for n :

6 e 24 n 2 0.01 .

Thus, n 600 e 24 8.24 . Since n must be an integer satisfying this inequality, a choice of n = 9 would guarantee that | 0 1 e x 2 d x M n | < 0.01 .

Got questions? Get instant answers now!
Got questions? Get instant answers now!

Use [link] to find an upper bound for the error in using M 4 to estimate 0 1 x 2 d x .

1 192

Got questions? Get instant answers now!

Simpson’s rule

With the midpoint rule, we estimated areas of regions under curves by using rectangles. In a sense, we approximated the curve with piecewise constant functions. With the trapezoidal rule, we approximated the curve by using piecewise linear functions. What if we were, instead, to approximate a curve using piecewise quadratic functions? With Simpson’s rule    , we do just this. We partition the interval into an even number of subintervals, each of equal width. Over the first pair of subintervals we approximate x 0 x 2 f ( x ) d x with x 0 x 2 p ( x ) d x , where p ( x ) = A x 2 + B x + C is the quadratic function passing through ( x 0 , f ( x 0 ) ) , ( x 1 , f ( x 1 ) ) , and ( x 2 , f ( x 2 ) ) ( [link] ). Over the next pair of subintervals we approximate x 2 x 4 f ( x ) d x with the integral of another quadratic function passing through ( x 2 , f ( x 2 ) ) , ( x 3 , f ( x 3 ) ) , and ( x 4 , f ( x 4 ) ) . This process is continued with each successive pair of subintervals.

Practice Key Terms 5

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Calculus volume 2. OpenStax CNX. Feb 05, 2016 Download for free at http://cnx.org/content/col11965/1.2
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Calculus volume 2' conversation and receive update notifications?

Ask