An NDoc Documented Class Library

NewtonRootFinder Class

Newton's method for finding roots of functions.

For a list of all members of this type, see NewtonRootFinder Members.

System.Object
   numerics4net.IterativeMethod
      numerics4net.root.NewtonRootFinder

public class NewtonRootFinder : IterativeMethod

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

For example, to find roots for sine, first a Function is defined:

Function sine = new Function(Math.Sin);
along with its derivative:
Function cos = new Function(Math.Cos);

Then, a Newton's method root finder is created with the above function:

NewtonRootFinder finder = new NewtonRootFinder(sine, cos);

Lastly, locating roots is accomplished using the FindRoot method:

// find the root close to 3.
double pi = finder.FindRoot(3.0);

// find the root close to 1.
double zero = finder.FindRoot(1.0);

References:

  1. Eric W. Weisstein. "Newton's Method." From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/NewtonsMethod.html

Requirements

Namespace: numerics4net.root

Assembly: numerics4net-1.2 (in numerics4net-1.2.dll)

See Also

NewtonRootFinder Members | numerics4net.root Namespace