test the derivative approx