WebCab Functions for COM v2.0

EquationSolver.Brent Method (Double)

Implements the Van Wijngaarden-Dekker-Brent Method the recommended approach in order to find the solution for a general one-dimensional function where the function's values only (and not its derivative or functional form) are available.

public double Brent(
   double precision
);

Parameters

precision
The level of precision of a solution required before it is returned and the algorithm exists. That is, if the precision is set to 0.0001 then the result will be returned to within 0.0001 etc, assuming that an solution to this level of accuracy is found within the maximum number of iterations allowed. A reasonable value to take for this parameter is 0.00001. For smaller values of the precision parameter the solution will be more precise however the procedure will require more iterations and hence time in order to find the solution to the desired level of accuracy. Generally speaking, if using if for the precision 0.00001, we require t ms; then using a precision of 0.001, will take 0.6t ms, and using a precision of 0.0000001, will take 1.4t.

Return Value

A solution of the equation set using SetFunction, to the given level of precision required or NaN if the algorithm fails to produce such a solution.

Remarks

Further Detail

Brent's method combines root bracketing, bisection, and inverse quadratic interpolation to converge from the neighborhood of a zero crossing. While the false position and secant methods assume approximately linear behavior between two prior root estimates, inverse quadratic interpolation uses three prior points to fit an inverse quadratic function (i.e. x as a quadratic function of y) whose value at y = 0, is taken as the next estimate of the root x. Of course one must have contingency plans in case the root falls outside the bracketing interval, which Brent's method does by ensuring that Bisection is applied at is very worst.

When to use this Approach?

Brent's method combines the sureness of Bisection with the speed of a higher-order method when appropriate. It is recommended as the method of choice for general one-dimensional root finding where a function's values only (and not its derivative or functional form) are available.

See Also

EquationSolver Class | WebCab.COM.Math.EquationSolver Namespace | EquationSolver.Brent Overload List | Brent - An implementation of the Brent algorithm which allows the initial bracketing interval and the maximum number of iterations to be set.