root finding solutions

Upload: hrishikesh-kulkarni

Post on 04-Jun-2018

222 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/13/2019 Root finding Solutions

    1/10

    Assignment number-1 Results and Discussions. Date: 11-8-2013

    (Roll no-133100079)

    Bisection, Problem-1, Guess-0, 10000Select an Equation for root finding.1. X^2 - 2000*X + 10000002. X^2 - 200*X + 9999.9999

    Number -1

    Select the method of Root finding.

    1. BISECTION METHOD

    2. NEWTON-RAPHSON METHOD

    3. SECANT METHOD

    Number 1

    Enter the value of initial guess:0Enter the value of second initial guess:10000

    The initial Guesses provided are not appropriate.

    Bisection, Problem-2, Guess-0, 1000

    Select an Equation for root finding.

    1. X^2 - 2000*X + 10000002. X^2 - 200*X + 9999.9999

    Number -2

    Select the method of Root finding.

    1. BISECTION METHOD

    2. NEWTON-RAPHSON METHOD

    3. SECANT METHOD

    Number 1

    Enter the value of initial guess:0

    Enter the value of second initial guess:1000

    The initial Guesses provided are not appropriate.

  • 8/13/2019 Root finding Solutions

    2/10

    Discussion for bisection method.

    Equation- 1 X^2 - 2000*X + 1000000

    Equation- 2 X^2 - 200*X + 9999.9999

    The Bisection method requires function to be negative at one of the initial guesses since this ensures at least one of the

    roots is present inside the interval.In both the given equations the initial guesses provided gives positive value of function.

    Therefore initial guesses are not appropriate for bisection method.

    As well as 1st

    equation has local minima at root so bisection method fails.

  • 8/13/2019 Root finding Solutions

    3/10

    Newton-Raphson, Problem-1, Guess-0

    Select an Equation for root finding.

    1. X^2 - 2000*X + 1000000

    2. X^2 - 200*X + 9999.9999

    Number -1

    Select the method of Root finding.

    1. BISECTION METHOD

    2. NEWTON-RAPHSON METHOD

    3. SECANT METHOD

    Number 2

    Enter the value of initial guess:0

    The root of the Equation is 9.999999e+02 at iteration no-24.

    Error v/ s number of i terat ions.

    Newton-Raphson, Problem-1, Guess-100

    Select an Equation for root finding.

    1. X^2 - 2000*X + 1000000

    2. X^2 - 200*X + 9999.9999

    Number -1

    Select the method of Root finding.

    1. BISECTION METHOD

    2. NEWTON-RAPHSON METHOD

    3. SECANT METHOD

    Number - 2

    Enter the value of initial guess:100

    The root of the Equation is 9.999999e+02 at iteration no-24.

  • 8/13/2019 Root finding Solutions

    4/10

    Error v/ s number of i terat ions.

    Newton-Raphson, Problem-1, Guess-1000

    Select an Equation for root finding.

    1. X^2 - 2000*X + 1000000

    2. X^2 - 200*X + 9999.9999

    Number -1

    Select the method of Root finding.

    1. BISECTION METHOD

    2. NEWTON-RAPHSON METHOD

    3. SECANT METHOD

    Number - 2

    Enter the value of initial guess:0

    The root of the Equation is 1000 at iteration no-0.

    Newton-Raphson, Problem-1, Guess-10000

    Select an Equation for root finding.

    1. X^2 - 2000*X + 1000000

    2. X^2 - 200*X + 9999.9999

    Number -1

    Select the method of Root finding.

    1. BISECTION METHOD

    2. NEWTON-RAPHSON METHOD

    3. SECANT METHOD

    Number - 2

    Enter the value of initial guess:10000

    The root of the Equation is 1.000000e+03 at iteration no-27.

  • 8/13/2019 Root finding Solutions

    5/10

    Error v/ s number of i terat ions.

    Newton-Raphson, Problem-2, Guess-0

    Select an Equation for root finding.

    1. X^2 - 2000*X + 1000000

    2. X^2 - 200*X + 9999.9999

    Number -2

    Select the method of Root finding.

    1. BISECTION METHOD

    2. NEWTON-RAPHSON METHOD

    3. SECANT METHOD

    Number - 2

    Enter the value of initial guess:0

    The root of the Equation is 9.999000e+01 at iteration no-16.

    Error v/ s number of i terat ions.

  • 8/13/2019 Root finding Solutions

    6/10

    Newton-Raphson, Problem-2, Guess-100

    Select an Equation for root finding.

    1. X^2 - 2000*X + 1000000

    2. X^2 - 200*X + 9999.9999

    Number -2

    Select the method of Root finding.

    1. BISECTION METHOD

    2. NEWTON-RAPHSON METHOD

    3. SECANT METHOD

    Number - 2

    Enter the value of initial guess:100

    The root of the Equation is 100 at iteration no-0.

    Newton-Raphson, Problem-2, Guess-1000

    Select an Equation for root finding.

    1. X^2 - 2000*X + 1000000

    2. X^2 - 200*X + 9999.9999

    Number -2

    Select the method of Root finding.

    1. BISECTION METHOD

    2. NEWTON-RAPHSON METHOD

    3. SECANT METHOD

    Number - 2

    Enter the value of initial guess:1000

    The root of the Equation is 1.000100e+02 at iteration no-19.

    Error v/ s iterat ion.

  • 8/13/2019 Root finding Solutions

    7/10

    Discussion for Newton-Raphson method:

    1. It can be observed from graph of Error v/s iterations that Newton-Raphson method converges slowly at the first few

    iterations but then speed of convergence increases rapidly near root.

    2. The choice of initial guess and nature of function is very important in Newton methods since it decides the

    convergence.

    3. The 2nd

    function has multiple roots in the given interval so that Newton-Raphson may converge to any one root.

    4. for the 1st

    function f(x) as well as f(x) goes to zero at the root so we may get condition of division by zero. but iff(x) =0 condition is incorporated in program before f(x) =0, then f(x) reaches to 0 earlier than f(x). (According to Ralson

    and Rabinowitz, 1978)

    5. Method is linearly convergent for multiple roots.

    Secant, Problem-1, Guess-0, 100

    Select an Equation for root finding.

    1. X^2 - 2000*X + 1000000

    2. X^2 - 200*X + 9999.9999Number -1

    Select the method of Root finding.

    1. BISECTION METHOD

    2. NEWTON-RAPHSON METHOD

    3. SECANT METHOD

    Number - 3

    Enter the value of initial guess:0

    Enter the value of second initial guess:100

    The root of the Equation is 9.999998e+02 at iteration no-33 and f(a)=2.700835e-08

    Error V/ s number of iterations.

  • 8/13/2019 Root finding Solutions

    8/10

    Secant, Problem-1, Guess-0, 1000

    Select an Equation for root finding.

    1. X^2 - 2000*X + 1000000

    2. X^2 - 200*X + 9999.9999

    Number -1

    Select the method of Root finding.

    1. BISECTION METHOD

    2. NEWTON-RAPHSON METHOD

    3. SECANT METHOD

    Number - 3

    Enter the value of initial guess:0

    Enter the value of second initial guess:1000

    The root of the Equation is 1000

    Secant, Problem-1, Guess-0, 10000

    Select an Equation for root finding.

    1. X^2 - 2000*X + 1000000

    2. X^2 - 200*X + 9999.9999

    Number -1

    Select the method of Root finding.

    1. BISECTION METHOD

    2. NEWTON-RAPHSON METHOD

    3. SECANT METHOD

    Number - 3

    Enter the value of initial guess:0

    Enter the value of second initial guess:10000

    The root of the Equation is 9.999998e+02 at iteration no-35.

    Error v/ s iterat ion.

  • 8/13/2019 Root finding Solutions

    9/10

  • 8/13/2019 Root finding Solutions

    10/10

    Discussion for secant method:

    1. The method is less convergent than Newton-Raphson method (seen from number of iterations required)2. This method does not guarantee the convergence.3. The method does not require evaluation of derivative analytically.