Finding error of secant method empirically

Click For Summary

Homework Help Overview

The discussion revolves around the empirical determination of the order of convergence for the secant method used to find the roots of a given equation, specifically through error analysis in MATLAB.

Discussion Character

  • Exploratory, Assumption checking, Mathematical reasoning

Approaches and Questions Raised

  • The original poster attempts to empirically show the order of convergence of the secant method, noting their success in finding roots but uncertainty in demonstrating convergence. They mention using logarithmic plots of errors against iteration numbers but seek further guidance. Other participants discuss the implications of ignoring higher-order terms and the challenges of achieving a smooth log-log plot due to noise in the data.

Discussion Status

Participants are exploring various methods to analyze the convergence empirically, with some suggesting specific approaches to assess the exponent in the error relationship. There is acknowledgment of the complexities involved in the analysis, particularly regarding the influence of test functions and the precision of the results.

Contextual Notes

There is mention of a desired error tolerance of 1e-10 and the potential impact of having only a few iterations on the reliability of the convergence analysis.

jjr
Messages
51
Reaction score
1

Homework Statement



I need to find the roots of a given equation using the secant method and matlab. I have already found all the roots, but I am also asked to find the rate of convergence for the method empirically, meaning that they want me to find the order of convergence through the set of errors generated in by the program.


Homework Equations





The Attempt at a Solution



I know very well that the order of convergence of the secant method is α ≈ 1.618, but I am not sure how I should go about showing this empirically. In my case the roots are found within the desired error tolerance (1e-10) in about 6-8 iterations. I've tried taking the logarithms of the errors and plotting them versus the iteration number n, to draw out the exponential behaviour, but I can't get anyone clear answer... Any suggestions for putting me on the right track? Let me know if I need to clarify anything.

J
 
Physics news on Phys.org
Check out these notes which Anatolii Grinshpan put on the net.
 
  • Like
Likes   Reactions: 1 person
Thank you! I'm still not sure how I would go about finding the exponent given a set of errors, but I think it will be sufficent to show that \frac{|x_{n+1}-α|}{|x_n-α|^p} ≈ C , making p ≈ 1.618 a starting assumption.
 
I think so. What I wanted to point out is that the analysis is based on ignoring higher order terms, and even then you need ##f''## and ##f'## in ##\alpha##. Depending on your test functions (and on whether you have an exact solution for ##\alpha## or only the last iteration) you end up in the noise very quickly. So with only a few iterations and any deviation popping up twice (in point n and also in point n+1), you can't expect a perfectly smooth log-log plot.

:smile: so there's no need to be so precise about the 1.61803398874989...

Conceptually I always remembered this as: Newton is quadratic, secant approaches Newton if the secant approaches the derivative. But it's a numerical derivative, so before it's really good enough you are in the noise anyway. So somewhere between 1 and 2.
 
Last edited:

Similar threads

  • · Replies 1 ·
Replies
1
Views
10K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 4 ·
Replies
4
Views
24K
  • · Replies 2 ·
Replies
2
Views
6K