Capacitor Output Wave form

Capacitor Output Wave form

Why Capacitor and Inductor are used in Filtering Circuit
Inductor Output wave form