### Energy Stored in a Capacitor

When the capacitor is charged, energy is expended by the charging source. This is because charging the capacitor means the transfer of the charges from one plate to the another. This transfer is against the opposition due to potential difference across the plates. Due to this, there is expenditure of energy on the part of charging source. This energy is stored in the capacitor in terms of the electrostatic field set up in the dielectric medium. However, when the capacitor is discharged, this field collapse and energy stored in it is released.
Derivation of expression :
Let us determine the energy expended charging a capacitor of capacitance C farads to a voltage V
Let at any instant of charging, the potential difference across the plates be 'V' volts. As per definition, it is equal to the work done in shifting one coulomb of charge from one plate to another.
Now, if the charge of the capacitor is raised by a small amount 'dq' coulombs, the work done is,

This work done is ultimately stored in the capacitor as a potential energy.
Therefore, the total energy stored when it is finally charged to 'Q' coulombs can be obtained as,