Thread: Solve an equation by e.g., Newton Raphson, in an given interval

1. Solve an equation by e.g., Newton Raphson, in an given interval

Hi all,

I have a nonlinear equation f(x)=0 to solve in the interval [0,1]. For physical reasons (I am working with mechanics) the variable x cannot exceed 1 and must be greater than 0. To speed up solving time I use a NR solver. I know there is a solution to f(x)=0 with x in the [0,1] interval, and it is unique.
But on the way to convergence the solver sometimes computes intermediate x values that lie outside the allowable interval, and consequently my system fails and returns physically unacceptable values.

I could use a standard bisection method to solve the eq, but I need high accuracy and convergence speed. Does anybody know about any method to solve the eq with a quadratic rate of convergence, that guarantees that the intermediate steps do not lie outside the interval? Thanks

2. Re: Solve an equation by e.g., Newton Raphson, in an given interval

Remember only that generalized methods are good for general use. Your own good judgment must win the day for a specific application. If you can't get consistent quadratic, would you be happy with 1.5ish? If you track your NR values, you can throw out unacceptable results and use bisection for that iteration only - or something else that makes sense to you.

3. Re: Solve an equation by e.g., Newton Raphson, in an given interval

Another alternative is to use a hybrid method: bisection to get close enough so that NR converges quickly. So, you claim you know there is a root in the interval. Is that because of, say, the Intermediate Value Theorem applied to the function on the interval [0,1]?

4. Re: Solve an equation by e.g., Newton Raphson, in an given interval

Thanks for the answers. Yes, I know there is a solution because of the IVT - and unicity is guaranteed both on physical and mathematical grounds.

I will try hybrid methods, the cases you suggest are interesting to investigate!

5. Re: Solve an equation by e.g., Newton Raphson, in an given interval

Originally Posted by AlphaOmega2011
Thanks for the answers. Yes, I know there is a solution because of the IVT - and unicity is guaranteed both on physical and mathematical grounds.

I will try hybrid methods, the cases you suggest are interesting to investigate!
Ok, let us know how it goes.