Returns an approximation to the derivative of a function.
Namespace:
Extreme.Mathematics
Assembly:
Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.1
public static double CentralDerivative(
this Func<double, double> targetFunction,
double x,
out double estimatedError,
out int evaluationsNeeded
)
<ExtensionAttribute>
Public Shared Function CentralDerivative (
targetFunction As Func(Of Double, Double),
x As Double,
<OutAttribute> ByRef estimatedError As Double,
<OutAttribute> ByRef evaluationsNeeded As Integer
) As Double
public:
[ExtensionAttribute]
static double CentralDerivative(
Func<double, double>^ targetFunction,
double x,
[OutAttribute] double% estimatedError,
[OutAttribute] int% evaluationsNeeded
)
[<ExtensionAttribute>]
static member CentralDerivative :
targetFunction : Func<float, float> *
x : float *
estimatedError : float byref *
evaluationsNeeded : int byref -> float
Parameters
- targetFunction
- Type: SystemFuncDouble, Double
A delegate that represents a function of one variable that
specifies the function to differentiate. - x
- Type: SystemDouble
The point at which to evaluate the
derivative. - estimatedError
- Type: SystemDouble
On exit, this parameter contains
an estimate of the absolute error of the approximation.
- evaluationsNeeded
- Type: SystemInt32
On exit, this parameter contains the
number of function evaluations needed to calculate the numerical derivative.
Return Value
Type:
DoubleA numerical approximation to the derivative
of
targetFunction at
x.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
FuncDouble,
Double. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
Reference