21.06.2014 Views

Numerical Methods Contents - SAM

Numerical Methods Contents - SAM

Numerical Methods Contents - SAM

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Termination criterion for contractive fixed point iteration, c.f. (3.2.3), with contraction factor 0 ≤ L < 1:<br />

3.3.1 Bisection<br />

∥<br />

∥x (k+m) − x (k)∥ ∥<br />

△-ineq.<br />

k+m−1 ∑<br />

∥<br />

≤ ∥x (j+1) − x (j)∥ k+m−1<br />

∥<br />

∑ ∥ ≤ L j−k ∥x (k+1) − x (k)∥ ∥ j=k<br />

j=k<br />

= 1 − Lm<br />

∥<br />

∥x (k+1) − x (k)∥ ∥ 1 − L m ∥ ≤<br />

1 − L<br />

1 − L Lk−l ∥x (l+1) − x (l)∥ ∥ .<br />

hence for m → ∞, with x ∗ := lim<br />

k→∞ x(k) :<br />

Idea: use ordering of real numbers & intermediate value theorem<br />

F(x)<br />

Input: a,b ∈ I such that F(a)F(b) < 0<br />

(different signs !)<br />

⇒<br />

∃ x∗ ∈] min{a,b}, max{a,b}[:<br />

x ∗<br />

F(x ∗ ) = 0 .<br />

a<br />

b<br />

x<br />

∥<br />

∥x ∗ − x (k)∥ ∥ L k−l<br />

∥<br />

≤ ∥x (l+1) − x (l)∥ ∥ . (3.2.5)<br />

1 − L<br />

Algorithm 3.3.1 (Bisection method).<br />

Fig. 34<br />

Ôº¾¿ ¿º¾<br />

Ôº¾ ¿º¿<br />

Set l = 0 in (3.2.5)<br />

Set l = k − 1 in (3.2.5)<br />

a priori termination criterion<br />

a posteriori termination criterion<br />

∥<br />

∥x ∗ − x (k)∥ ∥ L k<br />

∥<br />

≤ ∥x (1) − x (0)∥ ∥ ∥<br />

(3.2.6) ∥x ∗ − x (k)∥ ∥ L<br />

∥<br />

≤ ∥x (k) − x (k−1)∥ ∥ 1 − L<br />

1 − L<br />

(3.2.7)<br />

3.3 Zero Finding<br />

△<br />

MATLAB-CODE: bisection method<br />

function x = bisect( F ,a,b,tol)<br />

% Searching zero by bisection<br />

if (a>b), t=a; a=b; b=t; end;<br />

fa = F(a); fb = F(b);<br />

if (fa*fb>0)<br />

error(’f(a), f(b) same sign’); end;<br />

if (fa > 0), v=-1; else v = 1; end<br />

x = 0.5*(b+a);<br />

while((b-a > tol) & ((a

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

Saved successfully!

Ooh no, something went wrong!