The formula for calculating the electric energy of a capacitor