Basically, we were given an equation: $$V_1 - V_2 = \int_{r_1}^{r_2}\vec{E}\cdot d\vec{r}$$
where $\vec{E}$ is the electric field distribution and $d\vec{r}$ is the displacement vector of the charge.
Suppose that, in a 3D space, the electric field is $$\vec{E} = E_x \hat{i} + E_y \hat{j} + E_z \hat{k}$$ and the displacement vector is $$d\vec{r} = d_x \hat{i} + d_y \hat{j} + d_z \hat{k}$$
Given $V = V(x, y, z)$, we have to prove that
$$E = -\vec{\nabla} V$$
Which make a whole lot of sense, considering that the equations for gradient theorem and line integral state so. However, assuming I have no clue what the gradient theorem is, how would I go about proving $E = -\vec{\nabla} V$ using only the given equations above?
I know that if $V$ and $E$ were merely functions of $x$: $$V(x) = \int_{x_o}^{x} E(x)dx$$ we can differentiate both sides with respect to the upper limit to get: $$\frac{\partial V}{\partial x} = -E(x)$$ But how would I go about doing that if it was a 3D space? Do I need to use some electrostatic concepts, or is this all just basic calculus that I've long forgotten? I think I'm really overthinking this because my brain says it's simple, yet I just can't think of a way.
It can be answered with plain mathematics. I'll paraphrase a proof given in Vector Analysis and Introduction to Tensor Analysis by Spiegel.
If $\mathbf{F}$ is a vector field whose path integral between two points is independent of the path taken, then denote $\phi(\mathbf{r})=\int_\mathbf{r_1}^\mathbf{r}\mathbf{F}\cdot d\mathbf{r}$, where $\mathbf{r_1}$ is an arbitrary but constant vector. If $s$ parameterizes position:
$$\phi(\mathbf{r})=\int_\mathbf{r_1}^\mathbf{r}\mathbf{F}\cdot \frac{d\mathbf{r}}{ds} ds$$
By differentiation with respect to $s$, (that is, as $r$ travels along a path):
$$\frac{d\phi}{ds}=\mathbf{F}\cdot \frac{d\mathbf{r}}{ds}$$
But we also know, with directional derivatives:
$$\frac{d\phi}{ds}=\nabla \phi \cdot \frac{d\mathbf{r}}{ds}$$
and since these two equalities hold irrespective of $\frac{d\mathbf{r}}{ds}$,
$$\mathbf{F}=\nabla \phi$$