A coil with active resistance \(R\) and inductance \(L\) was connected at the moment \(t=0\) to a source of voltage \(V=V_{m} \cos \omega t\). Find the current in the coil as a function of time \(t\).