Click or drag to resize

RobustNewtonRaphsonFindRoot Method

Find a solution of the equation f(x)=0.

Namespace: Altaxo.Calc.RootFinding
Assembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax
C#
public static double FindRoot(
	Func<double, double> f,
	Func<double, double> df,
	double lowerBound,
	double upperBound,
	double accuracy = 1E-08,
	int maxIterations = 100,
	int subdivision = 20
)

Parameters

f  FuncDouble, Double
The function to find roots from.
df  FuncDouble, Double
The first derivative of the function to find roots from.
lowerBound  Double
The low value of the range where the root is supposed to be.
upperBound  Double
The high value of the range where the root is supposed to be.
accuracy  Double  (Optional)
Desired accuracy. The root will be refined until the accuracy or the maximum number of iterations is reached. Default 1e-8. Must be greater than 0.
maxIterations  Int32  (Optional)
Maximum number of iterations. Default 100.
subdivision  Int32  (Optional)
How many parts an interval should be split into for zero crossing scanning in case of lacking bracketing. Default 20.

Return Value

Double
Returns the root with the specified accuracy.
Exceptions
ExceptionCondition
NonConvergenceException
See Also