
Let at t = 0, the capacitor is charged q _{m} and connected to an inductor.

Charge in the capacitor starts decreasing giving rise to current in the circuit.

Let
q → Charge
t→ Time
i→ Current
According to Kirchhoff’s loop rule,
This equation is of the form of a simple harmonic oscillator equation.
Where,
→ Maximum value of q
Φ → Phase constant
t = 0
q = ,
we have cosΦ= 1 or Φ= 0
∴ q = q _{ m } cos(ω_{0}t )
∴ i = i _{m} sinω_{0} t
Where, i _{m} = ω_{0} q _{m}

LC oscillations are similar to the mechanical oscillation of a block attached to a spring.

If a charged capacitor is connected across an inductor, charge will start to flow through the inductor, building up a magnetic field around it, and reducing the voltage on the capacitor. Eventually all the charge on the capacitor will be gone and the voltage across it will reach zero. However, the current will continue, because inductors resist changes in current, and energy to keep it flowing is extracted from the magnetic field, which will begin to decline. The current will begin to charge the capacitor with a voltage of opposite polarity to its original charge. When the magnetic field is completely dissipated the current will stop and the charge will again be stored in the capacitor, with the opposite polarity as before. Then the cycle will begin again, with the current flowing in the opposite direction through the inductor.