Can Potential Energy of electrostatic system depend on the way charges are assembled ? 
This a snapshot of Feynman Vol II, Sec 8.1 (The electrostatic energy of charges: A uniform sphere). The author here finds the interaction energy by assembling a system of charges picking them up from infinity and ends up layering them on a sphere to create a uniform charge density. What if I follow some other process, what guarantees a same value of interaction energy?
 A: The fact that the interaction energy is independent of the way you bring the charges together relies heavily on two assumptions:


*

*The electrostatic (Coulomb) force is conservative.

*The interaction energy is additive.
A conservative force is one which can be written like $\textbf{F}=-\boldsymbol{\nabla}\Phi$ for some function $\Phi$. Equivalently, it implies that the line integral of $\textbf{F}$ along a curve $C$ which runs from $a$ and $b$ in a piecewise smooth manner
$$\int_C\textbf{F}\cdot\mathrm{d}\textbf{r}=\Phi(a)-\Phi(b)$$
is independent of the path chosen between the points $a$ and $b$. Since $\Phi$ in this case is exactly the definition of $U$, the notion that a force is conservative is exactly the same notion as that field coming from a defined potential energy function.
Since $\textbf{F}$ is conservative in the case of the Coulomb interaction, and the interaction energy caused by bringing in a particle from infinity is simply given by the line integral above, it's clear that the energy is independent of the exact path taken.
Next, we need the interaction energies to be additive. This is simple enough to understand, so let me put it into words first:
The force on a charged particle in a Coulomb interaction is simply the sum of the charges acting on it.
In mathematical notation, we have
$$\textbf{F}_j=\sum_{i\neq j}\textbf{F}_{ij},$$
where $\textbf{F}_j$ is the total force acting on the particle $j$ and $\textbf{F}_{ij}$ is the force on $j$ caused by $i$. Since the forces superimpose, it is easy to see that the potential energy of a particle is the sum of the interaction energies between every other particle and itself, namely
$$U_j=\sum_{i\neq j}U_{ij}.$$
Since each force in question is conservative, the entire force is conservative (since the gradient operator is linear), and so the total energy of the system is
$$U=\sum_{j}\sum_{i\neq j}U_{ij}$$
is independent of the path or process chosen (so long as that process is conservative).
I really like this question. It shows that many experienced physicists (even the best science communicators of all time) are prone to taking certain assumptions for granted. It's important to always remember that our students don't have the same assumptions as us in their heads.
If anyone finds that I've gone wrong somewhere, let me know! I hope this helps!
