How capacitors are equivalent to resistance and voltage