From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22021 invoked by alias); 3 Dec 2003 21:20:28 -0000 Mailing-List: contact gsl-discuss-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gsl-discuss-owner@sources.redhat.com Received: (qmail 22011 invoked from network); 3 Dec 2003 21:20:26 -0000 Received: from unknown (HELO chinook.phys.northwestern.edu) (129.105.65.194) by sources.redhat.com with SMTP; 3 Dec 2003 21:20:26 -0000 Received: (from ato@localhost) by chinook.phys.northwestern.edu (8.11.6/8.11.6) id hB3LIDb13049 for gsl-discuss@sources.redhat.com; Wed, 3 Dec 2003 15:18:13 -0600 Date: Wed, 03 Dec 2003 21:20:00 -0000 From: M Atakan Gurkan To: GSL Discussion List Subject: Re: Root function Message-ID: <20031203151813.A13036@chinook.phys.northwestern.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i X-SW-Source: 2003-q4/txt/msg00114.txt.bz2 help-gsl seems to have problems, so I am (re)sending this to gsl-discuss. ato Date: Wed, 3 Dec 2003 11:13:04 -0600 From: M Atakan Gurkan To: "lauradiara@libero.it" Cc: GSL Help Subject: Re: Root function User-Agent: Mutt/1.2.5.1i In-Reply-To: ; from lauradiara@libero.it on Wed, Dec 03, 2003 at 03:25:33PM +0100 On Wed, Dec 03, 2003 at 03:25:33PM +0100, lauradiara@libero.it wrote: > Hi, > > I'd like to write a function which finds all the roots of a funcion y=f(x) > provided by the user. > > I have read the chapter one dimensional root finding: I have some questions. > > The concept expressed is that you use root bracketing or root polishing: with > the first you have to provide an initial intervalwitha root inside, while with > the second you have to provide a guess root. > > The first question is: both metods find only a root: if the function has more > roots what happen? > > The second question is that the initial condition (guess or interval with a > root) is not simple, it's difficult to provide a good value. > > All the examples are quite simple with a function provided athe start and not > inserted by the user: so the guess or the interval is simple. But in the real > applications, what can you do? > > I think there is a solution, otherwise the functions in gsl_roots,h are not > usable in real situations. > > > Can you give me some advice? Hi, In real life applications you start with plotting your function and guess the roots, at least for a given interval. If you have a family of functions then you try to parametrize the roots. This latter can be very hard. I recently spent a week on a parametrization problem. There is no single method that will work for all functions. "Numerical Methods That Work" is nice book on numerical techniques with a special emphasis on what you should expect and how you can select a method based on the problems at hand. I suggest you take a look at it. Good luck, ato