Three elements of capacitor charging and discharging