Given $\phi$ a mapping. Prove that for each $\mathit{i}$, $\sum_{j=1}^n \partial_{x_j}(\mathbf{cof} \mathit{D} \phi)_{ji} \equiv 0$ Let $\phi \in \mathit{C}^2 (\mathbb{R}^n , \mathbb{R}^n)$. Let $\mathbf{cof} \mathit{D} \phi$ be the cofactor of $\mathit{D} \phi$ (the Jacobian matrix of $\phi$). i.e. $$(\mathbf{cof} \mathit{D} \phi)_{ij} =(-1)^{i+j}*(\mathit{D} \phi)_{ji}$$where $(\mathit{D} \phi)_{ji}$ is the determinant of the submatrix of $\mathit{D} \phi$ obtained by deleting the $\mathit{j}$ th row and $\mathit{i}$ th column.
Prove that for each $\mathit{i}$, $$\sum_{j=1}^n \partial_{x_j}(\mathbf{cof} \mathit{D} \phi)_{ji} \equiv 0$$
I tried many ways, but all failed. And I think this problem may have something to do with closed differential forms, but I can't give a proof.
 A: 1st Proof. By rearranging the components of $\phi = (\phi_1, \cdots, \phi_n)$ if needed, we may asume that $i = 1$. Let $S_n$ denote the set of all permutations on $\{1,\cdots,n\}$. In light of the cofactor expansion of the determinant,
$$ \sum_{j=1}^{n} \partial_{x_j}(\mathbf{cof}D\phi)_{j1} = \sum_{j=1}^{n} (-1)^{i+j} \partial_{x_j}(D\phi)_{1j} $$
is equal to the formal determinant
$$ \det(\nabla, \nabla \phi_{2}, \dots, \nabla \phi_n) = \sum_{\sigma \in S_n} \operatorname{sign}(\sigma) \partial_{x_{\sigma(1)}} \prod_{k : k \neq 1} \partial_{x_{\sigma(k)}} \phi_k. $$
By the product rule,
$$ = \sum_{j=2}^{n}  \sum_{\sigma \in S_n} \operatorname{sign}(\sigma) (\partial_{x_{\sigma(1)},x_{\sigma(j)}}\phi_j) \prod_{k : k \neq 1, j} \partial_{x_{\sigma(k)}} \phi_k. $$
Now by grouping the terms according to the value of the list $(\sigma(k))_{k\neq 1,j}$, it is not hard to see that each group contains exactly two terms which cancel out each other. Therefore the overall sum is also zero.
2nd Proof. Here is a solution using Stokes' Theorem:
The identity is equivalent to
$$ \forall \varphi \in C_c^{\infty}(\mathbb{R}^n) \ : \qquad \int_{\mathbb{R}^n} \varphi \sum_{j=1}^{n} \partial_{x_j}(\mathbf{cof}D\phi)_{ji} = 0. $$
Writing $I$ for the integral in the left-hand side, integration by parts shows that
$$ I = \int_{\mathbb{R}^n} \sum_{j=1}^{n} (\partial_{x_j}\varphi)(\mathbf{cof}D\phi)_{ji}
= \int_{\mathbb{R}^n} \det(D\tilde{\phi}), $$
where $\tilde{\phi}$ is the function whose $i$-th component is replaced by $\varphi$ and the last line follows from the cofactor expansion of the determinant along the $i$-th row. Assuming WLOG that $i = 1$, this means that
$$\tilde{\phi} = (\varphi, \phi_2, \phi_3, \dots, \phi_n).$$
Now fix a closed ball $\overline{B}$ large enough so that the support of $\varphi$ lies in the interior of $\overline{B}$. Then
$$ I = \int_{\overline{B}} d\varphi \wedge d\phi_2 \wedge \dots \wedge d\phi_n = \int_{\overline{B}} d (\varphi \, d\phi_2 \wedge \dots \wedge d\phi_n). $$
So, by the Stokes' Theorem,
$$ I = \int_{\partial \overline{B}} \varphi \, d\phi_2 \wedge \dots \wedge d\phi_n = 0 $$
since $\varphi \equiv 0$ on $\partial\overline{B}$. This proves the desired claim.
