Calculates a numerical derivative with accuracy determined by the value of delta x for the specified funtion