Professional Documents
Culture Documents
What is Integration
Integration:
The process of measuring
the area under a function
plotted on a graph.
Where:
f(x) is the integrand
a= lower limit of integration
b= upper limit of integration
2
http://
numericalmethods.eng.usf.edu
and
http://
numericalmethods.eng.usf.edu
http://
numericalmethods.eng.usf.edu
http://
numericalmethods.eng.usf.edu
http://
numericalmethods.eng.usf.edu
Example 1
The vertical distance covered by a rocket from t=8 to
t=30 seconds is given by:
http://
numericalmethods.eng.usf.edu
Solution
a)
http://
numericalmethods.eng.usf.edu
Solution (cont)
a)
http://
numericalmethods.eng.usf.edu
Solution (cont)
b)
c)
10
, would be
http://
numericalmethods.eng.usf.edu
11
http://
numericalmethods.eng.usf.edu
Hence:
12
http://
numericalmethods.eng.usf.edu
13
http://
numericalmethods.eng.usf.edu
14
http://
numericalmethods.eng.usf.edu
15
http://
numericalmethods.eng.usf.edu
Example 2
The vertical distance covered by a rocket from to seconds is
given by:
16
http://
numericalmethods.eng.usf.edu
Solution
a) The solution using 2-segment Trapezoidal rule is
17
http://
numericalmethods.eng.usf.edu
Solution (cont)
Then:
18
http://
numericalmethods.eng.usf.edu
Solution (cont)
b) The exact value of the above integral is
19
http://
numericalmethods.eng.usf.edu
Solution (cont)
c)
20
, would be
http://
numericalmethods.eng.usf.edu
Solution (cont)
Table 1 gives the values
obtained using multiple
segment Trapezoidal rule
for:
Value
Et
11868
-807
7.296
---
11266
-205
1.853
5.343
11153
-91.4
0.8265
1.019
11113
-51.5
0.4655
0.3594
11094
-33.0
0.2981
0.1669
11084
-22.9
0.2070
0.09082
11078
-16.8
0.1521
0.05482
11074
-12.9
0.1165
0.03560
21
http://
numericalmethods.eng.usf.edu
Example 3
Use Multiple Segment Trapezoidal Rule to find
the area under the curve
.
from
Using two segments, we get
22
to
and
http://
numericalmethods.eng.usf.edu
Solution
Then:
23
http://
numericalmethods.eng.usf.edu
Solution (cont)
So what is the true value of this integral?
24
http://
numericalmethods.eng.usf.edu
Solution (cont)
Table 2: Values obtained using Multiple Segment
Trapezoidal Rule for:
25
Approximate
Value
0.681
245.91
99.724%
50.535
196.05
79.505%
170.61
75.978
30.812%
227.04
19.546
7.927%
16
241.70
4.887
1.982%
32
245.37
1.222
0.495%
64
246.28
0.305
0.124%
http://
numericalmethods.eng.usf.edu
is some point in
What is the error, then in the multiple segment Trapezoidal rule? It will
be simply the sum of the errors from each segment, where the error in
each segment is that of the single segment Trapezoidal rule.
The error in each segment is
26
http://
numericalmethods.eng.usf.edu
27
http://
numericalmethods.eng.usf.edu
The term
Hence:
28
http://
numericalmethods.eng.usf.edu
as a function of the number of segments. You can visualize that as the number
of segments are doubled, the true error gets approximately quartered.
29
Value
11266
-205
1.854
5.343
11113
-51.5
0.4655
0.3594
11074
-12.9
0.1165
0.03560
16
11065
-3.22
0.02913
0.00401
http://
numericalmethods.eng.usf.edu
Integration
http://numericalmethods.eng.usf.edu
30
Where
31
http://
numericalmethods.eng.usf.edu
32
http://
numericalmethods.eng.usf.edu
33
http://
numericalmethods.eng.usf.edu
34
http://
numericalmethods.eng.usf.edu
35
http://
numericalmethods.eng.usf.edu
Because the above form has 1/3 in its formula, it is called Simpsons 1/3rd Rule.
36
http://
numericalmethods.eng.usf.edu
Example 1
The distance covered by a rocket from t=8 to t=30 is given by
37
http://
numericalmethods.eng.usf.edu
Solution
a)
38
http://
numericalmethods.eng.usf.edu
Solution (cont)
b) The exact value of the above integral is
True Error
39
http://
numericalmethods.eng.usf.edu
Solution (cont)
a)c)
40
http://
numericalmethods.eng.usf.edu
41
http://
numericalmethods.eng.usf.edu
where
42
http://
numericalmethods.eng.usf.edu
. . .
x
.
x0
x2
xn-2
xn
43
http://
numericalmethods.eng.usf.edu
Since
44
http://
numericalmethods.eng.usf.edu
45
http://
numericalmethods.eng.usf.edu
46
http://
numericalmethods.eng.usf.edu
Example 2
Use 4-segment Simpsons 1/3rd Rule to approximate the distance
covered by a rocket from t= 8 to t=30 as given by
47
numericalmethods.eng.usf.edu
Solution
a)
So
48
http://
numericalmethods.eng.usf.edu
Solution (cont.)
49
http://
numericalmethods.eng.usf.edu
Solution (cont.)
cont.
50
http://
numericalmethods.eng.usf.edu
Solution (cont.)
b)
c)
51
http://
numericalmethods.eng.usf.edu
Solution (cont.)
Table 1: Values of Simpsons 1/3rd Rule for Example 2 with multiple segments
52
Approximate Value
Et
2
4
6
8
10
11065.72
11061.64
11061.40
11061.35
11061.34
4.38
0.30
0.06
0.01
0.00
|t |
0.0396%
0.0027%
0.0005%
0.0001%
0.0000%
http://
numericalmethods.eng.usf.edu
In Multiple Segment Simpsons 1/3rd Rule, the error is the sum of the errors
in each application of Simpsons 1/3rd Rule. The error in n segment Simpsons
1/3rd Rule is given by
53
http://
numericalmethods.eng.usf.edu
.
.
.
54
http://
numericalmethods.eng.usf.edu
55
http://
numericalmethods.eng.usf.edu
Hence
where
56
http://
numericalmethods.eng.usf.edu
Integration
http://numericalmethods.eng.usf.edu
57
58
http://
numericalmethods.eng.usf.edu
Is given by
can be viewed as an
in
60
http://
numericalmethods.eng.usf.edu
Value
Et
11868
807
7.296
---
11266
205
1.854
5.343
11153
91.4
0.8265
1.019
11113
51.5
0.4655
0.3594
11094
33.0
0.2981
0.1669
11084
22.9
0.2070
0.09082
11078
16.8
0.1521
0.05482
11074
12.9
0.1165
0.03560
61
http://
numericalmethods.eng.usf.edu
62
http://
numericalmethods.eng.usf.edu
63
= approx. value
http://
numericalmethods.eng.usf.edu
64
http://
numericalmethods.eng.usf.edu
Example 1
The vertical distance covered by a rocket from 8 to 30
seconds is given by
http://
numericalmethods.eng.usf.edu
Solution
a)
Using Richardsons extrapolation formula
for Trapezoidal rule
and choosing n=2,
66
http://
numericalmethods.eng.usf.edu
Solution (cont.)
b) The exact value of the above integral is
Hence
67
http://
numericalmethods.eng.usf.edu
Solution (cont.)
c) The absolute relative true error
would then be
68
http://
numericalmethods.eng.usf.edu
Solution (cont.)
Table 2: The values obtained using Richardsons
extrapolation formula for Trapezoidal rule for
Trapezoidal
Rule
1
2
4
8
11868
11266
11113
11074
for Trapezoidal
Rule
7.296
1.854
0.4655
0.1165
Richardsons
Extrapolation
-11065
11062
11061
for Richardsons
Extrapolation
-0.03616
0.009041
0.0000
69
http://
numericalmethods.eng.usf.edu
Romberg Integration
Romberg integration is same as Richardsons
extrapolation formula as given previously. However,
Romberg used a recursive algorithm for the
extrapolation. Recall
70
http://
numericalmethods.eng.usf.edu
Romberg Integration
Note that the variable TV is replaced by
as the
value obtained using Richardsons extrapolation formula.
Note also that the sign
is replaced by = sign.
Hence the estimate of the true value now is
71
http://
numericalmethods.eng.usf.edu
Romberg Integration
Determine another integral value with further halving
the step size (doubling the number of segments),
72
http://
numericalmethods.eng.usf.edu
Romberg Integration
A general expression for Romberg integration can be
written as
http://
numericalmethods.eng.usf.edu
Example 2
The vertical distance covered by a rocket from
to
seconds is given by
74
http://
numericalmethods.eng.usf.edu
Solution
From Table 1, the needed values from original
Trapezoidal rule are
75
http://
numericalmethods.eng.usf.edu
Solution (cont.)
To get the first order extrapolation values,
Similarly,
76
http://
numericalmethods.eng.usf.edu
Solution (cont.)
For the second order extrapolation values,
Similarly,
77
http://
numericalmethods.eng.usf.edu
Solution (cont.)
For the third order extrapolation values,
http://
numericalmethods.eng.usf.edu
Solution (cont.)
Table 3: Improved estimates of the integral value using Romberg Integration
First Order
1-segment
Second Order
Third Order
11868
11065
2-segment
1126
11062
11062
4-segment
11113
11061
11061
11061
8-segment
79
11074
http://
numericalmethods.eng.usf.edu
Integration
80
Two-Point Gaussian
Quadrature Rule
http://numericalmethods.eng.usf.edu
81
82
http://
numericalmethods.eng.usf.edu
83
http://
numericalmethods.eng.usf.edu
84
http://
numericalmethods.eng.usf.edu
85
http://
numericalmethods.eng.usf.edu
86
http://
numericalmethods.eng.usf.edu
87
http://
numericalmethods.eng.usf.edu
88
http://
numericalmethods.eng.usf.edu
http://numericalmethods.eng.usf.edu
89
90
http://
numericalmethods.eng.usf.edu
as shown in Table 1.
91
Weighting
Factors
c1 = 1.000000000
c2 = 1.000000000
Function
Arguments
x1 = -0.577350269
x2 = 0.577350269
c1 = 0.555555556
c2 = 0.888888889
c3 = 0.555555556
x1 = -0.774596669
x2 = 0.000000000
x3 = 0.774596669
c1
c2
c3
c4
x1 = -0.861136312
x2 = -0.339981044
x3 = 0.339981044
x4 = 0.861136312
=
=
=
=
0.347854845
0.652145155
0.652145155
0.347854845
http://
numericalmethods.eng.usf.edu
92
Weighting
Factors
Function
Arguments
c1
c2
c3
c4
c5
=
=
=
=
=
0.236926885
0.478628670
0.568888889
0.478628670
0.236926885
x1 = -0.906179846
x2 = -0.538469310
x3 = 0.000000000
x4 = 0.538469310
x5 = 0.906179846
c1
c2
c3
c4
c5
c6
=
=
=
=
=
=
0.171324492
0.360761573
0.467913935
0.467913935
0.360761573
0.171324492
x1 = -0.932469514
x2 = -0.661209386
x3 = -0.2386191860
x4 = 0.2386191860
x5 = 0.661209386
x6 = 0.932469514
http://
numericalmethods.eng.usf.edu
93
If
then
If
then
Let
Such that:
http://
numericalmethods.eng.usf.edu
Hence
94
http://
numericalmethods.eng.usf.edu
Example 1
For an integral
Rule.
Solution
The one-point Gaussian Quadrature Rule is
95
http://
numericalmethods.eng.usf.edu
Solution
Assuming the formula gives exact values for integrals
and
Since
96
http://
numericalmethods.eng.usf.edu
Solution (cont.)
Therefore, one-point Gauss Quadrature Rule can be expressed as
97
http://
numericalmethods.eng.usf.edu
Example 2
a)
b)
c)
Solution
First, change the limits of integration from [8,30] to [-1,1]
by previous relations as follows
99
http://
numericalmethods.eng.usf.edu
Solution (cont)
Next, get weighting factors and function argument values from Table 1
.
100
http://
numericalmethods.eng.usf.edu
Solution (cont.)
Now we can use the Gauss Quadrature formula
101
http://
numericalmethods.eng.usf.edu
Solution (cont)
since
102
http://
numericalmethods.eng.usf.edu
Solution (cont)
b) The true error,
, is
103
http://
numericalmethods.eng.usf.edu