Given an electric circuit composed of an inductor with inductance L, a resistor with resistance R, and a capacitor with capacitance C, the Kirchhoff loop rule requires that the sum of the changes in potential around the circuit must be zero, so
where I is the current through the inductor, resistor and Q is the charge on the capacitor, and t is the elapsed time.
CL Circuit, CR Circuit, Simple Harmonic Motion Eric Weisstein's World of Math