Function that computes the Jacobian matrix of f(x)