A circuit consisting of a capacitor with capacitance \(C\) and a resistance \(R\) connected in series was connected at the moment \(t=0\) to a source of ac voltage \(V=V_{m} \cos \omega t .\) Find the current in the circuit as a function of time \(t\).