Self adjoint total covariant derivative Suppose $V$ is a smooth vector field on a Riemannian manifold $M$ and the total derivative of $V$ is self-adjoint (as an endomorphism of $TM$) i.e. 
$$\left< \nabla V(X), Y \right> = \left< X, \nabla V(Y) \right>$$
for all vector fields $X,Y$.  Why is $V$ locally a gradient?

Consider the dual one form $\omega$ of $V$ defined by $\omega(X) = \left<V, X \right>$. We have
$$ (d\omega)(X,Y) = X(\omega(Y)) - Y(\omega(X)) - \omega([X,Y]) = \\
X\left< V, Y \right> - Y \left< V, X \right> - \left<V, [X,Y] \right> = \\
\left< \nabla_X V, Y \right> + \left< V, \nabla_X Y \right> - \left< \nabla_Y V, X \right> - \left< V, \nabla_Y X \right> - \left< V, [X,Y] \right> = \\
\left<V, \nabla_X Y  - \nabla_Y X - [X,Y]\right> = 0.$$
Thus, $\omega$ is closed and so locally exact and you can locally find $f$ with $df = \omega$. But then
$$ \left< \nabla f, X \right> = df(X) = \omega(X) = \left< V, X \right> $$
for all relevant $X$ which implies that $\nabla f = V$.
