I'm a TA for calc 3, and one of my students asked me to help them understand a proof from lecture. The instructor was proving directly that if a vector field is path-independent, then it must be conservative (i.e. is a gradient of a potential function.)
The proof (or sketch thereof) the student had in their notebook seemed to proceed as follows:
Since the vector field $\mathbf{F}(x,y,z)=(M(x,y,z),N(x,y,z),P(x,y,z))$ is path-independent, we can construct a well-defined function, $$f(x,y,z) := \int_{(a,b,c)}^{(x,y,z)}\mathbf{F}\cdot d\mathbf{s},$$ where $(a,b,c)$ is some fixed point in the domain of $\mathbf{F}$, and the line-integral above should be interpreted as beginning at $(a,b,c)$ and ending at $(x,y,z)$.
Our goal is to show that $\nabla f(x,y,z) = \mathbf{F}(x,y,z)$.
Since the definition of $f$ is path-independent, we cleverly construct the following curves, joining $(a,b,c)$ to $(x,y,z)$: $$\mathbf{c}_1(t) = (t,b,c), \quad \text{for }a\leq t \leq x$$ $$\mathbf{c}_2(t) = (x,t,c), \quad \text{for }b\leq t \leq y$$ $$\mathbf{c}_3(t) = (x,y,t), \quad \text{for }c\leq t \leq z$$
Since $\mathbf{c}_i'(t)= \mathbf{e}_i$, then $f$ takes the form: $$f(x,y,z) = \int_{a}^{x}M(t,b,c)\,dt + \int_{b}^{y}N(x,t,c)\,dt + \int_{c}^{z}P(x,y,t)\,dt$$
It's at this point that the student's note start to breakdown, and I am having some trouble reconciling the rest of this proof. The issue I immediately see is that if you try and compute $\frac{\partial}{\partial x}f(x,y,z)$ directly, you get the following, $$\partial_x f(x,y,z) = M(x,b,c) + \int_{b}^{y}\frac{\partial N}{\partial x}(x,t,c)\,dt + \int_{c}^{z}\frac{\partial P}{\partial x}(x,y,t)\,dt,$$ after applying the FTC to the first integral and differentiating under the integral on the other two. Ideally, we should have found that $\partial_x f(x,y,z) = M(x,y,z)$, but I do not see how this follows from the above computation.
Similarly, we run into issues when we try computing $\partial_y f$. Computing $\partial_z f$, on the other hand, is straightforward since the only place $z$ occurs in $f(x,y,z)$ is on the last integral; therfore $\partial_z f = P$ directly by the FTC.
What am I missing from this proof? Or was the instructor's idea wrong from the start, and should be prove the implication in some other way altogether?
There's no real problem here. Notice that nowhere in your solution have you actually used the fact that the field is conservative. You've picked a special path, sure. But you can evaluate any vector field along the same path and reach the same conclusions that you did. What you've derived is a relation between the components of any vector field. For the case of path independence, you can show that your identity more or less comes from the equality of mixed partials.
Instead, you should notice that for your path, the $z$-derivative is truly given by $P(x,y,z)$, i.e., $$\partial_z f(x,y,z) = P(x,y,z).$$ So your particular choice of path has provided you with one of the components you need.
Now you can evaluate the same integral along two other paths, namely
$$\begin{eqnarray} \mathbf{a}_1(t) & = (a,t,c),\ \ \ \ \ \text{for } b\le t \le y\\ \mathbf{a}_2(t) &= (a,y,t),\ \ \ \ \ \text{for }c\le t \le z \\ \mathbf{a}_3(t) &= (t,y,z),\ \ \ \ \ \text{for }a\le t \le x\end{eqnarray},$$ which will give you the $x$-component, and $$\begin{eqnarray} \mathbf{b}_1(t) & = (a,b,t),\ \ \ \ \ \text{for } c\le t \le z\\ \mathbf{b}_2(t) &= (t,b,z),\ \ \ \ \ \text{for }a\le t \le x \\ \mathbf{b}_3(t) &= (x,t,z),\ \ \ \ \ \text{for }b\le t \le y\end{eqnarray},$$ which will give you the $y$-component.