I realise there are a great number of questions to do with 'differentiating with respect to a vector', and I have had a look at the ones that came up when I did a search, however none of them seemed to answer my question.
I am considering gravitational fields (although I think my question is more about the mathematics, so put it here rather than physics SE. Please let me know if it would be better suited there.); suppose I start off with the definition of the gravitational field $\textbf{g(r)}$ as being the force on a unit mass when placed at a point in the field.
Then I define $\Phi(\textbf{r})$ as the work done by an external force to move a unit mass from a point $\textbf{r}_0$ which is assigned a value $\Phi(\textbf{r}_0)=0$, to a point $\textbf{r}$. Then from this definition we get the relation
$\Phi(\textbf{r})=\int_{\textbf{r}_0}^{\textbf{r}}-\textbf{g(r')} \cdot d\textbf{r'}$
Now I am trying to get at $\nabla \Phi =-\textbf{g}$, but I am not sure how to go from the integral form to this.
If I had an ordinary integral involving only scalars, I would say
$F=\int_a^xf(x')dx' \implies \frac{dF}{dx}=f$.
The only thing I seem to be able to do here is
$\Phi(\textbf{r})=\int_{\textbf{r}_0}^{\textbf{r}}-\textbf{g(r')} \cdot d\textbf{r'} \implies d\Phi=-\textbf{g(r)} \cdot d\textbf{r}$
or
$\nabla \Phi \cdot d\textbf{r} =-\textbf{g(r)} \cdot d\textbf{r}$
But this of course leaves one degree of freedom in the direction perpendicular to $d\textbf{r}$ and I cannot draw equality...
I was wondering if the way out of this is simply that it is explicitly stated/assumed that $\textbf{g(r)}$ acts exactly in the direction of $\nabla \Phi$, or whether I have perhaps lost information in any of my steps.
Thank you in advance.
You have defined $\Phi(\mathbf{r})$ as the work done by an external force to move a unit mass from $\mathbf{r}_0$ to $\mathbf{r}$. This is actually ill defined unless you know in advance that the work done by such a force does not depend on the path taken from $\mathbf{r}_0$ to $\mathbf{r}$. Assuming this is the case, you can calculate the work along any path you want from $\mathbf{r}_0$ to $\mathbf{r}$.
Let's write $$\mathbf{g} = g_1 \mathbf{e}_1 + g_2 \mathbf{e}_2 + g_3 \mathbf{e}_3, \\ \mathbf{r_0} = x_0 \mathbf{e}_1 + y_0 \mathbf{e}_2 + z_0 \mathbf{e}_3, \\ \mathbf{r} = x \mathbf{e}_1 + y \mathbf{e}_2 + z \mathbf{e}_z. \\$$
In order to show that $\frac{\partial \Phi}{\partial x} = -g_1$ we can choose to calculate the work along the path $$\mathbf{r}'(t) := t \mathbf{e}_1 + y \mathbf{e}_2 + z \mathbf{e}_3, \\ \dot{\mathbf{r}}'(t) = \mathbf{e}_1 $$
which starts when $t = x_0$ at $\mathbf{r}_0$ and ends when $t = x$ at $\mathbf{r}$ traveling only along $\mathbf{e}_1$ at constant velocity (so that the $y-z$ coordinates are fixed). Then we have
$$ \Phi(\mathbf{r}) = -\int_{\mathbf{r'}} \mathbf{g} = \int_{x_0}^x \mathbf{g}(\mathbf{r'(t)}) \, \cdot \mathbf{r'(t)} \, dt = -\int_{x_0}^{x} \mathbf{g}(t,y,z) \cdot \mathbf{e}_1 \, dt = -\int_{x_0}^{x} g_1(t,y,z) \, dt. $$
Now we can use the fundamental theorem of calculus to differentiate $\Phi(\mathbf{r})$ in the direction $\frac{\partial}{\partial x}$ leaving $yz$ fixed to get
$$ \frac{\partial \Phi}{\partial x}(x,y,z) = -g_1(x,y,z). $$
Similarly, you can choose a path that travels only along $\mathbf{e}_2$ and use it together with the fundamental theorem of calculus to calculate $\frac{\partial \Phi}{\partial y}$ and so on.