Finding error of secant method empirically

In summary, the conversation is about finding the roots of a given equation using the secant method and MATLAB. The speaker is also asked to find the rate of convergence for the method empirically, and they discuss different approaches for doing so. They also mention the order of convergence for the secant method and ways to approximate it.
  • #1
jjr
51
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
  • #2
Check out these notes which Anatolii Grinshpan put on the net.
 
  • Like
Likes 1 person
  • #3
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 [itex]\frac{|x_{n+1}-α|}{|x_n-α|^p} ≈ C [/itex] , making [itex] p ≈ 1.618 [/itex] a starting assumption.
 
  • #4
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:
  • #5
: As a scientist, it is important to understand the limitations and assumptions of different methods used in scientific research. The secant method is a numerical method used to find the roots of a given equation, and its order of convergence is an important factor in determining its accuracy and efficiency. In order to find the error of the secant method empirically, you will need to use a set of errors generated by your program and plot them against the iteration number. This will allow you to observe the behavior of the errors and determine the order of convergence by looking at the slope of the curve. Additionally, you can also compare the rate of convergence with the theoretical value of α ≈ 1.618 to validate your results. It is important to note that the accuracy of your results may be affected by the choice of initial points and the specific equation you are solving. Overall, by analyzing the empirical error data, you can gain a better understanding of the performance of the secant method and its limitations.
 

1. What is the secant method?

The secant method is a numerical root-finding algorithm used to approximate the roots of a function. It is an iterative method that uses the slope of a line connecting two points on a function to estimate the location of the root.

2. How does the secant method work?

The secant method starts with two initial points on the function, then calculates the slope of the line connecting those two points. This slope is then used to find where the line intersects the x-axis, which becomes the next point to use in the calculation. This process is repeated until the desired level of accuracy is achieved.

3. What is the purpose of finding the error of secant method empirically?

The purpose of finding the error of secant method empirically is to determine how accurate the approximation of the root is compared to the actual root. This helps to evaluate the effectiveness of the secant method and make any necessary adjustments to improve its accuracy.

4. How is the error of secant method empirically calculated?

The error of secant method is calculated by comparing the approximation of the root to the actual root of the function. This can be done by finding the absolute or relative difference between the two values. The smaller the error, the more accurate the secant method is in finding the root.

5. What factors can affect the error of secant method?

The error of secant method can be affected by the initial points chosen, the number of iterations performed, and the behavior of the function near the root. Choosing initial points that are closer to the actual root and performing more iterations can help reduce the error. However, if the function has a steep or flat slope near the root, the error may be larger.

Similar threads

Replies
8
Views
2K
  • Advanced Physics Homework Help
Replies
4
Views
1K
  • Calculus
Replies
13
Views
1K
  • Calculus and Beyond Homework Help
Replies
3
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
1K
  • Advanced Physics Homework Help
Replies
1
Views
780
  • Quantum Physics
Replies
5
Views
977
Replies
39
Views
490
  • Calculus and Beyond Homework Help
Replies
2
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
6
Views
1K
Back
Top