mat 4725 numerical analysis section 2.1 the bisection method
Post on 21-Jan-2016
253 Views
Preview:
TRANSCRIPT
MAT 4725Numerical Analysis
Section 2.1
The Bisection Method
http://myhome.spu.edu/lauw
MCM Teams
Any progress?
Homework
Download the homework Read 2.2 (Burden)
• You may skip all the proofs unless specified
Preview
Find the solutions of an equation in one variable.
Repeatly cut the intervals that contain the solution in half.
Population Model 1
0
( )( )
( ) t
dN tN t
dt
N t N e
N(t) = size of a population = birth rate
Why?
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?
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
Population Model 2
( ) 1,564,000P
We want to find = such that
435,000( ) 1,000,000 ( 1)P e e
Population Model 2
( ) 1,564,000 0P
In general
We want to find the solutions of a equation in one variable.
( ) 0f x
IVT
IVT: Special Case
The Bisection Method
Idea
2 2 1 1, , ,n np a b a b a b
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
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
Algorithm 2.1
Pseudo code (description) of the algorithm will be given.
Easy to translate it into a program
Algorithm 2.1
Example 13 2( ) 4 10, 1, 2f x x x a b
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
Classwork 1
Write a program to implement the bisection algorithm.
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)
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
Remark #3
Use return() to stop the program
Homework
From now on… Use the Maple program in your
classwork to do all the computations Use Maple to plot all the graphs
top related