You are on page 1of 13

Topic: Simpson’s rule error bound

Question: Calculate arc length on the interval [0,4]. Then use Simpson’s Rule
with n = 8, to approximate arc length on the same interval. Compare the
actual length to the result to determine the error of the Simpson’s Rule
approximation.

1 x
(e + e )
−x
f (x) =
2

Hint: Arc length over an interval is given by

( dx )
b 2
dy
∫a
L= 1+ dx

Answer choices:

A Actual length = 27.289917 S8 = 27.309117 | ES | = 0.0192

B Actual length = 27.309117 S8 = 27.289917 | ES | = 0.0192

C Actual length = 26.278817 S8 = 26.309117 | ES | = 0.0303

D Actual length = 26.289917 S8 = 26.309117 | ES | = 0.0192

245
Solution: A

The question asks us to calculate the length of the curve of f (x) on the
interval [0,4], and then approximate the same length using Simpson’s Rule,
with n = 8, and compare the results by identifying the error.

1 x
f (x) = (e + e −x)
2

The integral to find the length of a curve on and interval [a, b] is

( dx )
b 2
dy
∫a
L= 1+ dx

The function in this problem is

1 x
f (x) = (e + e −x)
2

Let’s begin by finding f′(x), or dy/d x.

Since the derivative of a constant, times a function, is the constant times


the derivative of the function, the fraction 1/2 will be in front of the
derivative of (e x + e −x). The derivative of e x is e x and taking the derivative of
e −x uses the chain rule for the exponent, so the derivative is −e −x. Therefore

dy 1 x
= (e − e −x)
dx 2

So

( dx ) [2 ]
2 2
dy 1 x
= ( e − e −x)

246
( dx )
2
dy 1
= (e x − e −x)
2
4

Add 1.

( dx )
2
dy 1
= 1 + (e x − e −x)
2
1+
4

Now, because the expression will be inside a radical, let’s factor out 1/4.

1
4[
( )]
x −x 2
4 + e − e

Next, square the binomial and combine like terms.

1
4[
( )]
2x −2x
4 + e − 2 + e

1 2x
(e + 2 + e )
−2x
4

The three terms in the brackets actually form a perfect square binomial, so
let’s write a final version of it and then finally place it into the integral to
find the length of the curve.

1 x
(e + e −x)2
4

Plugging everything we’ve found into the integral gives


4
1 x
∫0 ( ) dx
−x 2
L= e + e
4

The integrand simplifies and will allow us to integrate term by term.

247
4
1 x
∫0 2 ( e + e −x) d x

1 4 x
2 ∫0
e + e −x d x

4
1 x
(e − e )
−x
2 0

1
[(e − e ) − (e − e )] = 27.289917
4 −4 0 −0
2

Now, let’s find the length using Simpson’s Rule. The general formula for
Simpson’s Rule is

Δx
Sn = [ f (x0) + 4f (x1) + 2f (x2) + ⋯ 2f (xx−2) + 4f (xx−1) + f (xn)]
3

However, the function f (xi) is not the original f (x) function as the integrand.
If it is, we will be finding the area under the curve. The function for the
Simpson’s Rule is the radical in the integrand of the arc length integral,

1 x
( )
−x 2
f (x) = e + e
4

In Simpson’s Rule formula, the function values at the endpoints of the


interval are not multiplied, but notice that the function values at odd points
within the interval are multiplied by 4 and the function values at even points
are multiplied by 2. The points are found by using

b−a 4−0
or in this problem
n 8

248
to find the length of each subinterval.

The subinterval widths are all 1/2, so to find the values of


x0, x1, x2, x3, x4, x5, x6, x7, and x8 by consecutively adding 1/2 to each one. The
table below shows these values and the expressions in Simpson’s Rule.

Next, we’ll evaluate the function at each point.

1 x
( )
−x 2
f (x) = e + e
4

1 0
( ) =1
−0 2
f (0) = e + e
4

1 0.5
( ) = 1.127626
−0.5 2
f (0.5) = e + e
4

1 1
( ) = 1.543081
−1 2
f (1) = e + e
4

1 1.5
( ) = 2.352409
−1.5 2
f (1.5) = e + e
4

1 2
( ) = 3.762196
−2 2
f (2) = e + e
4

1 2.5
( ) = 6.132289
−2.5 2
f (2.5) = e + e
4

1 3
( ) = 10.067662
−3 2
f (3) = e + e
4

249
1 3.5
( ) = 16.572825
−3.5 2
f (3.5) = e + e
4

1 4
( ) = 27.308233
−4 2
f (4) = e + e
4

Now we’ll write the entire Simpson’s Rule, using the previous function
values, giving the approximation of the length of the function.

1
[1 + 4(1.127626 + 2(1.543081) + 4(2.352409) + 2(3.762196)
6

+4(6.132289) + 2(10.067662) + 4(16.572825) + 27.368233]

= 27.309117

The error is the actual length minus the estimated length, as an absolute
value.

27.289917 − 27.309117 = 0.0192

250
Topic: Simpson’s rule error bound

Question: Calculate the error bound of Simpson’s Rule, with n = 8, when


estimating the length of f (x) on [0,4].

1 x
(e + e )
−x
f (x) =
2

Answer choices:

A | ES | ≤ 0.379281

B | ES | ≤ 0.003793

C | ES | ≤ 1.037928

D | ES | ≤ 0.037928

251
Solution: D

The question asks us to calculate the error bound of Simpson’s Rule, in


calculating the length of f (x) with n = 4, on the interval [0,4].

1 x
(e + e )
−x
f (x) =
2

To find the error bound of Simpson’s Rule on the interval [a, b], we use this
formula.

(b − a)5
| ES | ≤ k
180n 4

Where | ES | denotes the maximum error of Simpson’s Rule, k is a constant


based on the function, which we will find, a is the lower limit of the interval,
b is the upper limit of the interval, and n is the number of subintervals.

First, let’s find k. The value k if often denoted by the notation Mf (4) which
means the maximum absolute value of the function’s fourth derivative in
the interval. Let’s find k for the function and interval in this problem.

1 x
(e + e )
−x
f (x) =
2

1 x
(e − e )
−x
f′(x) =
2

1 x
f′′(x) = (e + e −x)
2

1 x
f′′′(x) = (e − e −x)
2

252
1 x
f (x) = (e + e −x)
(4)
2

The graph of the fourth derivative f (4)(x) is shown below.

The graph is the same as f (x) so to find k, find the maximum value of the
function on [0,4]. The minimum function value is at x = 0, f (0) = 1 and the
maximum function value is at x = 4, f (4) = 27.308233, k = 27.308233.

Now in the expression

(b − a)5
| ES | ≤ k
180n 4

k = 27.308233, a = 0, b = 4 and n = 8. Evaluate the error bound.

(b − a)5 (4 − 0)5 (27.308233)(1024)


k = (27.308233) = = 0.037928
180n 4 (180)(8) 4 (180)(4,096)

Therefore,

| ES | ≤ 0.037928

253
Topic: Simpson’s rule error bound

Question: Find n to get the accuracy of Simpson’s Rule in the


approximation of the length of the curve of f (x) on the interval [0,4] to be
within 0.00001.

1 x
(e + e )
−x
f (x) =
2

Answer choices:

A n ≥ 62

B n ≥ 63

C n ≥ 64

D n ≥ 62.78

254
Solution: C

The question asks us to find n to get the accuracy of Simpson’s Rule in


approximating the length of f (x) on [0,4] to be within 0.00001.

1 x
(e + e )
−x
f (x) =
2

To find the error bound of Simpson’s Rule on the interval [a, b], we use this
formula.

(b − a)5
| ES | ≤ k
180n 4

Where | ES | denotes the maximum error of Simpson’s Rule, k is a constant


based on the function, a is the lower limit of the interval, b is the upper limit
of the interval, and n is the number of subintervals, which we will find in
this problem.

First, let’s find k. The value k if often denoted by the notation Mf (4) which
means the maximum absolute value of the function’s fourth derivative in
the interval. Let’s find k for the function and interval in this problem.

1 x
(e + e )
−x
f (x) =
2

1 x
(e − e )
−x
f′(x) =
2

1 x
(e + e )
−x
f′′(x) =
2

1 x
(e − e )
−x
f′′′(x) =
2

255
1 x
f (x) = (e + e −x)
(4)
2

The graph of the fourth derivative f (4)(x) is shown below.

The graph is the same as f (x) so to find k, find the maximum value of the
function on [0,4]. The minimum function value is at x = 0, f (0) = 1 and the
maximum function value is at x = 4, f (4) = 27.308233, k = 27.308233.

Now in the expression

(b − a)5
| ES | ≤ k
180n 4

k = 27.308233, a = 0, and b = 4. Let’s simplify the expression.

(b − a)5
k
180n 4

(4 − 0)5
(27.308233)
180)(8)n 4

(27.308233)(1,024)
(180)n 4

256
155.353503
n4

Since we want the error to be less than 0.00001, we set the maximum error
bound expression to be less than 0.00001.

155.353503
≤ 0.00001
n 4

Multiply by n 4 and divide by 0.00001.

155.353503
≤ 0.00001
n 4

155.353503 ≤ (0.00001)n 4

155.353503
≤ n4
0.00001

Take the fourth root both sides of the inequality, ignoring the possibility
that n could be negative.

155.353503 4
4
≤ n4
0.00001

n ≥ 62.781294

We found an interval for n. However, since n is the number of subintervals,


n has to be a whole number. And, since we’re using Simpson’s rule, n has
to be an even whole number. Thus, to be accurate to within 0.0001, n ≥ 64.

257

You might also like