lectures 3-4.pptx

Upload: angel-diosdado

Post on 02-Mar-2016

19 views

Category:

Documents


0 download

TRANSCRIPT

Mathematical Modeling and Engineering Problem solving

1~ Roots of Equations ~ Bracketing Methods

Chapter 5Copyright 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.2Easy

But, not easy

How about these?

Roots of Equations

Copyright 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.Graphical ApproachMake a plot of the function f(x) and observe where it crosses the x-axis, i.e. f(x) = 0

Not very practical but can be used to obtain rough estimates for roots

These estimates can be used as initial guesses for numerical methods that well study here.

Plot f(x)=sin(10x)+cos(3x)

Two distinct roots between x= 4.2 and 4.3

need to be carefulCopyright 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.4

Bracketing:

Odd and even number of roots

exceptions

Copyright 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.Bisection Method

Termination criteria: e < etol OR Max.Iteration is reached

Copyright 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.6How Many Iterations will It Take?Length of the first IntervalLo= xu- xlAfter 1 iterationL1=Lo/2After 2 iterationsL2=Lo/4.. ..After k iterationsLk=Lo/2k

Then we can write:

Copyright 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.7Bisection MethodPros

EasyAlways finds a rootNumber of iterations required to attain an absolute error can be computed a priori.

Cons

SlowNeed to find initial guesses for xl and xuNo account is taken of the fact that if f(xl) is closer to zero, it is likely that root is closer to xl .Copyright 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.8~ Roots of Equations ~ Open Methods

Chapter 6Copyright 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.9

Open MethodsGenerally use a single starting value or two starting values that do not need to bracket the root.

Open Method (convergent)(divergent)Copyright 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.Newton-Raphson MethodMost widely used formula for locating roots.

Can be derived using Taylor series or the geometric interpretation of the slope in the figure

Copyright 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.11Newton-Raphson is a convenient method if f(x) (the derivative) can be evaluated analyticallyRate of convergence is quadratic, i.e. the error is roughly proportional to the square of the previous error Ei+1=O(Ei2)(proof is given in the Text)But:it does not always converge

There is no convergence criterion

Sometimes, it may converge very very slowly (see next slide)

Copyright 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.12Example : Slow Convergence

Iterationx00.5151.65246.485341.8365437.65285533.887565..381.0831.0000000

Copyright 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.The Secant MethodIf derivative f(x) can not be computed analytically then we need to compute it numerically (backward finite divided difference method)

RESULT: N-R becomesSECANT METHOD

Copyright 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.14Requires two initial estimates xo, x1. However, it is not a bracketing method.The Secant Method has the same properties as Newtons method. Convergence is not guaranteed for all xo, f(x).

The Secant MethodCopyright 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.15

Modified Secant Method

Copyright 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.