Bisection Method of analysis, Thesis of Mathematical Methods for Numerical Analysis and Optimization

Numerical Analysis and engineering

Typology: Thesis

2017/2018

Uploaded on 03/26/2018

muhammad-muqeet
muhammad-muqeet 🇵🇰

3

(1)

1 document

1 / 10

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
BISECTION METHOD
Root-Finding Problem
Given computable f(x)C[a, b], problem is to find
for x[a, b] a solution to
f(x)=0.
Solution rwith f(r) = 0 is root or zero of f.
Maybe more than one solution; rearrangement some-
times needed: x2= sin(x) + 0.5.
Bisection Algorithm
Input: computable f(x) and [a, b], accuracy level .
Initialization:
find [a1, b1][a, b], with f(a1)f(b1)<0, set i= 1.
Basic Bisection Algorithm:
1. Set ri= (ai+bi)/2;
2. If f(ai)f(ri)<0, set bi+1 =ri,ai+1 =ai;
otherwise, set ai+1 =ri,bi+1 =bi;
3. If (bi+1 ai+1)/2> , set i=i+ 1 and go to step 1
4. Stop with r(bi+1 +ai+1)/2.
Notes:
careful algorithm checks for f(ri) = 0, limits i;
other stopping conditions possible, e.g. |f(ri)|< .
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Bisection Method of analysis and more Thesis Mathematical Methods for Numerical Analysis and Optimization in PDF only on Docsity!

BISECTION METHOD

Root-Finding Problem

  • Given computable f (x) ∈ C[a, b], problem is to find for x ∈ [a, b] a solution to f (x) = 0.
  • Solution r with f (r) = 0 is root or zero of f.
  • Maybe more than one solution; rearrangement some- times needed: x^2 = sin(x) + 0.5.

Bisection Algorithm

  • Input: computable f (x) and [a, b], accuracy level .
  • Initialization: find [a 1 , b 1 ] ⊂ [a, b], with f (a 1 )f (b 1 ) < 0, set i = 1.
  • Basic Bisection Algorithm:
    1. Set ri = (ai + bi)/2;
    2. If f (ai)f (ri) < 0, set bi+1 = ri, ai+1 = ai; otherwise, set ai+1 = ri, bi+1 = bi;
    3. If (bi+1 − ai+1)/ 2 > , set i = i + 1 and go to step 1
    4. Stop with r ≈ (bi+1 + ai+1)/2. Notes: careful algorithm checks for f (ri) = 0, limits i; other stopping conditions possible, e.g. |f (ri)| < .

−1 −0.5 0 0.5 1 1.5 2

−0.

0

1

2

x

x^2 −sin(x)−.

BISECTION METHOD CONTINUED

Bisection Method Analysis

  • Convergence:
  • Steps needed for absolute error ?
  • Summary: simple method with slow (linear) but guarenteed convergence; size of f (rn) is not used.

FIXED POINT-ITERATION METHODS

Background

  • Terminology: given g ∈ C[a, b] a fixed point r for g(x) is a point where r = g(r).
  • Relation to rootfinding: given g(x), a fixed point for g(x) is root of f (x) = x − g(x); given f (x), a root of f (x) is a fixed point for g(x) = x − f (x).
  • Fixed points from graphs: a fixed point exists if the graph y = x crosses the graph y = g(x). Example: g(x) = cos(x):

−3−3 −2 −1 0 1 2 3

0

1

2

3 y = x and y = cos(x)

(^11) 1.2 1.4 1.6 1.8 2 2.2 2.4 2.6 2.8 3

2

3

4

5

6

7 y=x and y=2/x+5/x

2

(^11) 1.2 1.4 1.6 1.8 2 2.2 2.4 2.6 2.8 3

2

3 y=x and y=(2*x+5)

1/

FIXED-POINT METHODS CONTINUED

  • Another example: x^2 −sin(x) = 0.5, with root in [0, 2]. Some possible rearrangments: a) x = (sin(x) + .5)/x has [g(0), g(2)] → [. 7 , ∞); b) x =

√ sin(x) + .5 has [g(0), g(2)] ⊂ [. 70 , 1 .19]. Fixed-Point Iterations: i a) b) 0 2 2 1 0.70465 1. 2 1.6288 1. 3 0.91986 1. 4 1.4084 1. 5 1.0557 1. 6 1.2979 1. 7 1.1272 1. Another solution in [− 1 , 0]? [ga(−.5), ga(0)] ⊂ [−. 05 , ∞), [gb(−.5), gb(0)] ⊂ [0, .71]. c) x = sin−^1 (x^2 − .5), has [g(−.5), g(0)] ⊂ [−. 53 , .53]. Fixed-Point Iterations: i a) b) c) 0 -0.5 -0.5 -0. 1 -0.04115 0.14344 -0. 2 -11.151 0.80184 -0. 3 -0.13343 1.1039 -0. 4 -2.7503 1.1802 -0. 5 -0.04312 1.1936 -0. 6 -10.596 1.1957 -0. 7 -0.13413 1.1960 -0.

FP METHODS ANALYSIS CONTINUED

Fixed Point Theorem: if g ∈ C[a, b], g(x) ∈ [a, b] and |g′(x)| ≤ k < 1 for x ∈ (a, b), then for any r 0 ∈ [a, b], rn = g(rn− 1 ) converges to a unique fixed point r ∈ [a, b]. Proof: consider |rn − r| = |g(rn− 1 ) − g(r)|

Corollary: given same conditions on g(x), |rn − r| ≤ kn^ max{r 0 − a, b − r 0 }, |rn − r| ≤ kn^ |r 11 −−kr^0 |. Proof: consider k|r − r 0 | = |(r 1 − r 0 ) + (r − r 1 )|

Notes: a) Linear convergence: if ei is the error at each step i, and

ilim→∞ |

ei+ ei

| = S < 1 ,

the method has linear convergence with rate S. b) FP convergence is usually linear, with |rn − r| ≈ Ckn; if k > 1 /2, the bisection method is better. c) Estimating k? Let en = rn − r. Then for signed k, rn− 2 = r + en− 2 , rn− 1 ≈ r + ken− 2 , rn ≈ r + k^2 en− 2 , so signed k is k ≈ (rn − rn− 1 )/(rn− 1 − rn− 2 ). d) Taylor series analysis: from rn+1 = g(rn), near r r + en+1 = g(r + en) = g(r) + eng′(r) + e^2 ng′′(ξn)/ 2 , so en+1 ≈ eng′(r), linear convergence with S = |g′(r)|.