How to calculate the stable voltage of a capacitor