For any instant $t$:
$$\frac{Q}{C} = RI$$
We want to relate the amount of charge that passes through the resistor to what happens at the plates of the capacitor. If, for a small interval $\delta t$ $$I = \frac{\delta q}{\delta t}$$ it corresponds to a loss of charge in the capacitor:$\delta q = -\delta Q$
So the correct differential equation is (when $\delta t$ go to $0$):
$$\frac{Q}{C} = R\frac{-dQ}{dt} = -R\frac{dQ}{dt}$$
So, we have series LCR circuit. $V$ is a constant voltage source. $L$, $C$, and $R$ represents the inductance, capacitance and resistance in the circuit respectively. A current $I$ flows through the circuit.
Now, the current through each component is the same. So, the potential difference between each component added up together gives the emf $V$. Hence the differential equation becomes:
$$L\frac{dI}{dt}+\frac{Q}{C}+IR=V$$
where $Q$ is the charge on the capacitor and is related to the current by $I=\displaystyle{\frac{dQ}{dt}}$. This means we have only one unknown in the equation if we replace all $I$ in terms of $Q$:
$$L\frac{d^2Q}{dt^2}+R\frac{dQ}{dt}+\frac{Q}{C}=V$$
which is a second order differential equation. Differentiating again w.r.t $t$ and rewriting in terms of $I$, we get
$$L\frac{d^2I}{dt^2}+R\frac{dI}{dt}+\frac{I}{C}=\frac{dV}{dt}$$
Since we have a constant dc voltage source, $\displaystyle{\frac{dV}{dt}=0}$. Hence
$$L\frac{d^2I}{dt^2}+R\frac{dI}{dt}+\frac{I}{C}=0$$
Dividing throughout by $L$, we have
$$\frac{d^2I}{dt^2}+\frac{R}{L}\frac{dI}{dt}+\frac{I}{LC}=0$$ or
$$\frac{d^2I}{dt^2}+2\alpha\frac{dI}{dt}+\omega_0^2 I=0$$
where $\displaystyle{\alpha=\frac{R}{2L}}$ and $\displaystyle{\omega_0=\frac{1}{\sqrt{LC}}}$
This is an ODE with constant coefficients. The characteristic equation of this differential equation is given by:
$$s^2+2\alpha s+\omega_0^2=0$$
The roots of this equation in $s$ are:
$s_1=-\alpha +\sqrt{\alpha^2-\omega^2}$ and $s_2=-\alpha -\sqrt{\alpha^2-\omega^2}$
The general solution is given by:
$$I(t)=A_1e^{s_1t}+A_2e^{s_2t}$$.
Now, at $t=0$, let the current be zero. On switching on the current, then the current rises to a maximum value exponentially. Otherwise, it takes a finite time for the current to have a constant value in the circuit . The current will not instantly rises to a maximum value. This is due to the presence of inductance and capacitance in the circuit. This is why we say, unlike in the resistive circuit, in an LCR circuit, the current will be zero, just immediate after the switch is closed.
Best Answer
Recognize the initial condition: at t=0, no current is flowing. That means that the charge is a maximum at t=0, and that means that B=0. For a different initial condition, the equation just means there is a phase shift - that is, you could write $\cos\omega t + \phi$ instead of introducing a complex amplitude.
When we use complex numbers for solving harmonic equations, it is really just because it usually makes the math easier (more so if you use $Ae^{i\omega t}$ notation with $A$ a complex number): the actual amplitude at a given moment in time is the real part of the expression.