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