04.08.2020 Views

Notes on Netwon's and Bisection Method

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Tarek hajj shehadi

MATH 251 : Chapter II

I) Introduction

‣ Consider an interval ( a, b).

‣ Consider some graph y = f(x), we want to find the value of x such that the graph

y = f(x) intersects the x − axis between the interval ( a, b) at a point we’ve been

looking for which is :

x = r

‣ This interval ( a, b), must satisfy the following properties :

• f(x) is continuous over (a, b).

f(a)

• r ∈ (a, b)

• f(a) × f(b) < 0

‣ Our goal is to find a sequence of roots :

{r 1 , r 2 , … r n }

Such that all these roots lie between interval (a, b).

a

f(b)

<

b

‣ All these roots are found recursively until we have that lim

n→∞

r n = r

‣ r n depends on all of r 1 ⟶ r n−1 .

When n is large, the distance

between r n and r is very close


I) The Bisection Method

‣ The Bisection Method is a method in which the interval ( a, b) gets reduced into half its

size whenever an r i ; 1 ≤ i ≤ n is found and the interval keeps getting reduced in size

until we obtain an accurate approximation of the desired root r.

‣ Step 1 : Let us rename ( a, b) as ( a 0 , b 0 ) .Find r 1 = a 0+b 0

.

‣ Step 2 : Let y = f(r 1 ) . If :

• y = f(r 1 ) = 0 , we are done and r = r 0 .

• f(r 1 ) ∗ f(a 0 ) < 0 , then r ∈ (a 0 , r 1 ) we name it as (a 1 , b 1 ).

• f(r 1 ) ∗ f(a 0 ) > 0 , then r ∈ (r 1 , b 0 ) we name it as (a 1 , b 1 ).

2

f(a 0 )

f(r 1 )

b 0

a 0

_

0

r 1

_

0

r is obviously between r 1 and b 0

f(b 0 )

<

The new interval obtained (a 1 , b 1 ) is half the size of previous (initial) interval ( a 0 , b 0 ) :

b 1 − a 1 = 1 2 (b 0 − a 0 ) and ȁr − r 1 ȁ < (b 1 − a 1 ):

The process is repeated as many times as possible until r n ∈ ( a n , b n ) get a good approximation

b n − a n = 1 (b 2 n 0 − a 0 ) and r n = a n−1+b n−1

2


‣ Theorem : For any recursively defined relation, the order of convergence (how fast we

reach the desired answer) is given by :

a

t n ≤ Ct n−1

• If a = 1, the convergence is said to be linear (very slow)

• If a > 1, the convergence is said to be super linear.

As for the Bisection method, we know that b n − a n ≤ 1 2 (b n−1 − a n−1 ). Let t n = b n − a n , then

we can say that t n−1 = b n−1 − a n−1 .

t n ≤ 1 2 t n−1

C = 1 2 ; a = 1

Therefore, we conclude that the order of convergence of the Bisection algorithm is linear.

very slow convergence

‣ The minimum number of iterations needed to reach the required tolerance is :

Where p is the precision.

k = ⌈(p − 1) log 2 (10) + 1⌉

• Ex : Find the root of f(x) = ln(1 + x) − 1

x+1

; for p = 3

‣ Step 1 : Find two points for which the root is located between them.

We look at domain, x > −1 , so the first integer belong to this domain is x = 0, we compute

f(0), we get f(0) = −1 < 0. We now look at the next integer which is x = 1, we get for

f(1), f(1) = ln(2) − 1 > 0. Notice how f(0) and f(1) are located above and below x axis,

2

respectively. Therefore, the root is located in between (0,1).


‣ Step 2 : Find r 1 = a 0+b 0

.

2

‣ Step 3 : Find the sign of f(r 1 ) ∗ f(a 0 ).

r 1 = 0 + 1

2

= 1 2

f(r 1 ) ∗ f(a 0 ) = f(0) ∗ f ൬ 1 2 ൰ = + ⋯ > 0

‣ Step 4 : Since f(r 1 ) ∗ f(a 0 ) > 0 , then r ∈ (r 1 , b 0 ) we name it as (a 1 , b 1 ). So, the

interval becomes ቀ 1 2 , 1ቁ.

‣ Step 5 : Repeat Step 2

r 2 = 1 + 1 2

2

‣ Step 5 : Repeat Step 3 and so on… it is better to use the formula for number of

iterations for a given precision to know how many times you have to iterate.

= 3 4

II) Newton’s Method

‣ Newton’s Method is a method in which the interval ( a, b) has the desired root in

between and so what we do is take the function y = f(x), draw its tangent at any

point such that this point has an abscissa located between ( a, b) and then intersecting

it with the x − axis.

‣ Again, we seek to find a recursive relation :

r n = r n−1 − f(r n−1)

f ′ (r n−1 )

• Ex : Find the root of f(x) = ln(1 + x) − 1

x+1

; for p = 3

‣ Step 1 : Find two points for which the root is located between them.


We look at domain, x > −1 , so the first integer belong to this domain is x = 0, we compute

f(0), we get f(0) = −1 < 0. We now look at the next integer which is x = 1, we get for f(1),

f(1) = ln(2) − 1 > 0. Notice how f(0) and f(1) are located above and below x axis,

2

respectively. Therefore, the root is located in between (0,1).

‣ Step 2 : Let r 0 = 0.1

r 2 = r 1 − f(r 1)

f ′ (r 1 )

r 3 = r 2 − f(r 2)

f ′ (r 2 )

r 3 = r 2 − f(r 2)

f ′ (r 2 )

r 1 = r 0 − f(r 0)

f ′ (r 0 )

1.1

= 0.1 − [ln(1.1) − 1] = 0.4787

2.1

1.4787

= 0.4787 − [1.4787 ln(1.4787) − 1] = 0.7302

2.4787

1.7302

= 0.7302 − [1.7302 ln(1.7302) − 1] = 0.7628

2.7302

1.7628

= 0.7628 − [1.7628ln(1.7628) − 1] = 0.7632

2.7628

r 4 = r 3 − f(r 3)

f ′ (r 3 )

1.7632

= 0.7632 − [1.7632 ln(1.7632) − 1] = 0.7632

2.7632

‣ Note : a combination of Bisection Method and Newton’s Method can make

approximation of a root much faster

‣ A fast-iterative method to approximate x = √d would be :

r n+1 = (3 − r n 2

d ) r n

2

‣ The root must be located on the open interval ( 0, √3d).

‣ This is useful when asked to compute the square root of an IEEE S.P.R.

√(x) 2 = √m ∗ 2 e = m ′ ∗ 2 e′

‣ Let e = 2k : √(x) 2 = √m ∗ 2 2k = 2 k ∗ √m ; 1 ≤ √m < √2

‣ Let e = 2k + 1 : √(x) 2 = √m ∗ 2 2k+1 = 2 k ∗ √2m ; 1 ≤ √2m ≤ 2

‣ Always start with r 0 = 1, to find the mantissa √m or √2m refer to formula of x = √d

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!