Consider a simple RC circuit as shown in Figure 1.
Process 1 : In the circuit the switch S is closed at t = 0 and the capacitor if fully charged to voltage V0 (i.e., charging continues for time T > > RC). In the process some dissipation (ED) occurs across the resistance R. The amount of energy finally stored in the fully charged capacitor is EC.
Process 2 : In a different process the voltage is first set to and maintained for a charging time T >>RC. Then the voltage is raised to without discharging the capacitor and again maintained for a time T >> RC. The process is repeated one more time by raising the voltage to V0 and the capacitor is charged to the same final voltage V0 as in Process 1.
These two processes are depicted in figure 2.

Know your College Admission Chances Based on your Rank/Percentile, Category and Home State.
Get your JEE Main Personalised Report with Top Predicted Colleges in JoSA
In Process 1, the energy stored in the capacitor EC and heat dissipated across resistance ED are related by :
In Process 2, total energy dissipated across the resistance ED is:
ED = Work done by battery – energy stored in capacitor
= q1 + q3 + q3V0 – CV02
q = q2 = q3 =
ED = CV02
ED = CV02