Civil Engineering Reference
In-Depth Information
Four strips are shown in Table 3.2:
Table 3.2. Example 3.1 Trapezoidal rule
x
p
0
p/4
p/2
3p/4
x
0
0.7854
1.5708
2.3562
3.1416
y=sin(x)
0
0.7071
1
0.7071
1.23E-16
p
p
(
) =
A =+ (
) + () + (
) +
(
) =
8 020 7071 21 207071
.
.
0
4 8284
.
1 8961
.
8
The exact solution may be found by the integral:
p
() =− () =− () ()
sin
xdx
cos
x |
p
cos
p
cos
0112
=+=
0
0
3.2
ROMbERg intEgRAtiOn
A more accurate integral can be obtained using Romberg's method
(Romberg 1955). If a function can be defined as a continuous mathe-
matical expression having continuous derivative f′ ( x ) and f″ ( x ), the
error of the trapezoidal rule is shown in Figure 3.2 and can be found
as follows:
Expanding y i+ 1 in a Taylor series about x i and letting x=h as
follows:
2
3
y yh yh yh Higherorder termsi
′′
′′′
y
+ =+ +
i
+
i
+
i
1
i
i
2
!
3
!
The change in y between points i and i+ 1 is equal to the area under the
y′ curve between those two points, therefore the exact area in the strip is
as follows:
2
3
yh yh Higherorder termsi
′′
′′′
y
−= +
y
yh
i
+
i
+
i
+
1
i
i
2
!
3
!
fh fh Higherorder termsi
2
′′
3
y
−=
y
ffh
+
i
+
i
+
(3.1)
i
+
1
i
i
2
!
3
!
 
Search WWH ::




Custom Search