Hi,
The algorithm returns only one root, normally the first one found in the given range [a,b] in the case you are using a method not using the function derivatives (like the Brent finder). If you know another root exists, you can then re-run the algorithm on the remaining subrange [root1,b] to find the second root. Without knowing the shape of the function is difficult to build a generic algorithm to find all roots. See also http://root.cern.ch/phpBB3//viewtopic.php?f=3&t=8822
where I have attached a possible example macro, FindRoot.C
Best Regards
Lorenzo
On Sep29, 2010, at 12:34 PM, Julia Campa Romero wrote:
> Hi,
>
> I want to ask if the rootfinder classes give you more that one root.
> I want to find the roots from the intersection of a Gaussian function with a straight line. I am testing the programs that are at
> http://root.cern.ch/drupal/content/root-finder-algorithms
> If I try to get more that one roots making larger the interval for example (0, 6*pi())
> it only gives me one
> how could I get more?
>
> Thanks,
>
> Julia
>
>
> ----------------------------
> Confidencialidad: Este mensaje y sus ficheros adjuntos se dirige exclusivamente a su destinatario y puede contener información privilegiada o confidencial. Si no es vd. el destinatario indicado, queda notificado de que la utilización, divulgación y/o copia sin autorización está prohibida en virtud de la legislación vigente. Si ha recibido este mensaje por error, le rogamos que nos lo comunique inmediatamente respondiendo al mensaje y proceda a su destrucción.
>
> Disclaimer: This message and its attached files is intended exclusively for its recipients and may contain confidential information. If you received this e-mail in error you are hereby notified that any dissemination, copy or disclosure of this communication is strictly prohibited and may be unlawful. In this case, please notify us by a reply and delete this email and its contents immediately. ----------------------------
>
Received on Wed Sep 29 2010 - 15:00:18 CEST
This archive was generated by hypermail 2.2.0 : Wed Sep 29 2010 - 17:50:01 CEST