A series electric circuit contains a resistance $R$, a capacitance $C$ and a battery supplying a time-varying electromotive force $V(t) .$ The charge $q$ on the capacitor therefore obeys the equation
$$
R \frac{d q}{d t}+\frac{q}{C}=V(t)
$$
Assuming that initially there is no charge on the capacitor, and given that $V(t)=V_{0} \sin \omega t$, find the charge on the capacitor as a function of time.