I am trying to prove that if $\vec v$ is a continuously differentiable vector field define on $\mathbb R^n$ and satisfies
$$\frac {\partial v_i} {\partial x_j} = \frac {\partial v_j} {\partial x_i}$$
then $\nabla f(x) = \vec v(x)$ where $f(x) = \int_0^1 x \cdot \vec v(tx) \, \mathrm d t$.
This is my attempt: It suffices to prove $v_i(x) = \frac {\partial f(x)} {\partial x_i}$.
I shall use implicit summation over $j$ here when I apply the chain rule. I first use the fundamental theorem of calculus: $$\begin{align} v_i(x) & = \int _0^1 \frac {\partial v_i(tx)} {\partial t}\, \mathrm d t + v_i(0) \\ & = \int_0^1 \frac {\partial v_i(tx)} {\partial x_j} \frac {\partial x_j} {\partial t}\, \mathrm d t + v_i(0) \\ & = \int_0^1 \frac {\partial v_j(tx)} {\partial x_i} \frac {\partial x_j} {\partial t}\, \mathrm d t + v_i(0) \end{align}$$
I shall also use implicit summation over $j$ here when I expand out the dot product: $$\begin{align} \frac {\partial f(x)} {\partial x_i} & = \int_0^1 \frac {\partial } {\partial x_i} \left( x_j v_j(tx)\right) \, \mathrm d t \\ & = \int_0^1 v_i(tx) + x_j \frac {\partial v_j(tx)} {\partial x_i}\, \mathrm d t\end{align}$$
I am rather stuck here though and not sure how to proceed. Any hints would be appreciated. Have I made any mistakes so far?
You drop a t taking a partial derivative. The derivation goes like this:
$\begin{align} \frac {\partial f(x)} {\partial x_i} & = \int_0^1 \frac {\partial } {\partial x_i} \left( x_j v_j(tx)\right) \, \mathrm d t \\ & = \int_0^1 v_i(tx) + x_j \frac {\partial} {\partial x_i}[v_j(tx)]\, \mathrm d t = \int_0^1 v_i(tx) + x_j \frac {\partial v_j} {\partial x_i}(tx)*t \,\, \mathrm d t \\ & = \int_0^1 v_i(tx) + t\,x_j \frac {\partial v_i} {\partial x_j}(tx)\, \mathrm d t \\ & = \int_0^1 v_i(tx) + t \ \frac{d}{dt} [v_i(tx)]\, \mathrm d t = \int_0^1 \frac{d}{dt} [t \ v_i(tx)]\, \mathrm d t \\ & = \ \ t \ v_i(tx)\Big{|}_0^1 = v_i(x)\\ \end{align}$