calc 4.6

15
ESTIMATE DEFINITE INTEGRAL USING TRAPEZOIDAL RULE, SIMPSON’S RULE, AND THEN ANALYZING APPROXIMATE ERRORS WITH TRAPEZOIDAL OR SIMPSON’S 4.6 Numerical Integration

Upload: hartcher

Post on 28-Nov-2014

1.235 views

Category:

Technology


1 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Calc 4.6

ESTIMATE DEFINITE INTEGRAL USING TRAPEZOIDAL RULE, SIMPSON’S RULE, AND THEN

ANALYZING APPROXIMATE ERRORS WITH TRAPEZOIDAL OR SIMPSON’S

4.6 Numerical Integration

Page 2: Calc 4.6

Some elementary functions don’t have antiderivatives that are elementary functions.

For example,

If you need to evaluate a definite integral involving a function whose antiderivative cannot be found, you have to resort to approximation techniques.

Sometimes we are not even given the function, just a bunch of measurements. Then one of these new rules will be the way to go.

3 23 cos1 , cos , , 1 , sin

xx x x x x x

x

Page 3: Calc 4.6

The trapezoidal rule uses trapezoids to approximate area, which usually is a much more accurate approximation, even with just a few subintervals.

Notice that the height of the trapezoids will actually be Δx (horizontal) and bases will be the parallel f(xi) (vertical) on each side of the subinterval.

trapezoid

1 2A =2

b bh

Page 4: Calc 4.6

The area of the first trapezoid would be

0 1( ) ( )

2

f x f x b a

n

0 1 11 2( ) ( ) ( ) ( )( ) ( )

2 2 2n nf x f x f x f xf x f xb a

n

Area =

and then total area would be

Letting the number of trapezoids n approach infinity, you improve the approximation to the exact answer.

0 1 1 2 1lim ( ) ( ) ( ) ( ) ( ) ( )2 n n

n

b af x f x f x f x f x f x

n

Page 5: Calc 4.6

Observe that the coefficients are 1, 2, 2, 2, 2, . . . 2, 1

Page 6: Calc 4.6

Approximations with the Trapezoidal RuleUse the trapezoidal rule to approximate

0 1 2 1( ) 2 ( ) 2 ( ) 2 ( ) ( )2 n n

b af x f x f x f x f x

n

120 075 2(81) 2(84) 2(76) 2(67) 2(68) 2(69) 2(72) 2(68) 2(56) 2(42) 2(23) 0

2n

= ___________?

Page 7: Calc 4.6

Ex 1. p. 310 Approximating with the Trapezoidal RuleYou might want to program your calculator with the programs on these links. They are also available on my website.http://college.cengage.com/mathematics/larson/calculus_analytic/8e/students/gcp/ti_82_83_83plus.pdf for TI-83 or TI-84 programs for Simpson’s Rule, Midpoint Rule, Newton’s Method

http://college.cengage.com/mathematics/larson/calculus_analytic/8e/students/gcp/ti_86.pdf for TI-86 programs for Simpson’s Rule, Midpoint Rule, Newton’s Method.

Anybody want the challenge of programming the TI-86 to do a simultaneous TRAPSIMP? See me after work time begins.

Page 8: Calc 4.6

A way to see trapezoidal approximations is to say that we approximated f(x) by using a first-degree polynomial (a line) to approximate the graph for each subinterval.

Thomas Simpson (1710-1761) used second-degree polynomials (a section of a quadratic) to approximate the graph for each subinterval. Before we get into Simpson’s Rule, we need to list a theorem for evaluating integrals of polynomials of degree 2 or less. Proof on p. 311 if interested.

Page 9: Calc 4.6

To develop Simpson’s Rule, he partitioned the interval [a, b]into n subintervals, each of width ∆x = (b – a)/n.

This time n is required to be even, because each spans three values of x, for example, x0, x1, and x2 . You formulate a quadratic with the three points formed from the given x’s, then use Thm 4.17 and you get Simpson’s Rule

Notice the coefficients are 1, 4, 2, 4, . . . 2, 4, 1

Page 10: Calc 4.6

Ex. 1 & 2 p. 310 and 312 Approximations with Trapezoidal Rule and Simpson’s Rule

Unless you are given a problem like the first example we looked at, you would input f(x) into Y1, and then open programs to do the math for you. You probably should at least memorize the coefficient pattern and front expression for each rule.

For Trapezoidal rule, front expression is ___? Coefficient pattern is ___?

For Simpson’s rule, front expression is ___?Coefficient pattern is ___? 1, 4, 2, 4, . . . 2, 4, 1

(b – a)/(2n)

1, 2, 2, 2, 2, . . . 2, 1

(b – a)/(3n)

Page 11: Calc 4.6

Ex 1 & 2 p. 310, 312Use both the Trapezoidal Rule and Simpson’s Rule to find approximations for

0sin x dx

Then check your accuracy by finding the integral directly by calculator.

Page 12: Calc 4.6

Make sure you realize the limitations of your calculator. It doesn’t do any thinking for you, it just attempts to do what you ask of it.

Try finding with fnInt(1/x,x,-1,2)

What result did you get?

Why?

2

-1

1 dx

x

Page 13: Calc 4.6

These two expressions tell how much of an error you can expect to get using either the Trapezoidal Rule or Simpson’s Rule.

Page 14: Calc 4.6

Ex 3 p. 313 The Approximate Error in the Trapezoidal Rule

Determine a value of n such that the Trapezoidal Rule will be accurate to within 0.01 for 1 2

01+x dx

2( ) 1+xf x Notice that the error uses the absolute value of the max of f”(x) in [a, b]

12 2'( ) (1 )f x x x

32 2''( ) (1 )f x x

"( ) on interval occurs at x = 0Max f x3

2

( )E "(0)

12

b af

n

3

2

(1 0)E 1

12n

2

1

12n

2

1 1 12 100

Son

and n >2.89, and let n = 3 or more.

Page 15: Calc 4.6

p. 314/ 3-33 mult of 3, 51