comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Better Root Finder
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Better Root Finder [message #53400] Sat, 14 April 2007 21:55 Go to next message
Max Watson is currently offline  Max Watson
Messages: 1
Registered: April 2007
Junior Member
IDL's fx_root seems very limited; when I want to find the root of say
x^3 - 8 with the initial guess vector [-1,-100,100], IDL returns a
complex number: ( -1.00000, 1.73205). Is there a way that
fx_root can be easily modified so that it can find the right answer
with a bad initial guess?
Re: Better Root Finder [message #53531 is a reply to message #53400] Mon, 16 April 2007 08:15 Go to previous message
James Kuyper is currently offline  James Kuyper
Messages: 425
Registered: March 2000
Senior Member
Max Watson wrote:
> IDL's fx_root seems very limited; when I want to find the root of say
> x^3 - 8 with the initial guess vector [-1,-100,100], IDL returns a
> complex number: ( -1.00000, 1.73205). Is there a way that
> fx_root can be easily modified so that it can find the right answer
> with a bad initial guess?

As has already been pointed out, that is "a" right answer, just not
the one that you wanted. When there are multiple roots, it's logically
impossible for a root finding technique to guarantee that it will give
you the one you want, unless you give it sufficient information to
determine which of those roots IS the one you want . An initial guess
that is sufficiently close to the desired solution is one approach;
methods that are restricted to finding real roots would be another
approach, if the root you want it the only real one.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: how to ensure overwriting of eps graphics files?
Next Topic: Re: Finger Pointing in IDL

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 08:40:23 PDT 2025

Total time taken to generate the page: 0.91744 seconds