Symbolic Math.Get Value And Derivative Method
Creates a function of one variable that
represents the derivative of the specified
function of one variable.
Definition
Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3
C#
A delegate that represents a function of one variable that represents the numerical derivative of targetFunction
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3
public static FunctionWithDerivative GetValueAndDerivative(
Expression<Func<double, double>> targetFunction
)
Parameters
- targetFunction Expression<Func<Double, Double>>
- A lambda expression that represents a function of one variable.
Return Value
FunctionWithDerivativeA delegate that represents a function of one variable that represents the numerical derivative of targetFunction
Remarks
The derivative is calculated symbolically from the supplied lambda expression. The expression must not contain loops or blocks. If functions are encountered for which no symbolic derivative is available, a numerical approximation is used.
Exceptions
Argument | targetFunction is null. |