I was reading a solution when I came across this statement.
So $$\frac{\partial f_i}{x_j}=\frac{\partial f_j}{x_i}.$$ Then there exists a differentiable function $g$ on $\mathbb{R}^n$ such that $\frac{\partial g}{\partial x_i}=f_i$.
Why is this true?