Working principle of capacitor and coil