ecs555 safarina haslimawaty

Upload: darwish-wahab

Post on 02-Jun-2018

228 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/11/2019 ecs555 safarina haslimawaty

    1/19

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

    1

    Chapter 6

  • 8/11/2019 ecs555 safarina haslimawaty

    2/19

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

    2

    Open MethodsChapter 6

    Open methods

    are based on

    formulas that

    require only asingle starting

    value of x or two

    starting values

    that do notnecessarily

    bracket the root.

    Figure 6.1

  • 8/11/2019 ecs555 safarina haslimawaty

    3/19

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

    3

    Simple Fixed-point Iteration

    ...2,1,k,given)()(0)(

    1

    okk xxgxxxgxf

    Bracketing methods are convergent.

    Fixed-point methods may sometime

    diverge, depending on the stating point

    (initial guess) and how the function behaves.

    Rearrange the function so that x is on the

    left side of the equation:

  • 8/11/2019 ecs555 safarina haslimawaty

    4/19

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

    4

    xxg

    or

    xxgor

    xxg

    xxxxf

    21)(

    2)(

    2)(

    02)(

    2

    2

    Example:

  • 8/11/2019 ecs555 safarina haslimawaty

    5/19

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

    5

    Convergence

    x=g(x) can be expressed

    as a pair of equations:

    y1=x

    y2=g(x) (component

    equations)

    Plot them separately.

    Figure 6.2

  • 8/11/2019 ecs555 safarina haslimawaty

    6/19

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

    6

    Conclusion

    Fixed-point iteration converges if

    x)f(x)linetheof(slope1)( xg

    When the method converges, the error is

    roughly proportional to or less than the error of

    the previous step, therefore it is called linearlyconvergent.

  • 8/11/2019 ecs555 safarina haslimawaty

    7/19

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

    7

    Newton-Raphson Method

    Most widely used method.

    Based on Taylor series expansion:

    )(

    )(

    )(0

    g,Rearrangin

    0)f(xwhenxofvaluetheisrootThe

    !2)()()()(

    1

    1

    1i1i

    3

    2

    1

    i

    iii

    iiii

    iiii

    xf

    xfxx

    xx)(xf)f(x

    xOx

    xfxxfxfxf

    Newton-Raphson formula

    Solve for

  • 8/11/2019 ecs555 safarina haslimawaty

    8/19Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

    8

    A convenient method for

    functions whose

    derivatives can be

    evaluated analytically. It

    may not be convenientfor functions whose

    derivatives cannot be

    evaluated analytically.

    Fig. 6.5

  • 8/11/2019 ecs555 safarina haslimawaty

    9/19Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

    9

    Fig. 6.6

  • 8/11/2019 ecs555 safarina haslimawaty

    10/19Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

    10

    The Secant Method

    A slight variation of Newtons method forfunctions whose derivatives are difficult toevaluate. For these cases the derivative can beapproximated by a backward finite divided

    difference.

    ,3,2,1)()(

    )(

    )()(

    )(

    1

    11

    1

    1

    ixfxf

    xxxfxx

    xfxf

    xxxf

    ii

    iiiii

    ii

    iii

  • 8/11/2019 ecs555 safarina haslimawaty

    11/19Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

    11

    Requires two initial

    estimates of x , e.g, xo,

    x1. However, becausef(x) is not required to

    change signs between

    estimates, it is not

    classified as a

    bracketing method.

    The scant method has the

    same properties as

    Newtons method.

    Convergence is not

    guaranteed for all xo,

    f(x).

    Fig. 6.7

  • 8/11/2019 ecs555 safarina haslimawaty

    12/19Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

    12

    Fig. 6.8

  • 8/11/2019 ecs555 safarina haslimawaty

    13/19Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

    13

    Multiple Roots

    None of the methods deal with multiple roots

    efficiently, however, one way to deal with problems

    is as follows:

    )(

    )(1xfindThen

    )()()(Set

    i

    i

    i

    i

    ii

    xu

    xu

    xfxfxu

    This function has

    roots at all the same

    locations as the

    original function

  • 8/11/2019 ecs555 safarina haslimawaty

    14/19Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

    14

    Fig. 6.13

  • 8/11/2019 ecs555 safarina haslimawaty

    15/19Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

    15

    Multiple root corresponds to a point where a

    function is tangent to the x axis. Difficulties

    Function does not change sign at the multiple root,

    therefore, cannot use bracketing methods. Both f(x) and f(x)=0, division by zero with

    Newtons and Secant methods.

  • 8/11/2019 ecs555 safarina haslimawaty

    16/19Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

    16

    Systems of Linear Equations

    0),,,,(

    0),,,,(

    0),,,,(

    321

    3212

    3211

    nn

    n

    n

    xxxxf

    xxxxf

    xxxxf

  • 8/11/2019 ecs555 safarina haslimawaty

    17/19Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

    17

    Taylor series expansion of a function of more than

    one variable

    )()(

    )()(

    11111

    11111

    iii

    ii

    iii

    iii

    ii

    iii

    yyyvxx

    xvvv

    yyy

    uxx

    x

    uuu

    The root of the equation occurs at the value of xand y where ui+1and vi+1equal to zero.

  • 8/11/2019 ecs555 safarina haslimawaty

    18/19Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

    18

    y

    vy

    x

    vxvy

    y

    vx

    x

    vy

    uy

    x

    uxuy

    y

    ux

    x

    u

    ii

    iiii

    ii

    i

    ii

    iiii

    ii

    i

    11

    11

    A set of two linear equations with two

    unknowns that can be solved for.

  • 8/11/2019 ecs555 safarina haslimawaty

    19/19

    19

    x

    v

    y

    u

    y

    v

    x

    ux

    uvx

    vu

    yy

    x

    v

    y

    u

    y

    v

    x

    uy

    uv

    y

    vu

    xx

    iiii

    iiii

    ii

    iiii

    ii

    ii

    ii

    1

    1

    Determinant of

    the Jacobianof

    the system.