TRAPEZOIDAL METHOD Let f x) have two continuous derivatives on
[Pages:28]TRAPEZOIDAL METHOD ERROR FORMULA
Theorem Let f (x) have two continuous derivatives on
the interval a x b. Then
EnT
(f
)
Zb a
f
(x)
dx
-
Tn(f )
=
h2 -
(b - 12
a) f
00
(cn)
for some cn in the interval [a, b].
Later I will say something about the proof of this result, as it leads to some other useful formulas for the error.
The above formula says that the error decreases in a manner that is roughly proportional to h2. Thus doubling n (and halving h) should cause the error to decrease by a factor of approximately 4. This is what we observed with a past example from the preceding section.
Example. Consider evaluating Z 2 dx
I = 0 1 + x2
using the trapezoidal method Tn(f ). How large should n be chosen in order to ensure that
???EnT (f )??? 5 ? 10-6
We begin by calculating the derivatives:
f 0(x)
=
-2x
?
1
+
x2?2
,
f 00(x)
=
-2 + 6x2
?
1
+
x2?3
From a graph of f 00(x), max ???f 00(x)??? = 2
0x2
Recall that b - a = 2. Therefore,
EnT (f )
=
h2 -
(b - 12
a) f
00
(cn)
???EnT (f )???
h2 (2)
h2
?2=
12
3
EnT (f )
=
h2 -
(b - 12
a) f
00
(cn)
We
bound???E??fnT0(0 f(c)n??? )??sinhc1e222w?e2
= do
h2 3 not
know
cn,
and
therefore we must assume the worst possible case, that
which makes the error formula largest. That is what
has been done above.
When do we have
???EnT (f )??? 5 ? 10-6
(1)
To ensure this, we choose h so small that
h2 5 ? 10-6 3 This is equivalent to choosing h and n to satisfy
h .003873 2 n = 516.4 h
Thus n 517 will imply (1).
DERIVING THE ERROR FORMULA
There are two stages in deriving the error: (1) Obtain the error formula for the case of a single subinterval (n = 1); (2) Use this to obtain the general error formula given earlier.
For the trapezoidal method with only a single subin-
terval, we have
Z +h f (x) dx - h [f () + f ( + h)] = -h3f 00(c)
2
12
for some c in the interval [, + h].
A sketch of the derivation of this error formula is given in the problems.
Recall that the general trapezoidal rule Tn(f ) was obtained by applying the simple trapezoidal rule to a subdivision of the original interval of integration. Recall defining and writing
h
=
b
-
a ,
n
xj = a + j h, j = 0, 1, ..., n
xZn
I = f (x) dx
x0
xZ1
xZ2
= f (x) dx + f (x) dx + ? ? ?
x0
x1
xZn
+ f (x) dx
xn-1
I
h 2
[f (x0)
+
f (x1)]
+
h 2
[f (x1)
+
f (x2)]
+???
+
h 2
[f
(xn-2)
+
f (xn-1)]
+
h 2
[f (xn-1)
+
f
(xn)]
Then the error
EnT
(f
)
Zb a
f
(x)
dx
-
Tn(f )
can be analyzed by adding together the errors over the
subintervals [x0, x1], [x1, x2], ..., [xn-1, xn]. Recall
Z +h f (x) dx - h [f () + f ( + h)] = -h3f 00(c)
2
12
Then on [xj-1, xj],
Zxj xj-1
f
(x)
dx
-
h 2
h
f
(xj-1)
+
f
i
(xj )
=
h3 -f
12
00( j )
with xj-1 j xj, but otherwise j unknown. Then combining these errors, we obtain
EnT
(f
)
=
h3 -f
12
00(1)
-
?
?
?
-
h3 f
12
00(n)
This formula can be further simplified, and we will do
so in two ways.
Rewrite this error as
EnT
(f
)
=
h3n -
12
"
f
00(1)
+
??? n
+
f
00(
#
n)
Denote the quantity inside the brackets by n. This number satisfies
min
axb
f
00(x)
n
max
axb
f
00(x)
Since f 00(x) is a continuous function (by original as-
sumption), we have that there must be some number
cn in [a, b] for which
f 00(cn) = n
Recall also that hn = b - a. Then
EnT (f )
=
h3n -
"
f
00(
1)
+
?
?
?
+
f
00(
#
n)
12
n
=
h2 -
(b - 12
a) f
00
(cn)
This is the error formula given on the first slide.
AN ERROR ESTIMATE
We now obtain a way to estimate the error EnT (f ). Return to the formula
EnT
(f
)
=
h3 -f
12
00(1)
-
?
?
?
-
h3 f
12
00(n)
and rewrite it as
EnT
(f
)
=
h2 -
12
h
f
00(1)h
+
?
?
?
+
f
i
00(n)h
The quantity
f 00(1)h + ? ? ? + f 00(n)h
is a Riemann sum for the integral
Z b f 00(x) dx = f 0(b) - f 0(a)
a
By this we mean
nlim
h
f 00(1)h
+
?
?
?
+
i
f 00(n)h
=
Zb a
f
00(x)
dx
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- 9 de nite integrals using the residue theorem
- trigonometric substitutions math 121 calculus ii
- table of integrals
- line integrals and green s theorem jeremy orlo
- use r to compute numerical integrals
- integral calculus formula sheet
- double integrals stankova
- the gaussian integral
- techniques of integration whitman college
- definite integrals by contour integration