Resistance formula in capacitor circuit