To determine the energy stored in capacitor, consider initially two uncharged conductors 1 and 2. Imagine next a process of transferring charge from conductor 2 to conductor 1 bit by bit, so that at the end, conductor 1 gets charge Q.
By charge conservation, conductor 2 has charge –Q at the end.
In transferring positive charge from conductor 2 to conductor 1, work will be done externally, since at any stage conductor 1 is at a higher potential than conductor 2.
To calculate the total work done, we first calculate the work done in a small step involving transfer of an infinitesimal (i.e., vanishingly small) amount of charge. Consider the intermediate situation when the conductors 1 and 2 have charges Q' and –Q' respectively. At this stage, the potential difference V' between conductors 1 to 2 are Q' /C, where C is the capacitance of the system.
Next imagine that a small charge δQ' is transferred from conductor 2 to 1. Work done in this step (δW' ), resulting in charge Q' on conductor 1 increasing to Q' + δQ' , is given by
The total work done (W) is the sum of the small work (δ W) over the very large number of steps involved in building the charge Q' from zero to Q.
The same result can be obtained directly from Eq. by integration
The surface charge density s is related to the electric field E between the plates,