1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Finding the order of the rate of convergence

  1. Jul 2, 2006 #1
    Hello,

    Our class was tasked to develop programs for the Fixed Point Method, Newton-Rhapson Method, and the Secant Method, then create a subroutine that could compute the order of the rate of convergence for all the iterative methods. I DO know the orders of rate of convergence of each method, it's just that I can't demonstrate it in Scilab, the program we use in our class (although I also tried to demonstrate it in Matlab)

    The Order can be derived from the formula

    [itex]
    e_{n+1} = C |e_{n}|^q
    [/itex]

    hence,

    [itex]

    q= {{\ln(e_{n+1}) - \ln(C) }\over \ln(e_n)}

    [/itex]

    What I've done so far is create 2 vectors containing iterates. One vector X contains the 1st, 2nd, ... nth iterate, while the other Y contains the 2nd, 3rd, ..., (n+1)th iterate. I then create a new vector E=Y-X which contains the errors in-between successive iterates. This is the part where I'm stuck - I have no clue as to how to compute for the asymptotic error constant (which is the only unknown I need to find q). I'm not even sure if the mathematical framework is correct... is there anything wrong with it?

    All help is appreciated

    reli~
     
  2. jcsd
  3. Jul 2, 2006 #2

    0rthodontist

    User Avatar
    Science Advisor

    So, basically, you have a recurrence and you want to compute the exponent q from the recurrence.

    C should matter less and less as n grows, so you could just set it to be 1 and ignore it. Alternatively, in addition to
    [tex]e_{n+1} = C |e_{n}|^q[/tex]
    you know
    [tex]e_{n} = C |e_{n-1}|^q[/tex]
    So dividing the first by the second, you know
    [tex]\frac {e_{n+1}}{e_n} = |\frac{e_n}{e_{n-1}}|^q[/tex]

    [tex]q = \frac{ln (\frac {e_{n+1}}{e_n})}{ln |\frac{e_n}{e_{n-1}}|}[/tex]
     
  4. Jul 3, 2006 #3
    Thanx so much Orthodonist, your suggestion has helped me very well. However, there's a problem about the rate of convergence that comes out when I test the Secant Method. The Secant Method should give an approximate order of 1.618, but it gives me 1! But anyway, thanx for the help. I will see where I went wrong on my own.

    Thanx again

    reli~
     
  5. Jul 3, 2006 #4

    HallsofIvy

    User Avatar
    Staff Emeritus
    Science Advisor

    Are you expected to use a formula? Since you are talking about programs to do this, it seems to me that a straight forward way to do this would be to take a problem with a known answer, approximate the solution by each method using a specific number of steps, and then divide the error (|known answer- approximate solution) by the number of steps.
     
  6. Jul 3, 2006 #5
    HallsofIvy:

    That's the kind of program I've done so far. I'm finding the roots of

    [tex]
    x^2 - 5x - 6 [/tex]

    Of course I know the roots (x=-1, x=6) I've already developed the codes for Newton, Secant and Fixed Point Method. I do know that the order of the rate of convergence, q, for each method is q=2, q= the golden ratio (1.618 blah blah) , and q=1, respectively. As of now, the suggestion made by Orthodonist produces the correct values of q for the Newton and Fixed point, but not for the Secant Method.


    Sorry for being so clueless, but what does dividing the error by the number of steps produce? Does it result in the asymptotic error constant? I know that the asymptotic error constant is given by

    [tex]

    \lim_{n \rightarrow \infty} \frac{ e_{n+1}}{e^{q}_{n} } = C


    [/tex]



    All help is appreciated

    reli~
     
    Last edited: Jul 3, 2006
  7. Jul 4, 2006 #6

    HallsofIvy

    User Avatar
    Staff Emeritus
    Science Advisor

    No, it results in the rate of convergence which is what you wanted. How fast does the sequence converge to the correct answer? How many steps does it take to get close to the correct answer?

     
  8. Jul 5, 2006 #7
    I see... that clears things up a bit... so what can you say about Orthodonist's suggestion on getting the order of the rate of convergence (which I know is q in the formula you quoted)? I mean, in the alternative he gave me, he told me to ignore the value of C, but I know that q could be solved by using

    [itex]

    q= {{\ln(e_{n+1}) - \ln(C) }\over \ln(e_n)}

    [/itex]

    I'm sorry if I sound to persistent, it's just that the algorithm I made still gives me an incorrect order q for the Secant method...

    Thanks a billion times,

    reli~
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Finding the order of the rate of convergence
  1. Convergence rate (Replies: 1)

  2. Rate of convergeance (Replies: 2)

Loading...