24
MAT 1235 Calculus II Section 7.7 Approximate (Numerical) Integration http://myhome.spu.edu/lauw

MAT 1235 Calculus II Section 7.7 Approximate (Numerical) Integration

Embed Size (px)

Citation preview

MAT 1235Calculus II

Section 7.7

Approximate (Numerical) Integration

http://myhome.spu.edu/lauw

HW and …

No WebAssign Do problem # 20-22 (c). No need to turn

in. Answers

• 20) 83, 59

• 22) 20

Idea

Many useful Integrals are difficult/impossible to evaluate by the Fundamental Theorem of Calculus

21 1

2

0

xe dx

Probability & Statistics

21

2

( , )

1( )

2

xb

a

X N

P a X b e dx

a b

Idea

In practice, we estimate the values of these integrals.

Method I: Riemann Sum

Method II: Trapezoidal Rule

Method III: Simpson’s Rule

Parabolas

Method III: Simpson’s Rule

Parabolas

Even Number of Intervals

Facts

In the last lab, we learn different methods of estimating the value of definite integrals.

In general, given a method, bigger n gives better approximation.

We want to find the smallest n such that

|Error|<certain accuracy Why?

Facts

In the last lab, we learn different methods of estimating the value of definite integrals.

In general, given a method, bigger n gives better approximation.

We want to find the smallest n such that

|Error|<certain accuracyIn general, we do not know the error. Why?

Rules Midpoint Rule

• Rectangles

• Height of rectangle = function value of the midpoint of each subinterval

Trapezoidal Rule• Trapezoids

Simpson’s Rule• Parabolas

• n = even

Error Bounds - Trapezoidal Rule

3

2

Consider the integral ( )

Suppose for

Let error in the Trapezoidal Rule

Then,

( )

1

(

2

)

b

a

T

T

f x K a x b

f x dx

E

K b aE

n

Error Bounds - Trapezoidal Rule

3

2

Consider the integral ( )

Suppose for

Let error in the Trapezoidal Rule

Then,

( )

1

(

2

)

b

a

T

T

f x K a x b

f x dx

E

K b aE

n

??????

Example 1

How large should we take n in order to guarantee that the trapezoidal rule approximation for

is accurate to within 0.0001?

2

3

12

)(

n

abKET

2

12

1dx

x

Example 1: Analysis

We want to find the smallest n such that

If so, then

2

12

1dx

x ?? ,1

)( ,2 ,12

Kx

xfba

2

3

12

)(

n

abKET

Example 1: Analysis

Once we find K, n is computed by solving the inequality

2

3

12

)(

n

abKET

Example 1: Find K 2

3

12

)(

n

abKET

2

1 ( ) , ??f x K

x

( ) for 1 2f x K x

We need to find the abs. max. of

on [1,2]

( )f x

Abs. Max. of |h(x)|

FACT: The abs. max. of |h(x)| occurs at the abs. max. or min. of h(x).

( )h x

x

Modified Closed Interval Method

Abs. max. of |h(x)| occurs at the end points or critical numbers of h(x).

( )h x

x

Step 1: Find K 2

3

12

)(

n

abKET

2

1 ( ) , ( ) , ( )f x f x f x

x

Let , then ( ) ( )h x f x ( )h x

Step 2: Find n 2

3

12

)(

n

abKET

3

2

( ) 0.0001

12

K b a

n

Example 1:2

3

12

)(

n

abKET

Q: Can we choose a bigger K?

( ) 6

7?

f x

K

Remarks

We are solving for inequalities, not equations The n here is not necessarily the actual

minimum. It is the minimum guaranteed by the error formula.

Error bounds for midpoint and Simpson’s rule are similar.

YES, you need to know the formulas for quizzes and exams.