The purpose of a capacitor in a rectifier circuit is to:
**Rectifier applications** diode must have reverse breakdown voltage higher than peak inverse voltage, centre-tap transformer provides two opposite phase voltages for full-wave, capacitor discharges through load R_L when diode off, drift current in junction is minority carrier motion due to field, diffusion due to gradient, diode conducts when forward biased anode positive. A capacitor in a rectifier circuit filters out AC ripples by charging to the peak voltage and discharging slowly, smoothing the pulsating output to provide a steadier DC voltage. Substituting values gives Smooth the output
Ref: NCERT > Physics Book > Electronic Devices > Rectifiers, Filters and Applications