validating derivatives numerically