# Energy in electrostatics and magnetostatics: why do factors $\frac{1}{2}$ appear?

The electrostatic potential energy of a point charge $q$ at potential $V$ is $$U_E=q V \tag{1}$$

The electrostatic potential energy of a capacitor that has been charged with charge $q$ at potential $V$ is $$U_E=\frac{1}{2}q V \tag{2}$$

The magnetic energy of a single loop of (constant) current $i$ in a (uniform) magnetic field $B$ is $$U_M=-m \cdot B=\mathrm{i \Phi(B)} \tag{3}$$ Where $\bf{m}$ is its magnetic moment.

The magnetic energy of a single loop of (constant) current $i$ in a (uniform) magnetic field $B$, when the process of setting up the current in the loop is consider, becomes: $$U_M=\frac{1}{2}i \Phi(B) \tag{4}$$

My question is: why when these factors $\frac{1}{2}$ appear exactly?

I mean, if one does the calculation they comes out with no doubt, but take the case of the loop in magnetic field: it seems quite paradoxical that the same loop, firstly consider as a "magnetic dipole" and then as a loop (with self inductance $L$) reaches two different energies in the same field $B$.

The same for the electrical case: if I consider a "very little" conductor, I should get the same thing as of the single point charge but that's not the case.

Besides why I get the factors $\frac{1}{2}$ I would like to know how can I relate the two cases, that is, for example in the magnetic case, how do I get to $(3)$ from $(4)$? If I start with a loop and $(4)$ holds, can I get to $(3)$ under some assumptions?

My question is: why when these factors $\frac{1}{2}$ appear exactly?

In the case of the point charge, the electric potential $V(\mathbf{r})$ does not depend on the charge $q$ of the test particle. Assuming zero potential at infinity, the potential is defined as the work done per unit charge in (slowly) bringing a unit test charge in from infinity to $\mathbf{r}$.

In the case of the capacitor, the voltage $V(q)$ is a function of the charge $q$ separated:

$$V(q) = \frac{q}{C}$$

The work done in separating the charge $q$ is given by

$$W(q) = \int_0^q\mathrm{d}q'\; V(q') = \int_0^q\mathrm{d}q'\; \frac{q'}{C} = \frac{1}{2}\frac{q^2}{C} = \frac{1}{2}CV^2$$

This work equals the electrostatic potential energy stored in the capacitor.

Similar reasoning applies to the current loop cases

Regarding the capacitor: it starts at charge "0" with no E field, so the 1st charge requires no energy. Half way through charging, the field is E_final/2. The last little bit of charge, dQ, is at the full field so is (dQ)E_final. Basically, it's a ramp-up, and the average of a linear ramp is 1/2 the final 'height'.

The answer for the capacitor is simply that the capacitor starts out with zero potential across it, so the first charge is easy to separate. It only reaches V by the time the last of q gets separated, so the electric field is ramping up and on average has only a potential of V/2.

For the current loop, I suspect that the field you are referring to actually comes from the current, rather than being externally present, so again the field is built up as the current rises. This one is a bit trickier, because it is the rate of change of magnetic flux that creates a voltage that the current must work against. So the rate of work is IV, and V is proportional to dB/dt, and since B is proportional to I that means the rate of work is proportional to I times dI/dt. That's the same as 1/2 dI^2/dt, so when you integrate over t, you get that the work done is proportional to 1/2 I^2, not I^2. Since B comes from I, that gives you 1/2 IB, not IB. The 1/2 comes from the fact that the first dI/dt is built up against no field, and on average, all the later dI/dt is built up against an average field of B/2.

Note that if the field is not coming from the current, but is a much larger (and constant) external field, then there is no 1/2.

The a half factor comes from the integration of the equation you denoted with 1 as you can see in the other answers. On a capacitor you have a +q charge on one plate and a -q charge on the other, so if you are compressing your capacitor to a point you don't get a +q charge as you suggest, but you are getting no charge at all. That maybe can help making clear why equation 1 is not the limit of equation 2 as the capacitor becomes a point. Hope this is correct, I'm still going to High School and I like studing Physics, but I maybe be wrong. For the magnetic case I guess it's something similar, maybe you can find out