resistor inductor capacitor formula