The capacitor C is initially without charge. X is now joined to y fig. for a long time, during which H1,
heat is produced in the resistance R. X is now joined to Z for a long time, during which H2, heat is produced in R
When X is joined to Y for a long time, the charging of condenser takes place. In charging, the energy stored in capacitor is equal to the heat produced in resistance R, i.e., energy stored in capacitor is H1 . When X is joined to Z for a long time, the discharging of condenser takes place. In discharging process, the energy already stored in
capacitor C, i.e., H1, now reappears as heat H2, in resistor R. Thus H1 = H2.