# Physical meaning of functional derivative of Coulomb potential energy

I am considering the problem of a conductor of arbitrary shape, and I want to prove (I reckon it's possible) that the field inside the conductor is zero assuming only that the charges are in a configuration of minimal potential energy. So I write the potential energy as a functional of the charge density $$U(\rho) = \frac{1}{8\pi\epsilon_0}\int_Vd^3x\int_Vd^3x'\,\frac{\rho(\vec x)\rho(\vec x')}{\lvert \vec x - \vec x'\rvert}$$ (where $$V$$ is the volume occupied by the conductor) and I perform the functional variation (like in this other question) $$\delta U = \frac{1}{4\pi\epsilon_0}\int_V d^3x \, \lambda(\vec x)\int_V d^3x'\,\frac{\rho(\vec x')}{\lvert\vec x - \vec x'\rvert}$$ For what I understand, a minimum (or at least a stationary point) of the energy functional should be found imposing that $$\delta U = 0$$ for every choice of $$\lambda$$ (probably under some mathematical constraint). So what I get is that the function $$\Phi(\vec x) = \frac{1}{4\pi\epsilon_0}\int_Vd^3x'\,\frac{\rho(\vec x')}{\lvert\vec x - \vec x'\rvert},$$ which is precisely the Coulomb potential, should vanish at (almost) every point inside the conductor. I was expecting that the field would be zero and the potential a constant, so, what is going on? Am I doing the math wrong? Or am I not getting what the physical meaning of what I am doing is?

The missing ingredient is conservation of charge. To enforce it, you need to add a Lagrange multiplier and find the extrema of the functional: $$U(\rho,\lambda) = \frac{1}{8\pi\epsilon_0}\left(\int_V \text d^3 x \int_V \text d^3x' \frac{\rho(x)\rho(x')}{|x-x'|} \right)+\lambda\left(Q-\int_{V}\text d^3 x\, \rho(x) \right).$$
Then, you find that the extremum is given by: $$0 = \frac{\delta U}{\delta\rho(x) } = \frac{1}{4\pi\epsilon_0}\left(\int_V\text d^3 x'\frac{\rho(x')}{|x-x'|}\right) -\lambda$$ i.e., the Coulomb potential is a constant, and the electric field is $$0$$.