Capacitor voltage and current formula