WebCab Functions for COM v2.0

EquationSolver.RegulaFalsi Method (Double, Double, Double, Int64)

Implements Regula Falsi (or Method of False Position) which is a variant of the Secant method which is less efficient but more stable.

public double RegulaFalsi(
   double beginningOfInterval,
   double endOfInterval,
   double precision,
   long maxIterations
);

Parameters

beginningOfInterval
The coordinate value of the lower bound of the interval over which a solution to the equation is known to exist.
endOfInterval
The coordinate value of the upper bound of the interval over which a solution to the equation is known to exist.
precision
The level of precision of a solution required before it is returned and the algorithm exits. 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, which requires 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.
maxIterations
The maximum number of iterations performed before the result will be returned. If the method fails for a given level of precision you may need to increase the maximum number of iterations.

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 Details

The Regula-Falsi (or false position) method is based on the same algorithm implemented by the Secant method. The only difference between the methods is that secant retains the most recent of the prior estimates; this requires an arbitrary choice on the first iteration, while false position retains that prior estimate for which the function value has opposite sign from the function value at the current best estimate of the root, so that the two points continue to bracket the root.

When to use this Approach?

The term false position refers to the fact that the method can use an older rather than newer function evaluation and hence has a lower order of convergence. Since the newer function value will sometimes be kept, the method is often super-linear.

See Also

EquationSolver Class | WebCab.COM.Math.EquationSolver Namespace | EquationSolver.RegulaFalsi Overload List | Regula-Falsi - Applies the Regula-Falsi algorithm without the need to provide the initial bracketing algorithm or maximum number of iterations.