(N/A) An $LC$ circuit is shown in the figure. In this circuit,a capacitor $(C)$ and an inductor $(L)$ are connected in series. Let at time $t=0$,the capacitor be charged with a charge $q_m$.
The moment the circuit is completed,the charge on the capacitor starts decreasing,giving rise to a current $I$ in the circuit.
Let $q$ and $I$ be the charge and current in the circuit at any time $t$.
Since the current $I$ is increasing,$\frac{dI}{dt}$ is positive. The induced emf in the inductor $L$ will have a polarity as shown in the figure,meaning $V_a > V_b$.
As $q$ decreases,$I$ increases,therefore $I = -\frac{dq}{dt}$.
The induced emf in the inductor at any instant is given by $V = \varepsilon = -L \frac{dI}{dt}$.
The potential difference across the capacitor is $V_C = \frac{q}{C}$.
According to Kirchhoff's loop rule,the sum of potential differences around the closed loop is zero:
$-L \frac{dI}{dt} + \frac{q}{C} = 0$.
Since $I = -\frac{dq}{dt}$,we have $\frac{dI}{dt} = -\frac{d^2q}{dt^2}$.
Substituting this into the loop equation:
$-L \left( -\frac{d^2q}{dt^2} \right) + \frac{q}{C} = 0$
Therefore,the differential equation is $L \frac{d^2q}{dt^2} + \frac{q}{C} = 0$.