24
MAT 4725 Numerical Analysis Section 2.1 The Bisection Method http://myhome.spu.edu/lauw

MAT 4725 Numerical Analysis Section 2.1 The Bisection Method

Embed Size (px)

Citation preview

Page 1: MAT 4725 Numerical Analysis Section 2.1 The Bisection Method

MAT 4725Numerical Analysis

Section 2.1

The Bisection Method

http://myhome.spu.edu/lauw

Page 2: MAT 4725 Numerical Analysis Section 2.1 The Bisection Method

MCM Teams

Any progress?

Page 3: MAT 4725 Numerical Analysis Section 2.1 The Bisection Method

Homework

Download the homework Read 2.2 (Burden)

• You may skip all the proofs unless specified

Page 4: MAT 4725 Numerical Analysis Section 2.1 The Bisection Method

Preview

Find the solutions of an equation in one variable.

Repeatly cut the intervals that contain the solution in half.

Page 5: MAT 4725 Numerical Analysis Section 2.1 The Bisection Method

Population Model 1

0

( )( )

( ) t

dN tN t

dt

N t N e

N(t) = size of a population = birth rate

Why?

Page 6: MAT 4725 Numerical Analysis Section 2.1 The Bisection Method

Population Model 2

0

( )( )

( ) ( 1)t t

dN tN t v

dtv

N t N e e

N(t) = size of a population = birth rate v =

Why?

Page 7: MAT 4725 Numerical Analysis Section 2.1 The Bisection Method

Population Model 2

435,0001,564,000 1,000,000 ( 1)e e

N0 = 1,000,000, N(1) = 1,564,000 = ??? v = 435,000

Page 8: MAT 4725 Numerical Analysis Section 2.1 The Bisection Method

Population Model 2

( ) 1,564,000P

We want to find = such that

435,000( ) 1,000,000 ( 1)P e e

Page 9: MAT 4725 Numerical Analysis Section 2.1 The Bisection Method

Population Model 2

( ) 1,564,000 0P

Page 10: MAT 4725 Numerical Analysis Section 2.1 The Bisection Method

In general

We want to find the solutions of a equation in one variable.

( ) 0f x

Page 11: MAT 4725 Numerical Analysis Section 2.1 The Bisection Method

IVT

Page 12: MAT 4725 Numerical Analysis Section 2.1 The Bisection Method

IVT: Special Case

Page 13: MAT 4725 Numerical Analysis Section 2.1 The Bisection Method

The Bisection Method

Idea

2 2 1 1, , ,n np a b a b a b

Page 14: MAT 4725 Numerical Analysis Section 2.1 The Bisection Method

Theorem 2.1

The bisection method generates a sequence {pn} approximating a zero p of f such that

for 12n n

b ap p n

Page 15: MAT 4725 Numerical Analysis Section 2.1 The Bisection Method

Theorem 2.1

The bisection method generates a sequence {pn} approximating a zero p of f such that

for 12n n

b ap p n

Thus, the method always converges to a solution

lim nn

p p

Page 16: MAT 4725 Numerical Analysis Section 2.1 The Bisection Method

Algorithm 2.1

Pseudo code (description) of the algorithm will be given.

Easy to translate it into a program

Page 17: MAT 4725 Numerical Analysis Section 2.1 The Bisection Method

Algorithm 2.1

Page 18: MAT 4725 Numerical Analysis Section 2.1 The Bisection Method

Example 13 2( ) 4 10, 1, 2f x x x a b

Page 19: MAT 4725 Numerical Analysis Section 2.1 The Bisection Method

Example 2 Theoretical Computations

Find the number of iterations n needed such that

3 2( ) 4 10, 1, 2f x x x a b

310np p

2n n

b ap p

Page 20: MAT 4725 Numerical Analysis Section 2.1 The Bisection Method

Classwork 1

Write a program to implement the bisection algorithm.

Page 21: MAT 4725 Numerical Analysis Section 2.1 The Bisection Method

Remark #1

Bisect:=proc(f, aa , bb, tol, N0) local i, p, a, b, FA, FP;

a:=aa; b:=bb;

The function f is passed into the procedure, not the expression f(x)

Page 22: MAT 4725 Numerical Analysis Section 2.1 The Bisection Method

Remark #2

Bisect:=proc(f, aa , bb, tol, N0) local i, p, a, b, FA, FP;

a:=aa; b:=bb;

The values of the parameters passed into a procedure cannot be changed

Page 23: MAT 4725 Numerical Analysis Section 2.1 The Bisection Method

Remark #3

Use return() to stop the program

Page 24: MAT 4725 Numerical Analysis Section 2.1 The Bisection Method

Homework

From now on… Use the Maple program in your

classwork to do all the computations Use Maple to plot all the graphs