Solution (source code)

= Solution

Let $a=R/(2L)$ and $\omega_d=\sqrt{1/(LC)-a^2}>0$. The roots of the <characteristic polynomial> are $-a\pm i\omega_d$, so the real underdamped solution is $Q=e^{-at}(A\cos\omega_dt+B\sin\omega_dt)$. The initial charge gives $A=Q_0$ and the zero initial current gives $B=aQ_0/\omega_d$. Hence
$$
\boxed{Q(t)=Q_0e^{-Rt/(2L)}\left[\cos(\omega_dt)+\frac{R}{2L\omega_d}\sin(\omega_dt)\right].}
$$
This solves the homogeneous <RLC circuit> equation supplied in the question. A nonzero applied voltage would appear as a forcing term and require a particular solution; it is not present in that equation.