Docsity

Approximating Definite Integrals with Trapezoidal Rule and Simpson's Rule, Study notes of Calculus

Toggle sidebar
bg1
Numerical Integration
Section 5.9
Some elementary functions do NOT have antiderivatives that are elementary functions. Hence, if we need
to integrate such a function over some interval, the Evaluation Theorem is of no use. The only recourse is to
use the limit definition directly (usually even this is not feasible) or to approximate the value of the integral.
So far we have looked at approximating definite integrals with rectangles (right (Rn), left (Ln), and midpoints
(Mn)). Now we look at approximating trapezoids (The Trapezoidal Rule) and approximating quadratic
functions (Simpson’s Rule).
THE TRAPEZOIDAL RULE
a
bfxdx ≈TnΔx
2fx02fx12fx22fxn−1fxn
where
Δxb−a
nand xiaiΔx
NotethepatternofthecoefficientsintheTrapezoidalRule:1222221.
Use the Trapezoidal Rule to approximate
1.1
23
xdx with n5
Note that we could have evaluated this integral with the Evaluation Theorem:
1
23
xdx 3lnx|1
23ln2 −3ln1 3ln2 ≈2.07944154
How does this compare with your estimate above?
2.2
3ex
xdx with n4
SIMPSON’S RULE
a
bfxdx ≈SnΔx
3fx04fx12fx24fx32fxn−24fxn−1fxn
where nis EVEN and
Δxb−a
nand xiaiΔx
Notethepatternofthecoefficients:14244241.
3. Use the Simpson’s Rule to approximate 1
23
xdx with n6
pf3

Partial preview of the text

Download Approximating Definite Integrals with Trapezoidal Rule and Simpson's Rule and more Study notes Calculus in PDF only on Docsity!

Numerical Integration Section 5. Some elementary functions do NOT have antiderivatives that are elementary functions. Hence, if we need to integrate such a function over some interval, the Evaluation Theorem is of no use. The only recourse is to

use the limit definition directly (usually even this is not feasible) or to approximate the value of the integral.

So far we have looked at approximating definite integrals with rectangles (right ( R (^) n ), left ( L (^) n ), and midpoints

( M (^) n )). Now we look at approximating trapezoids (The Trapezoidal Rule) and approximating quadratic functions (Simpson’s Rule).

THE TRAPEZOIDAL RULE

a

b fxdx ≈ T (^) n  Δ x 2

fx 0   2 fx 1   2 fx 2     2 fx (^) n − 1   fx (^) n 

where

Δ xb^ − n^ a and x (^) iai Δ x

Note the pattern of the coefficients in the Trapezoidal Rule: 1 2 2 2  2 2 1.

Use the Trapezoidal Rule to approximate

1

x dx^ with^ n^ ^5

Note that we could have evaluated this integral with the Evaluation Theorem:

1

2 3 x dx^ ^ 3 ln^ x |^1

(^2)  3 ln 2 − 3 ln 1  3 ln 2 ≈ 2. 07944154

How does this compare with your estimate above?

2

(^3) e x x dx^ with^ n^ ^4

SIMPSON ’ S RULE

a

b fxdx ≈ S (^) n  Δ x 3

fx 0   4 fx 1   2 fx 2   4 fx 3     2 fx (^) n − 2   4 fx (^) n − 1   fx (^) n 

where n is EVEN and

Δ xb^ − n^ a and x (^) iai Δ x

Note the pattern of the coefficients: 1 4 2 4 4 2 4 1.

3. Use the Simpson’s Rule to approximate 

1

x dx^ with^ n^ ^6

Answer to # 1 Use Trapezoidal Rule with n  5 to approximate 

1

x dx.

Δ x  2 −^1 5

Thus

1

2 3 x dx^ ≈^ T^5 ^

f  1   2 f 1. 2  2 f 1. 4  2 f 1. 6  2 f 1. 8  f  2 

Answer to # 2 Use Trapezoidal Rule with n  4 to approximate 

2

(^3) e x x dx.

Δ x  3 −^2 4

Thus

2

3 e x x dx^ ≈^ T^4 ^

f  2   2 f 2. 25  2 f 2. 5  2 f 2. 75  f  3 

 0. 125 e

2 2

 2 e

  1. 25

 2 e

  1. 5

 2 e

  1. 75

e

3 3 ≈ 4. 99321309

With TI-83/85/86: 4.

Answer to # 3 Use the Simpson’s Rule with n  6 to approximate 

1

x dx Δ x  2 −^1 6

and

x 0  1 x 1  1  16  76 x 2  1  2 16  86  (^43)

x 3  1  3 16  96  32 x 4  1  4 16  106  (^53)

x 5  1  5 16  116 x 6  1  6 16  2

Thus

1

2 3 x dx^ ≈^ S^6 ^

f  1   4 f^7 6

 2 f^4 3

 4 f^3 2

 2 f^5 3

 4 f^11 6

f  2 