In our case the capacitance is 8 mF and our potential difference was 4000 V. This gives an energy of: