Similarly with the rectifier circuit below (assume the resistor is replaced by a capacitor), how would I develop a mathematical expression for the output voltage if you cannot assume that the cap voltage reaches the peak input voltage in one cycle? Would I somehow have to find the points at which the diode switches, and continually calculate the voltage on the cap as it gains voltage over several cycles of the input voltage? I appreciate any help.