Capacitor charging derivation formula