1.DC isolation 2. Bypass 3. Coupling 4. Filter 5. Temperature compensation 6. Time 7. Tune 8. Rectification 9. Energy storage.
Both X capacitor and Y capacitor are safety capacitors, but the difference is that X capacitor is connected at both ends of the input line to eliminate crosstalk, and Y capacitor is connected between the input line and the ground!