Information Technology Reference
In-Depth Information
1.4
Computational Analysis
For the present method, we will give a full theoretical study of the error,
6
but for the
purpose of motivating this analysis and in order to explain how we do experiments
suggesting a certain accuracy, we will present some simple computations. These
experiments will be of the same flavor as those studied in the examples above; we
investigate the properties of the scheme by applying it to a problem with a known
solution.
Let
F.x/
D
xe
x
;
and define
f.x/
D
F
0
.x/;
so
f.x/
D
.1
C
x/e
x
:
(1.18)
Consequently, we have
Z
1
f.x/dx
D
ŒF .x/
0
D
e:
0
Since we have the analytical solution, this is a good test problem for the method
outlined above. Let T
h
denote the approximation of the integral computed by the
trapezoidal method (1.16), i.e.,
T
h
D
h
"
1
2
f.x
n
/
#
;
2
f.x
0
/
C
n
X
i D1
1
f.x
i
/
C
where f isgivenby(1.18), and where
x
i
D
ih;
for i
D
0;:::;n,and
1
n
:
h
D
(1.19)
We want to study the error defined by
E
h
D j
e
T
h
j
:
In Table
1.1
, we present numerical values of this error for decreasing values of h.
We observe from this table that
6
See Project
1.7.1
.