Answer
See below
Work Step by Step
Given: $R=4\Omega\\C=\frac{1}{5}F\\E(t)=6\cos 2tV$
When switch is closed in circuit, we have:
$E(t)-iR-\frac{q}{c}=0$
Let $i=\frac{dq}{dt}$, we get: $E(t)-\frac{dq}{dt}R-\frac{q}{c}=0$
Substitute :$6\cos 2t-\frac{dq}{dt}4-5q=0\\
\rightarrow \frac{dq}{dt}+\frac{5}{4}q=\frac{3}{2}\cos 2t$
Integrating factor is: $I(t)=e^{\int \frac{5}{4}dt}=e^{\frac{5}{4}t}$
The equation becomes: $\frac{d}{dt}(qe^{\frac{5}{4}t})=\frac{3}{2}\cos 2te^{\frac{5}{4}t}$
Integrating both sides: $qe^{\frac{5}{4}t})=\int \frac{3}{2}\cos 2te^{\frac{5}{4}t}$
Using integration by parts, we have:
$q(t)=\frac{6}{89}(8\sin 2t+5\cos 2t)+ce^{-\frac{5}{4}t}$
Since $q(0)=3C$, we have: $c+\frac{30}{89}=3\\
\rightarrow c=\frac{237}{89}$
Hence, the solution is: $q(t)=\frac{6}{89}(8\sin 2t+5\cos 2t)+\frac{237}{89}e^{-\frac{5}{4}t}$
The current in the circuit is:
$i(t)=\frac{12}{89}(8\sin 2t-5\sin 2t)-\frac{1185}{356}e^{-\frac{5}{4}t}$