Professional Documents
Culture Documents
a b
b N−1
b−a
Z X
f (x)dx = lim h f (a + ih), h=
a N→∞ N
i=0
Integral as area : The Riemann sum
a b
Z b
f (x)dx = lim h f (a) + f (a + h) + . . . + f (a + N − 1h)
a N→∞
Integral as area : Rectangular approximation
a b
Z b
f (x)dx ≈ h f (a) + f (a + h) + . . . + f (a + N − 1h)
a
Integral as area : Rectangular approximation
a b
Z b
f (x)dx ≈ h [f0 + f1 + . . . + fN−1 ] , fi ≡ f a + i − 1h
a
Integral as area : The (composite) Trapezoidal rule
a b
Z b
f0 + f1 f1 + f2 fN−1 + fN
f (x)dx ≈ h + + ... +
a 2 2 2
Integral as area : The (composite) Trapezoidal rule
a b
Z b
f (a) + f (b)
f (x)dx ≈ h + (f1 + f2 + . . . + fN−1 )
a 2
Integral as area : The (composite) Trapezoidal rule
a b
How can we do better?
Simpson’s one-third rule
To estimate the are under the curve passing
through (−h, f− ), (0, f0 ) and (+h, f+ )
f0
f−
f+
−h 0 +h
Simpson’s one-third rule
To estimate the are under the curve passing
through (−h, f− ), (0, f0 ) and (+h, f+ ) we
replace the curve by a parabola
y = a0 + a1 x + a2 x 2
f0
f−
f+
−h 0 +h
Simpson’s one-third rule
To estimate the are under the curve passing
through (−h, f− ), (0, f0 ) and (+h, f+ ) we
replace the curve by a parabola
y = a0 + a1 x + a2 x 2
f 0 = a0
f0
f−
f+
−h 0 +h
Simpson’s one-third rule
To estimate the are under the curve passing
through (−h, f− ), (0, f0 ) and (+h, f+ ) we
replace the curve by a parabola
y = a0 + a1 x + a2 x 2
f 0 = a0
f− = a0 − a1 h + a2 h2
f0
f−
f+
−h 0 +h
Simpson’s one-third rule
To estimate the are under the curve passing
through (−h, f− ), (0, f0 ) and (+h, f+ ) we
replace the curve by a parabola
y = a0 + a1 x + a2 x 2
f 0 = a0
f− = a0 − a1 h + a2 h2
f0
f+ = a0 + a1 h + a2 h2
f−
f+
−h 0 +h
Simpson’s one-third rule
To estimate the are under the curve passing
through (−h, f− ), (0, f0 ) and (+h, f+ ) we
replace the curve by a parabola
y = a0 + a1 x + a2 x 2
f 0 = a0
f− = a0 − a1 h + a2 h2
f0
f+ = a0 + a1 h + a2 h2
f− a0 = f0
f+ − f−
a1 =
2h
f+ f+ + f− − 2f0
a2 =
2h2
−h 0 +h
Simpson’s one-third rule
a0 = f0
f+ − f−
a1 =
2h
f+ + f− − 2f0
a2 =
2h2
f0
f−
f+
−h 0 +h
Simpson’s one-third rule
a0 = f0
f+ − f−
a1 =
2h
f+ + f− − 2f0
a2 =
2h2
Z h
a0 + a1 x + a2 x 2 dx
Area :
−h
f0
f−
f+
−h 0 +h
Simpson’s one-third rule
a0 = f0
f+ − f−
a1 =
2h
f+ + f− − 2f0
a2 =
2h2
Z h
a0 + a1 x + a2 x 2 dx
Area :
−h
f0
2
= 2a0 h + a2 h3
f− 3
f+
−h 0 +h
Simpson’s one-third rule
a0 = f0
f+ − f−
a1 =
2h
f+ + f− − 2f0
a2 =
2h2
Z h
a0 + a1 x + a2 x 2 dx
Area :
−h
f0
2
= 2a0 h + a2 h3
f− 3
f+ + f− − 2f0
= h 2f0 +
3
f+
−h 0 +h
Simpson’s one-third rule
a0 = f0
f+ − f−
a1 =
2h
f+ + f− − 2f0
a2 =
2h2
Z h
a0 + a1 x + a2 x 2 dx
Area :
−h
f0
2
= 2a0 h + a2 h3
f− 3
f+ + f− − 2f0
= h 2f0 +
3
f+ h
= (f+ + 4f0 + f− )
3
−h 0 +h
The composite Simpson one-third rule
a b
The composite Simpson one-third rule
a b
a b
Area
h
[(f0 + 4f1 + f2 ) + ... ]
3
The composite Simpson one-third rule
a b
Area
h
[(f0 + 4f1 + f2 ) + (f2 + 4f3 + f4 ) + . . . ]
3
The composite Simpson one-third rule
a b
Area
h
[(f0 + 4f1 + f2 ) + (f2 + 4f3 + f4 ) + . . . + (f2N−2 + 4f2N−1 + f2N ) ]
3
The composite Simpson one-third rule
a b
Rb
a f (x)dx
h
≈ [(f (a) + f (b)) + 4 (f1 + f3 + . . . + f2N−1 ) + 2 (f2 + f4 + . . . + f2N−2 )]
3
Newton-Cotes Quadrature Formulae
Z 1
√ ! √ !
3 3
f (x)dx ≈ f − +f
−1 3 3
Two point Gauss Quadrature : arbitrary interval
Z 1
√ ! √ !
3 3
f (x)dx ≈ f − +f
−1 3 3
Fine, but what about Z b
f (x)dx?
a
Two point Gauss Quadrature : arbitrary interval
Z 1
√ ! √ !
3 3
f (x)dx ≈ f − +f
−1 3 3
Fine, but what about Z b
f (x)dx?
a
Try
b+a b−a
x= + u
2 2
Two point Gauss Quadrature : arbitrary interval
Z 1
√ ! √ !
3 3
f (x)dx ≈ f − +f
−1 3 3
Fine, but what about Z b
f (x)dx?
a
Try
b+a b−a
x= + u
2 2
" √ ! √ !#
b−a b+a 3(b − a) b+a 3(b − a)
≈ f − +f +
2 2 6 2 6