NumericalMethodsChaper05

# NumericalMethodsChaper05 - Numerical Methods Chapter 5...

This preview shows pages 1–4. Sign up to view the full content.

1 Numerical Methods - Chapter 5 – Solution of Non-linear equations 1. Function of One Variable Given a continuous function ) ( x f in a certain interval [ x = a , x = b ], i.e. dx x df ) ( is finite in all points of the interval [ a , b ]. We want to find the solution to the equation: 0 ) ( = x f Example: () 0 5 . 0 3 sin 8 ) cos( 4 5 ) ( 2 4 = + + = x x x x x x f We want to find the value(s) of x for which 0 ) ( = x f . Those values are called roots of ) ( x f or solutions of the equation 0 ) ( = x f Existence of a solution Suppose we evaluate a continuous function ) ( x f at 2 points 1 x and 2 x . If ) ( 1 x f and ) ( 2 x f have different signs, then there exist at least one point x * in the interval [ 1 x , 2 x ] such that ( ) 0 * = x f x * is a root of ) ( x f . Conditioning Condition number = () * 1 x f if ( ) * x f is zero or close to zero then finding the root * x is difficult. Convergence rate Convergence rate definition: C x x x x r k k k = + * * 1 lim k is the iteration number. C is a constant to be chosen (C > 0). Typically C is chosen as ( ) * x f * x : is the root of () x f r : is the convergence rate. r = 1: convergence rate is linear. r > 1: convergence rate is super-linear. r = 2: convergence rate is quadratic. r = 3: convergence rate is cubic.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
2 1. Interval Bisection Method The algorithm starts by finding 1 x and 2 x such that 0 ) ( ) ( 2 1 < × x f x f i.e. ) ( 1 x f and ) ( 2 x f have different signs (This can be done by trial and error). double IntervalBisection( double x1, double x2, double Tolerance) { double m, F1 ,F2, Fm; F1=f(x1); F2=f(x2); while (1){ if(fabs(F2)<Tolerance) return (x2); if(fabs(F1)<Tolerance) return (x1); m=0.5*(x2+x1); Fm=f(m); if (sgn(F1)==sgn(Fm){x1=m;F1=Fm;} else {x2=m;F2=Fm;} } } x f ( x ) x 2 x 1 m Convergence rate is typically linear r = 1 2. Fixed Point Iteration We rewrite the equation: 0 ) ( = x f as x x g = ) ( Example: 0 2 ) ( 2 = = x x x f Can be rewritten as: 1. x x x g = = 2 ) ( 2 2. x x x g = + = 2 ) ( 3. x x x x g = + = 2 ) ( 4. x x x x g = + = 1 2 2 ) ( 2 Algorithm steps: 1. Start from an initial value 0 x 2. 1 0 ) ( x x g = 3. 1 0 x x = 4. Go to step 2. The algorithm converges to the solution of ) ( x f if 1 ) ( < x g around the solution point.
3 3. Newton-Raphson Method L + Δ + Δ + Δ + = Δ + 3 3 1 3 2 2 1 2 1 1 1 ) ( ! 3 1 ) ( ! 2 1 ) ( ) ( ) ( x x x f x x x f x x x f x f x x f Taking the first term in the Taylor series:

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 9

NumericalMethodsChaper05 - Numerical Methods Chapter 5...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online