N-dimensional generalization of vector curl from elements of Jacobian

Solution 1:

On a simply connected region of $\mathbb{R}^n$ the condition is that, in your notation, jacobian[i,j]=jacobian[j,i] for any i,j. This generalizes your curl condition.

Explanation: your vector field corresponds to a $1$-form $\omega$, and the vector field is conservative if and only if $\omega=d\phi$ for some $0$-form $\phi$. If the base is simply connected, then this is equivalent to $d\omega=0$. Now $d\omega$ is a $2$-form, and the local coordinates with respect to the standard basis are the differences jacobian[i,j]-jacobian[j,i] for distinct i,j.