Energy Stored by a Capacitor

The ideal capacitor doesn't dissipate any of the energy provided to it. It stores the energy as an electric field between the conducting plates.
The energy stored in a capacitor is only the electric potential energy and is identified with the voltage and charge on the capacitor. Assuming the capacitance of a conductor is $C$, it is at first uncharged and it gets a potential difference $V$ when associated with a battery. Assuming $q$ is the charge on the plate around then, $$q = CV$$ The work done is equal to the product of the potential and charge. Hence, $$W = Vq$$ If the battery delivers a small amount of charge $dq$ at a constant potential V, then the work done is $$dW=Vdq=\frac{q}{C}dq$$ Now, the total work done in delivering a charge of an amount $q$ to the capacitor is given by $$W=\int_{0}^{q}\frac{q}{C}dq=\frac{1}{C}\frac{q^2}{2}=\frac{1}{2}\frac{q^2}{C}$$ Therefore the energy stored in a capacitor is given by $$\bbox[10px,border:1px solid grey]{U=\frac{1}{2}\frac{q^2}{C}}\tag{1}$$ Substituting $q=CV$ in the equation above, we get $$\bbox[10px,border:1px solid grey]{U=\frac{1}{2}CV^2} \tag{2}$$ A plot of the voltage, current, and power to a capacitor during the charging phase is shown in Fig. 1. The power curve can be obtained by finding the product of the voltage and current at selected instants of time and connecting the points obtained. The energy stored is represented by the shaded area under the power curve.
Fig. 1: Plotting the power to a capacitive element during the transient phase.
Example 1: For the network of Fig. 2, determine the energy stored by each capacitor.
Fig. 2: Example 1.
The network is already solved for voltages $V_{C1}=16V$ and $V_{C2} = 56$ in the example 2 of the previous section. To find energy stored by the capacitors we have to the formula: $$W_C=\frac{1}{2}CV^2 $$ For $C_1$: $$\begin{split} W_C &= \frac{1}{2}CV^2 \\ &= \frac{1}{2} 2 \times 10^{-6} (16 V)^2 \\ &= 1 \times 10^{-6} (256 V) = 256 \mu J \end{split}$$ For $C_2$: $$\begin{split} W_C &= \frac{1}{2}CV^2 \\ &= \frac{1}{2} 3 \times 10^{-6} (56 V)^2 \\ &= 1.5 \times 10^{-6} (3136 V) = 4704 \mu J \end{split}$$