Dr. Mubashir Alam King Saud University. Outline Chapter#3 Rootfinding Bisection Method Newton's...

Click here to load reader

  • date post

  • Category


  • view

  • download


Embed Size (px)

Transcript of Dr. Mubashir Alam King Saud University. Outline Chapter#3 Rootfinding Bisection Method Newton's...

EE:320 Communication Principles

EE:211Computational Techniques in Electrical Engineering Lecture#2Dr. Mubashir AlamKing Saud UniversityOutlineChapter#3RootfindingBisection MethodNewton's AlgorithmSecant MethodIntroduction

The Bisection Method

Example: 3.1.1

Error Bounds is the true root and cn is its estimateError: |-cn|

Newtons Algorithm

If x1 is the root of p(x) then p(x1)=0Repeat the next with x1 as the initial estimate and determine x2

And so onNewtons Method

Example: 3.2.1

Stopping criteriaExamplenxnf(xn)xn-xn-101.58.890625------------------11.300490882.537264-0.19995091221.181480420.53845863-0.1190104631.139455590.04923525-0.04202541.134777635.50373 x 10-3-4.678 x 10-3Stopping criteria, = 1 x 10-2Example: 3.2.1

Example: 3.2.2

Secant Method

From this perspective, other straight-line approximation to y=f(x) would also lead to methods for approximating a root of f(x).One such straight-line approximation leads to SECANT METHOD

The two pints (x0,f(x0)) and (x1,f(x1)) , on the graph of y=f(x), determinea straight line , called a secant line.This line is an approximation to the graph of y=f(x), and its root x2 is anapproximation to true root .Equation of linesEquation of line with slope = m and passing through a point (x1,y1): y-y1 = m(x-x1) y = y1+ m(x-x1)Slope of the line between points (x1,y1) and (x2,y2) Slope = m = (y2- y1) / (x2- x1)Secant MethodFind the equation of the line and then its root x2

Having found x2, we can drop x0, and use x1,x2 as a new set of approximate values for .This will lead to an improved value x3.Continue this process ..

Secant MethodGeneral Formula:

Two point method, since two approximate values are needed to obtain the next improved value.

Example: 3.3.1

Matlab Function: fzero This function uses ideas involved in the bisection and the secant method.Use: root=fzero(f_name, [a,b])Produces a root within [a,b], assume f(a)f(b)