Secant method, bisection or NR

In summary, the speaker is looking for the first root of a function and is considering using different methods such as Newton Raphson, bisection, and Brent's Method. They are unsure which method to use and are seeking advice on how to approach the problem.
  • #1
a.mlw.walker
148
0
Hi so I have attached a graph, and I am trying to find the first root of the function. I began using Newton Raphson however due to the oscillatory nature of the curve, sometimes NR would not find the first route but an nth route. I need the first. Therefore what I did was compute the first time the function is known to be negative. At this point the x value and the function value are known. It is also known that x = 0 is greater than 1.
My question then is should I use the bisection method as it is guaranteed to solve for a root lying between x = 0 and f(xn) < 0. However it is slow. The secant method requires two initial values so would that work? Or can I use the Newton Raphson method and set a boundary that it knows the route must be before?

Thanks
 

Attachments

  • curveNR.jpg
    curveNR.jpg
    8.2 KB · Views: 496
Physics news on Phys.org
  • #2
If you know the interval that contains the root you are looking for, Brent's Method might be a good choice, or a combination of Brent's method (or bisection) to get close, then NR for rapid convergence.

http://en.wikipedia.org/wiki/Brent's_method
 

Related to Secant method, bisection or NR

What is the Secant method?

The Secant method is a root-finding algorithm used to find the roots of a given function. It is an iterative process that uses two initial guesses to approximate the root. The algorithm involves calculating the slope of the secant line between the two points and using it to find the next approximation of the root. This process is repeated until a desired level of accuracy is achieved.

What is the bisection method?

The bisection method is another root-finding algorithm that is used to find the roots of a given function. It is a basic and reliable method that involves repeatedly narrowing down the interval in which the root lies by dividing it in half. This process continues until the interval becomes small enough to approximate the root with the desired level of accuracy.

What is NR method?

The NR (Newton-Raphson) method is a root-finding algorithm that is based on Newton's method for finding the roots of a given function. It involves using the derivative of the function to create a linear approximation of the function and then using this approximation to find the next approximation for the root. This process is repeated until the desired level of accuracy is achieved.

When should I use the Secant method?

The Secant method is best used when the function is not differentiable, or when the derivative of the function is difficult to calculate. It is also useful when the initial guesses for the root are close to each other, as it will converge faster in such cases.

When should I use the bisection method vs the NR method?

The bisection method is a more robust and reliable method, but it may take longer to converge compared to the NR method. The NR method is faster but may not converge if the initial guess is not close enough to the root. Therefore, the choice between these two methods depends on the specific function and the desired level of accuracy.

Similar threads

  • Calculus
Replies
13
Views
1K
Replies
16
Views
2K
Replies
8
Views
2K
  • General Math
Replies
7
Views
2K
Replies
1
Views
9K
Replies
1
Views
1K
Replies
3
Views
1K
  • General Math
Replies
1
Views
823
Back
Top