npm.nicfv.com
    Preparing search index...

    Function differentiate

    • Take the derivative of a function.

      Parameters

      • f: (x: number) => number

        Function f(x)

      • x: number

        The x-value where to evaluate the derivative

      • epsilon: number = 1e-6

        Small step value

      Returns number

      f'(x)

      const y = SMath.differentiate(x => 3 * x ** 2, 2); // 12