Fix the bug in function ApproximateJacobian: (1) fx should be inside the for loop; (2) Step size dx should be divided by f(x+v)-f(x)