Graphics Programs Reference
In-Depth Information
Inpractice the trapezoidal rule is appliedinapiecewise fashion. Figure 6.3 shows
the region (
a
1 panels, each of width
h
. The function
f
(
x
)tobe
integratedis approximatedbyastraight line in each panel.From the trapezoidal rule
weobtain for the approximate area of a typical(
i
th) panel
,
b
) dividedinto
n
−
f
(
x
i
+
1
)]
h
2
I
i
=
[
f
(
x
i
)
+
Hence total area, representing
a
f
(
x
)
dx
, is
n
−
1
f
(
x
n
)]
h
2
I
=
I
i
=
[
f
(
x
1
)
+
2
f
(
x
2
)
+
2
f
(
x
3
)
+···+
2
f
(
x
n
−
1
)
+
(6.5)
i
=
1
which is the
composite trapezoidal rule
.
The truncation errorinthe area of a panel isfromEq. (6.4),
h
3
12
f
(
E
i
=−
ξ
i
)
where
ξ
i
lies in (
x
i
,
x
i
+
1
). Hence the truncation errorinEq. (6.5) is
n
−
1
n
−
1
h
3
12
f
(
E
=
E
i
=−
ξ
i
)
(a)
i
=
1
i
=
1
But
n
−
1
f
f
(
ξ
i
)
=
(
n
−
1)
i
=
1
where
f
is the arithmeticmean of the secondderivatives. If
f
(
x
) iscontinuous, there
must be apoint
f
,enabling ustowrite
b
) at which
f
(
ξ
in (
a
,
ξ
)
=
n
−
1
b
−
a
f
(
1)
f
(
f
(
ξ
i
)
=
(
n
−
ξ
)
=
ξ
)
h
i
=
1
Therefore, Eq. (a) becomes
−
a
)
h
2
12
(
b
f
(
E
=−
ξ
)
(6.6)
ch
2
(
c
being a constant),
It wouldbe incorrect to concludefromEq. (6.6)that
E
=
because
f
(
) is not entirely independentof
h
.Adeeper analysis of the error
10
shows
that if
f
(
x
) and its derivatives are finite in (
a
ξ
,
b
), then
c
1
h
2
c
2
h
4
c
3
h
6
E
=
+
+
+···
(6.7)
10
The analysis requires familiaritywith the
Euler-Maclaurin summation formula
, which iscovered
in advanced texts.
Search WWH ::
Custom Search