Professional Documents
Culture Documents
Roger Crawfis
Quadrature
We talk in terms of Quadrature Rules
1. The process of making something square. 2.
Mathematics The process of constructing a square
equal in area to a given surface. 3. Astronomy A
configuration in which the position of one celestial
body is 90 from another celestial body, as measured
from a third.
The American Heritage Dictionary: Fourth Edition. 2000
OSU/CSE 541
Outline
Definite Integrals
Lower and Upper Sums
Reimann Integration or Reimann Sums
Uniformly-spaced samples
Trapezoid Rules
Romberg Integration
Simpsons Rules
Adaptive Simpsons Scheme
OSU/CSE 541
Motivation
What does an integral represent?
f ( x)dx area
f ( x)dxdy volume
f(x)
f ( x )dx lim f ( xk ) x
n
k 1
where x b a
n
OSU/CSE 541
x
4
Motivation
b
I f ( x)dx
2 cos(1 x ) 0.5 x
e dx
1 0.5 x
OSU/CSE 541
i 1
OSU/CSE 541
xn
x0
f ( x)dx
xn
x0
f ( x )dx
x1
x2
f ( x) f ( x) L
x0
x1
OSU/CSE 541
xn
f ( x)
xn1
Upper Sums
Assume that f(x)>0 everywhere.
If within each interval, we could determine
the maximum value of the function, then we
have:
xn
n 1
f ( x) M x
x0
i 0
i 1
xi
where
M i sup f ( x) : xi x xi 1
March 24, 2015
OSU/CSE 541
Supremum - least
upper bound
8
Upper Sums
Graphically:
x0
March 24, 2015
x1
x2
OSU/CSE 541
x3
x4
9
Lower Sums
Likewise, still assuming that f(x)>0
everywhere.
If within each interval, we could determine
the minimum value of the function, then we
have: f ( x) m x x
xn
x0
where
March 24, 2015
n 1
i 0
i 1
mi inf f ( x) : xi x xi 1
OSU/CSE 541
Infimum - greatest
lower bound
10
Lower Sums
Graphically
x0
March 24, 2015
x1
x2
OSU/CSE 541
x3
x4
11
Finer Partitions
We now have a bound on the integral of the
function for some partition (x0,..,xn):
n 1
m x
i 0
i 1
xi
xn
n 1
f ( x) M x
x0
i 0
i 1
xi
OSU/CSE 541
12
x0
March 24, 2015
x1
x2
OSU/CSE 541
x3
x4
13
x0
March 24, 2015
x3
x5
OSU/CSE 541
x7
x9
14
x0
March 24, 2015
x5
x7
OSU/CSE 541
x9
x11
15
Monotonic Functions
Note that if a function is monotonically
increasing (or decreasing), then the lower
sum corresponds to the left partition values,
and the upper sum corresponds to the right
partition values.
x0
March 24, 2015
x3
x5
OSU/CSE 541
x7
x9
16
OSU/CSE 541
17
Polynomial Approximation
Rather than search for the maximum or minimum,
we replace f(x) with a known and simple function.
Within each interval we approximate f(x) by an mth
order polynomial.
pm ( x) a0 a1 x a2 x 2 ... am x m
OSU/CSE 541
18
Newton-Cotes Formulas
The ms (order of the polynomials) may be the
same or different.
xn
x0
f ( x)dx
x0m1
x0
pm1 ( x)dx
x0 m1m2
x0m1
xn
xnmn
pmn ( x)dx
linear
quadratic
cubic
OSU/CSE 541
Error
Trapezoid
O(h 2 )
Simpson' s 1/3 O(h 4 )
Simpson' s 3/8 O(h 4 )
19
Trapezoid Rule
Simplest way to approximate the area under a
curve using first order polynomial (a straight
line)
Using Newtons form of the interpolating
polynomial:
f b f a
p1 x f a
ba
x a
OSU/CSE 541
20
Trapezoid Rule
I
f b f a
x a dx
f a
ba
Trapezoid Rule
b a
f a f b
I
f(a)
f(b)
OSU/CSE 541
b
21
Trapezoid Rule
Improvement?
x0
March 24, 2015
x1
x2
OSU/CSE 541
x3
x4
22
1
(b a )
f h 3
f h 2
12
12
O(h 3 )
OSU/CSE 541
23
Example
Integrate from f ( x ) e
x2
a = 0 to b = 2
I e
0
x2
dx
b a
( 2 0)
f a f b
f ( 2)
2
1 (e 4 e0 ) 1.0183
OSU/CSE 541
f ( 0)
24
Example
Estimate error: Et 1 f h 3
12
x2
h 20 2
f (0) 2
f ( 2) 0.2564
23 f 0 f 2
Et E a
0.58
12
2
March 24, 2015
OSU/CSE 541
25
n=2
n=3
11
13
15
11
13
15
11
13
15
n=4
n=8
0
3
11
13
15
OSU/CSE 541
26
a h
f x dx
a 2 h
a h
f x dx ...
OSU/CSE 541
bh
f x dx
27
a h a
....
f a f a h
b b h
2
a 2h a h
2
f a h f a 2h
f b h f b
I f a 2 f a ih f b
2
i 1
OSU/CSE 541
28
I f a 2 f a ih f b
2
i 1
n 1
b a
f a 2 f a ih f b
i 1
2n
width
Average height
March 24, 2015
OSU/CSE 541
29
Error
The error can be estimated as:
Ea
b a h2
12
b a
f
12n
O(h )
OSU/CSE 541
30
Example
Integrate: f x 0.3 20 x 140 x 2 730 x 3 810 x 4 200 x 5
from
a=0.2
to
b=0.8
40
35
30
25
20
15
10
5
0
0
0.2
0.4
OSU/CSE 541
0.6
0.8
1.2
31
Example
A single application of the Trapezoid rule.
f a f b
I b a
2
34.22 3.81
0.8 0.2
2
11.26
Error:
March 24, 2015
1
3
Et
f b a
12
OSU/CSE 541
32
Example
We dont know so approximate with
average f
f x 20 280 x 2190 x 2 3240 x 3 1000 x 4
f x 280 4380 x 9720 x 2 4000 x 3
f x
0.8
0 .2
f dx
0.8 0.2
f (0.8) f (0.2)
131.6
0.8 0.2
OSU/CSE 541
33
Example
The error can thus be estimated as:
Et
b a h
b a
f
2
12
12n
1
3
131.6 0.8 0.2 2.37
12
OSU/CSE 541
34
0.2
0.4
0.6
OSU/CSE 541
0.8
1.2
35
I b a
f a 2 f a ih f b
i 1
2n
f 0.2 2 f 0.4 f 0.6 f 0.8
0.8 0.2
( 2)(3)
3.31 213.93 30.16 34.22
0.6
6
12.57
True value of integral is 12.82
OSU/CSE 541
36
Et is now 2%
40
35
30
25
20
15
10
5
0
0
0.2
0.4
0.6
OSU/CSE 541
0.8
1.2
37
I 0.8 0.2
OSU/CSE 541
38
Et is now 0.5%
40
35
30
25
20
15
10
5
0
0
0.2
0.4
0.6
OSU/CSE 541
0.8
1.2
39
Multi-dimensional Integration
Consider a two-dimensional case.
1 1
0 0
i
f x, y dxdy Ai f , y dy
n
0 i 0
n
i
Ai f , y dy
n
i 0
0
n
i 0
j 0
i j
,
n n
Ai Aj f
i j
Ai Aj f ,
n n
i 0 j 0
n
OSU/CSE 541
40
Multi-dimensional Integration
For the Trapezoid Rule, this leads to
weights in the following pattern:
1
1 i 0, n
1 2 i 1, K , n 2
Aij 2
4n 2 i {1, n 1}
4 i 1, K , n 2
OSU/CSE 541
j 0, n
j 1, n 1
j 1, K , n 1
j 1, K , n 2
41
Multi-dimensional Integration
If we use the weights from the Trapezoid
rule, the error is still O(h2).
However, there are now n2 function
evaluations.
Equally-spaced samples on a square region.
OSU/CSE 541
42
Multi-dimensional Integration
In general, given k dimensions, we have
N= nk function evaluations:
O h
k
k
O n O n
2
2
k
O N
OSU/CSE 541
43
OSU/CSE 541
44
I h f a 2 f a ih f b
2
i 1
OSU/CSE 541
45
a i f (b)
2
n 1
n 1
h
f (a ) 2 f a ih 2
4
i 1
i 0
I h h n 1
2
2 4 i 0
h
f a ih
2
f a ih f (b)
2
OSU/CSE 541
46
A A( h1 ) O ( h1 )
Suppose we reduce step size to h2
n
A A( h2 ) O (h2 )
March 24, 2015
OSU/CSE 541
47
Richardson Extrapolation
Multiplying the 2nd eqn by (h1/h2)n and
subtracting from the 1st eqn:
n
h1
A( h2 ) A(h1 )
h2
n
h1
1
h2
OSU/CSE 541
48
Richardson Extrapolation
The true integral value can be written
I I h E h
OSU/CSE 541
49
Richardson Extrapolation
For example: Using (n = 2)
E ch 2 f
[error = O(h2)]
where c is a constant
Therefore:
order of error in
trapezoidal rule
E h1 h1
2
E h2 h2
2
OSU/CSE 541
50
Richardson Extrapolation
This leads to:
2
1
2
2
h
E h1 E h2
h
For integration, we have:
2
1
2
2
h
I h1 E h2
I h2 E h2
h
March 24, 2015
OSU/CSE 541
51
Richardson Extrapolation
Solving for E(h2):
I h1 I h2
E h2
2
h1
1 2
h2
I I h2 E h2
OSU/CSE 541
52
Richardson Extrapolation
Leads to:
1
I h2 I h1
I I h2
2
h1 / h2 1
Letting h2 = h1 /2
1
I h2 I h1
I I h2 2
2 1
4
1
I I h2 I h1
3
3
March 24, 2015
OSU/CSE 541
53
Romberg Integration
We combined two O(h2) estimates to get an
O(h4) estimate.
Can also combine two O(h4) estimates to
get an O(h6) estimate.
16
1
I I hm I hl
15
15
OSU/CSE 541
54
Romberg Integration
Greater weight is placed on the more
accurate estimate.
Weighting coefficients sum to unity
i.e, (16-1)/15=1
OSU/CSE 541
55
Romberg Integration
General pattern is called Romberg Integration
4k I j ,k I j 1,k
1
I j ,k 1
I j ,k k
I j ,k I j 1,k
k
4 1
4 1
j : level of subdivision, j+1 has more intervals.
k : level of integration, k = 1 is original trapezoid
estimate [O(h2)], k = 2 is improved [O(h4)], etc.
OSU/CSE 541
56
Romberg Integration
For example, j = 1, k = 1 leads to
I1,1
4 I1,0 I 0,0
3
4 h1
1
I I h1
3 2
3
OSU/CSE 541
57
Example
Consider the function:
f ( x ) 0.2 25 x 200 x 2 675 x 3 900 x 4 400 x 5
OSU/CSE 541
58
Example
Trapezoid Rules:
k
j
intervals
j=0
1
j=1
j=2
2
4
k=0
h
0.8
Integral
0.1728
0.4
0.2
1.0688
1.4848
k=1
4
1
I (1.0688) (0.1728) 1.3674667
(j=1, k=1)
3
3
Exact integral is 1.64053334
March 24, 2015
OSU/CSE 541
59
Example
k
j
k=0
k=1
O(h 4 )
segments
O( h 2 )
0.8
0.1728
2
4
0.4
0.2
1.0688
1.4848
1.3674667
4
1
I (1.4848) (1.0688) 1.62346667
3
3
(j=2, k=1)
OSU/CSE 541
60
Example
k
j
k=1
k=2
O (h 4 )
segments
O( h 2 )
0.8
0.1728
0.4
1.0688
1.3674667
0.2
1.4848
1.62346667
16
1
(j=2, k=2) I 15 (1.62346667) 15 (1.3674667) 1.64053334
March 24, 2015
OSU/CSE 541
Example
k
j
k=1
k=2
segments
1
h
0.8
O( h 2 )
0.1728
0.4
1.0688
1.3674667
0.2
1.4848
1.62346667
O (h 4 )
OSU/CSE 541
k=3
O( h 6 )
1.64053334
62
Example
Better and better results can be obtained by
continuing this
k
j
segments
1
h
0.8
O( h 2 )
0.1728
O(h 4 )
2
4
8
0.4
0.2
0.1
1.0688
1.4848
??
1.3674667
1.62346667
??
I
March 24, 2015
O( h 6 )
O( h8 )
1.64053334
??
64
1
(??) (1.64053334) ??
63
63
OSU/CSE 541
k=3
??
(j=3, k=3)
63
Romberg Integration
Is this that significant?
Consider the cost of computing the
Trapezoid Rule for 1000 data points.
Refinement would lead to 2000 data points.
Implies an additional 1003 operations using the
Recursive Trapezoid Rule.
Not to mention the 1000 (expensive) function evals.
OSU/CSE 541
64
Higher-Order Polynomials
Recall:
xn
x0
f ( x )dx
x0 m1
x0
pm1 ( x)dx
x0m1 m2
x0m1
m Polynomial
Formula
1
linear
Trapezoid
2 quadratic Simpson' s 1/3
3
cubic
Simpson' s 3/8
OSU/CSE 541
xn
xnmn
pmn ( x )dx
Error
O(h 2 )
O(h 4 )
O(h 4 )
65
x1
x0 x2
x x1 x x2 f x x x0 x x2 f x
I
0
1
x0 x x x x
x
x
x
2
1
0
1
2
0 1 0
x2
x x0 x x1
f x2
x2 x0 x2 x1
dx
OSU/CSE 541
66
x2
I
x
0
h 2 h
x x0 x x0 h
f x2
2h h
x x0 x x0 2h
f x0
f x1
h h
dx
OSU/CSE 541
67
h
I f x0 4 f x1 f x2
3
12
10
Quadratic
Polynomial
0
3
OSU/CSE 541
11
13
15
68
average height
OSU/CSE 541
69
h5 4
b a 4
Et
f
f
90
2880
5
O(h )
ba
h
2
4
0
f
Integrates a cubic exactly:
OSU/CSE 541
70
OSU/CSE 541
71
20
15
10
0
0
0.5
1.5
2.5
3.5
4.5
-5
OSU/CSE 541
72
n 2
f x0 4
n 1
n2
f x 2 f x f x
i 1,3,5
j 2,4,6
3n
n+1 data points, an odd number
OSU/CSE 541
73
1
1
1
1
1
i=n
coefficients on
numerator
i=0
OSU/CSE 541
74
Error Estimate
The error can be estimated by:
nh 5 ( 4 ) b a h 4 ( 4 )
4
O(h )
Ea
f
f
180
180
If n is doubled, h h/2 and Ea Ea/16
f ( 4 ) is the average 4th derivative
OSU/CSE 541
75
Example
x2
Integrate f ( x ) e from a = 0 to b = 2.
Use Simpsons 1/3 rule:
ba
h
1
2
2
I e
0
x2
x0 a 0
ab
x1
1
2
x2 b 2
1
dx h f x0 4 f ( x1 ) f x2
3
1
f 0 4 f (1) f 2
3
1 0
(e 4e 1 e 4 ) 0.82994
3
OSU/CSE 541
76
Example
Error estimate:
h5 4
Et
f
90
1 4
f
90
4
4
4
f
x
f
x
x2
0
1
1
90
3
5
OSU/CSE 541
77
Another Example
Lets look at the polynomial again:
f ( x ) 0.2 25 x 200 x 2 675 x 3 900 x 4 400 x 5
From a = 0 to b = 0.8
h
ba
0.4
2
x0 a 0
x1
ab
0.4
2
x2 b 0.8
1
I f ( x )dx h f x0 4 f ( x1 ) f x2
0
3
(0.4)
f 0 4 f ( 0 .4 ) f 0 .8
3
1.36746667
Exact integral is 1.64053334
2
OSU/CSE 541
78
Error
Actual Error: (using the known exact value)
E 1.64053334 - 1.36746667 0.27306666 16%
OSU/CSE 541
79
Error
Compute the fourth-derivative
f
(4)
Et Ea
( x ) 21600 48000 x
0.4 5
f
90
x1
0.4 5
f
90
0.4
0.27306667
middle point
OSU/CSE 541
80
Example Continued
If we use 4 segments instead of 1:
x = [0.0 0.2 0.4 0.6 0.8]
f (0) 0.2
f (0.2) 1.288
f (0.6) 3.464
f (0.8) 0.232
I b a
f x0 4
n 1
ba
0.2
n
f (0.4) 2.456
n 2
f x 2 f x f x
i 1, 3,5
j 2, 4,6
3n
f (0) 4 f (0.2) 2 f (0.4) 4 f (0.6) f (0.8)
0.8 0
(3)( 4)
0.2 4(1.288 3.464) 2( 2.456) 0.232
0.8
12
1.6234667
Exact integral is 1.64053334
OSU/CSE 541
81
Error
Actual Error: (using the known exact value)
E 1.64053334 - 1.6234667 0.01706667
1%
OSU/CSE 541
82
Error
Actual is twice the estimated, why?
Recall:
f
(4)
max
x 0,0.8
( 4)
( x ) 21600 48000 x
( 4)
( x)
( 4)
(0) 21600
(0.4) 2400
OSU/CSE 541
83
Error
Rather than estimate, we can bound the
absolute value of the error:
0.25 4
0.25 4
Ea
f
f 0 0.0768
90
90
OSU/CSE 541
84
OSU/CSE 541
85
I f x dx p3 x dx
x3
x3
x0
x0
OSU/CSE 541
86
OSU/CSE 541
87
Error
Same order as 1/3 Rule.
More function evaluations.
Interval width, h, is smaller.
3 5 4
Et h f
80
O(h 4 )
f 4 0
OSU/CSE 541
88
Comparison
Simpsons 1/3 rule and Simpsons 3/8 rule have the
same order of error
O(h4)
trapezoidal rule has an error of O(h2)
OSU/CSE 541
89
Mixing Techniques
n = 10 points 9 intervals
First 6 intervals - Simpsons 1/3
Last 3 intervals - Simpsons 3/8
Simpsons 1/3
Simpsons 3/8
March 24, 2015
OSU/CSE 541
90
Newton-Cotes Formulas
We can examine even higher-order
polynomials.
Simpsons 1/3 - 2nd order Lagrange (3 pts)
Simpsons 3/8 - 3rd order Lagrange (4 pts)
OSU/CSE 541
91
OSU/CSE 541
92
f x dx f a 4 f x1 f b
3
f x dx f a 4 f x1 2 f x2 4 f x3 f b
6
OSU/CSE 541
93
f x dx f a 4 f x1 f x2
6
f x2 4 f x3 f b
6
f x dx
, and
2
, where
2
ab
c x2
2
OSU/CSE 541
94
OSU/CSE 541
95
OSU/CSE 541
96
I f x dx S a, b E a, b , where
a
ba
S a, b
f a 4 f
6
1 b a
E a, b
90 2
March 24, 2015
a b
f b , and
2
OSU/CSE 541
97
S S a, b , E E a, b
1
S a , c S c, b
OSU/CSE 541
98
E a , c E c, b
1 h / 2
90 2
1
1
4
2
90
1 h / 2
90
2
1 1
E
16
OSU/CSE 541
99
I S
We have:
E E
E
2
15E
I S
March 24, 2015
1 2
1
S S
15
OSU/CSE 541
100
15
OSU/CSE 541
15
101
OSU/CSE 541
102
S 2 S1 15 subdivide
OSU/CSE 541
103
OSU/CSE 541
104
S 2 S1 15 subdivide
2
OSU/CSE 541
105
S 2 S1 15 done
4
I S2
1
S2 S1
15
OSU/CSE 541
106
S2 S1 15 subdivide
4
OSU/CSE 541
107
I S2
1
S2 S1
15
OSU/CSE 541
108
I S2
1
S2 S1
15
OSU/CSE 541
109
OSU/CSE 541
110
OSU/CSE 541
111
OSU/CSE 541
112
OSU/CSE 541
113
OSU/CSE 541
114
OSU/CSE 541
115
Guassian Quadrature
Idea is that if we evaluate the function at certain
points, and sum with certain weights, we will get a
more accurate integral
Evaluation points and weights are pre-computed
and tabulated
n
1
Basic form: I f ( x)dx c f ( x )
i
i
i 1
ci : weighting factors
xi : sampling points selected optimally
March 24, 2015
OSU/CSE 541
New!!
116
Guassian Quadrature
Note that the interval is between 1 and 1
For other intervals, a change of variables is used to
transfer the problem so that it utilizes the interval
[-1, 1]
This is a linear transform, such that for t[a,b]:
f (t )dt
OSU/CSE 541
2t b a
x
ba
117
Guassian Quadrature
As t = a x = -1
As t = b x = 1
(b a )
dt
dx
2
(b a ) x b a
f (t ) f
(b a ) 1 (b a ) x b a
f (t )dt
f
dx
1
2
2
OSU/CSE 541
118
Guassian Quadrature
Basic form of Gaussian quadrature:
n
I f ( x)dx ci f ( xi )
1
i 1
OSU/CSE 541
119
Guassian Quadrature
What we need now, are four known values
for the equation.
If we had these, we could then attempt to
solve for the four unknowns.
Lets make it work for polynomials!!!
OSU/CSE 541
120
Guassian Quadrature
In particular, lets look at these simple
polynomials:
Constant
f(x)=1
Linear
f(x)=x
Quadratic
f(x)=x2
Cubic
f(x)=x3
March 24, 2015
OSU/CSE 541
121
Guassian Quadrature
Recalling the formula: I c1 f x1 c2 f x2
Constant
f(x)=1
Linear
f(x)=x
Quadratic
f(x)=x2
Cubic
f(x)=x3
1dx 2
xdx 0
1
1
c1 f x1 c2 f x2 c1 c2
c1 f x1 c2 f x2 c1 x1 c2 x2
2
2
2
x
dx
c
f
x
c
f
x
c
x
c
x
1
1
2
2
1 1
2 2
1
3
1
x 3 dx 0 c1 f x1 c2 f x2 c1 x1 c2 x2
3
OSU/CSE 541
122
Guassian Quadrature
We can now solve for our unknowns:
Note, this is not an easy problem and will not be
covered in this class.
c1 c2 1
1
x1
0.577
3
1
x2
0.577
3
March 24, 2015
OSU/CSE 541
123
Guassian Quadrature
This yields the two point Gauss-Legendre
formula
1
1
I f
f
OSU/CSE 541
124
Guassian Quadrature
This is exact for all polynomials up to and
including degree 3 (cubics).
1
ax
1
a
3
bx cx d dx a x dx b x dx c xdx d dx
2
1
b
3
ax bx cxd
3
1
d 1 1
3
1
3
1
3
OSU/CSE 541
125
Guassian Quadrature
1
f(x)
f(-0.577)
f(0.577)
-1
March 24, 2015
-0.577
OSU/CSE 541
0.577
x
126
Example
Integrate f(x) from a = 0 to b = 0.8
f ( x ) 0.2 25 x 200 x 2 675 x 3 900 x 4 400 x 5
(b a ) 1 (b a ) x b a
f (t )dt
f
dx
1
2
2
0 .8
1
2
2
OSU/CSE 541
127
Example
Solving
I 0.4 f 0.4t 0.4 dt
1
0.4
1
dt
t 1 / 3
OSU/CSE 541
128
I f ( x)dx ci f ( xi )
1
i 1
OSU/CSE 541
129
1dx 2
1
1
xdx 0
1
c1 f x1 c2 f x2 c3 f x3 c1 c2 c3
c1 f x1 c2 f x2 c3 f x3 c1 x1 c2 x2 c3 x3
2
2
2
2
x
dx
c
f
x
c
f
x
c
f
x
c
x
c
x
c
x
1
1
2
2
3
3
1 1
2 2
3 3
1
3
1
x 3dx 0 c1 f x1 c2 f x2 c3 f x3 c1 x1 c2 x2 c3 x3
3
2
4
4
4
x
dx
c
f
x
c
f
x
c
f
x
c
x
c
x
c
x
1
1
2
2
3
3
1 1
2 2
3 3
1
5
1
x 5dx 0 c1 f x1 c2 f x2 c3 f x3 c1 x1 c2 x2 c3 x3
5
OSU/CSE 541
130
c2 8 / 9
x1 3 / 5 0.77459669
c3 5 / 9
x2 0
x2 3 / 5 0.77459669
I c1 f x1 c2 f x2 c3 f x3
OSU/CSE 541
131
f(-0.775)
-1
f(0)
-0.775
f(0.775)
0.775
OSU/CSE 541
x
1
132
Example
f ( x ) 0.2 25 x 200 x 2 675 x 3 900 x 4 400 x 5
0.8
f x dx
dt
OSU/CSE 541
133
Example
Using the 3-point Gauss-Legendre formula:
5
I
9
3 8
5
f 0
f
9
5
9
OSU/CSE 541
134
Gaussian Quadrature
Can develop higher order Gauss-Legendre forms
using
I c1 f x1 c2 f x2 ... cn f xn
Values for cs and xs are tabulated
Use the same transformation to map interval onto
[-1, 1]
March 24, 2015
OSU/CSE 541
135
I f ( x)dx c1 f x1 c2 f x2 ... cn f xn
1
n
ci
2
1.0
1.0
0.5555555556
0.8888888889
0.3478548451
0.6521451549
0.2369268850
0.4786286705
0.1713245
0.3607616
0.5555555556
0.6521451549
0.5688888889
0.4679139
0.3478548451
0.4786286705
0.2369268850
0.4679139
0.3607616
0.1713245
xi
0.5773502692
0.7745966692
0.8611363116
0.9061798459
0.932469514
0.5773502692
0.0000000000
0.3399810436
0.5384693101
0.661209386
0.7745966692
0.3399810436
0.0000000000
0.238619186
0.8611363116
0.5384693101
0.238619186
0.9061798459
0.661209386
OSU/CSE 541
0.932469514
136
Gaussian Quadrature
Requires function evaluations at nonuniformly spaced points within the
integration interval
not appropriate for cases where the function is
unknown
not suited for dealing with tabulated data that
appear in many engineering problems
OSU/CSE 541
137
Gaussian Quadrature
Problems:
If we add more data points, like doubling the
number of sample points.
OSU/CSE 541
138