You are on page 1of 16

Bisection Algorithm

Ex.1 f (=)= x- Be+ 1 in the interval


[o,a) ?
f (<) is
continuous ono,
Test f (o),F4)
f(a)= 13(a)4 1: 3 o f (o)
Assummptions are not satisfied
Bisection method can not be. used
IEx. f() - 3 B+1 in the interval o,1| ?
f()is continuous on o,1
Test f (o) (1)

f(1) =1-3(1)1:1-341:1<o
f (o).f (2)

* ¬o, 1]
o.5 1

first o+1- 1 o.5


iteration C: Estimate of the Zero
f(Ca) f (o-5) <o b-a : o.5
Error
<* E o, o.5] o C o.5
Second Cs0.5 4 o
iteration b-a 1

Convergence Analysis

n log (b-a) -log (e


log (a)

Ex: slide ;5
Fixed point Method
IDef: Afixed point of a function a () is a
Such that ac) =&. number

Ex: 1. Find the fixed point of a()= 3z41

a. show that a=-1 is the fixed pt ofa(a).


Sol: 1. solve for , a()= xe
3c 41=
+ 3*41

be :1 fixed pt
(Multiphcity a
g-) = (-4)* + 3-1) 4+ 1
: 1-3+ 1
:1
Def (Fixed pt iteration): The iteration +i :: g(*)
is called fixed pt iteration

For :
K :

Note: it n Lu+1

then

g() (a)
continuous

if converges to .ax, then & is a fixed pt of a()


and I g()
Ex: Let a() =ee- t
Find the first 1o fixed pts iterations with o.5.
Conclude.?
Sol: xo:0.5

(co) = a (o.5) = e-o.5 - o.6o6 53


*1= 9

*3=ga) a (o. 5452): o. 579to3

C, § ():a (o. 5}3+o3) o. 56

so. 56
o. 56 486
x :o.56 843
o. 566L o o. 567 a(o.5b+)
8
Cg o. 56 +5 o.564 tixed point =
C1o o. 5669

1. when n+1 = K for some K.


stopping
in this case, we reach the exact,fixed point,.

2. Stop at a fixed iteration


3. Stop it the approximate error

x1 oo . is Smallest than the


CK+1 tolarance error
Ex: use fixed. point iteration: g(): 14a -
with c, = - . o5 and conclude.

C1 a(xa): g-2.o5):.1oo625

Ia:g(*) =a (-2.loo 615)=2. Ao3+8


3-(xs) a(-2.lo 3t8) =.-2.44734

(not converge)
we can't use tixed pt

whywe treat fixed pt ot a() a (*) =


Relation problem Solve f():o ?
-* Our general
then the roots ot f( ) are the same
if f(e): g()
as the fixed point of g ()
8 () - x
Let f() : x²+2x+1. find a)
f (a)o + 1:-ra

+1=o
dx:1
* f(o)=
fixed pt ot a
1
g()

week 3

Ex.l: use the fixed pt method to estimate the


root ot (3e) = - coS starting with o = o.5
perfoorm 5 iterations and give the error Ea

3()=

Solution: (c) = Cos c


8( )
1 For k :Lo: *1 =8( ) g (o.5) : Cos (o.5):o.81758

For k: 1: <a-: a(): ao.8tt58) = o. 63 lo12


3.For K-à: c3c : 9(*a) = cos (*a) : o. Bo26 85
y. For. Ka3;x4: a(x3) : cos(*3): o. 694, 77

5.For k:4: *s: a(eu): cos (zu) : o. t6819


After 5 iterations :

x 100 9.55 %

Fixed point theorem

Assume that q is continuous on a,b

has a
|1. it g(*) ¬a,bj(ag(*) bthen g(*)
fixed pt on fa,b.

|2.if a'()k(1 ¬a,b) thenK+1 =a(K)


converges to the unique fixed pt : a ( )
3. if 1g'3)| > 1 Yx E[a, b), then k+t di verges
Remark: f(6) fis increasina
f()o
b
max f(x) :f(b)

In aeneral : if Ci are critical pt of f


((Ci) zo or undefined)
’max t ( ) : max
f(a),f(3),f (c:).

Ex: Let a()=Cos on o,1]


Show that 7 : a(x) Converges to a fixed pti.

<a() 1 :(g(*) ¬[o, 4] )


a()= Cos a(): - Sin o

Cos (4) s(*) Cos (o)


o.54
Sin

maxg) Sin (1) o.8 1.


by fixed point theorem, Kt1: a(x4)
Converges to aa fixed pt a:g(ã)
|Ex: Show that g(*) :2* has a unique fixed pt
on
[/3 .1
(am)': a-.Jn a

8 s (4) <a() 3(13)


1/2a()o.934

s() ¬ [/3 1) has fixed pt


Hw)Ex: (z)=ztx+2 on o,1]

1Show that f()=oifix:(z4)

2. Let g(*) :(z2)


'+a)
Determine the fixed pt of
3. Let xy g(x-1)
Show that on [o,1].

L. Give the first three iterations a3s uming o i o.1

Theorem(bound and nb of iterations:

it g() has a unique fixed pt , then the bounds


tor the error is
is given byi
n:1
nb of iterations

fixed pt

Most probably k: max a ()


Ex: Let a()I+ o.5sin on o, T
1o-2
Estimate the nb of iterations needed to achieve
accurancy with o 1 .

D))
Sol: Find nfor which KxË- o K o, o1

8 ) : o.5cos x a'
tË ? 8():-o.5sin
max

Let h: o.5 1 J(")


:T4 o.5 sin (o)

(o.5) Jo.I|o.o1
o.5
o.5 o.o1
n (o5o. o1 ) nno.5) In o.5
(o.5)"
(o.5 o.01)
in
:9.42
In(o.5)
n:1o

(Hw) Ex: 1. Show that a) 31(5-3)2 has a unique


fixed pt in [o, 11.
a. Show that znti: 9(xn) 1S convergent to the
fixed pt
3. Find 3
L Deter mine the nb of iterations needed to achieve
an approxim ation with accurancy Lo-. use sco =1

Newton's Raphson Method

root

3C1

Look at the fiqure: the intersectibn between the


tangent line at (co, f(x)) and xo axis qzo is the
First approximation of Newton Method.

f(o)

proof: - f ) : m(a
: f'().(x-x). let
find c: fC*)
f'() )

f(r)
Ex: Estimate the root of.f() =e- using o.5
with Ea:1o-5
F'(x): -e-*1
|For K:1: f(3c)
: o.5f(o.5)
F(o-5)
:o.566311..

: 1161

For KzA

o5671L3..

For K=3: f(a) 2o.5671; ...


f(a)
:o. 56t14 .. 1root
For K=L:

Secant Method

f'(x): f(an) f(aK-1)

¢(c*):xK
f'(K)
Ex: Estimate the root of f()= e- * using x:o
4
and to o.5Ea o.5
USe secant method I

f(u)-f (o%-1)
(c1-co
.(a)
f() -f (c)
:o(-o.5) .fo): o.55361
f(o)- f(os)
C3: o.56to..
C4: o.5671
apprtoximmate solution
EL: o.oi6%o.5 %
Ex: Approximate by using Newton and secant
method with Ea: 5%

You might also like