second_derivative

Function second_derivative 

Source
pub fn second_derivative<N: ComplexField + FromPrimitive + Copy>(
    f: impl Fn(N::RealField) -> N,
    x: N::RealField,
    h: N::RealField,
) -> N
Expand description

Numerically find the second derivative of a function at a point.

Given a function of a real field to a complex field, an input point x, and a step size h, calculate the second derivative of f at x using the five-point method.

Making h too small will lead to round-off error.