Answer
$y=\frac{3}{2} \sin 2 t+\frac{3}{4} \frac{\cos 2 t}{t}+\frac{c}{t}$
Work Step by Step
\begin{equation}
\begin{array}{l}
y^{\prime}+\left(\frac{1}{t}\right) y=3 \cos 2 t, t>0 \\
\text { We solve this by integrating factor method}\\
\text { we first find the integrating factor}\\
\end{array}
\end{equation}
$p(t)=1 / t$
$\mu(t)=e^{\int p(t) d t}$
$\mu(t)=e^{\int 1 / t} d t$
$\mu(t)=e^{\ln t}$
$\mu(t)=t$
Multiplying both sides by $\mu(t)$
$t\left(y^{\prime}+\left(\frac{1}{t}\right) y\right)=t \cdot 3 \cos 2 t$
$t y^{\prime}+y \quad=\quad t \cdot 3 \cos 2 t$
Simplifying Left hand side.
$(t y)^{\prime}=t \cdot 3 \cos 2 t$
integrating on both sides
$\int(t y)^{\prime} d t=3 \int t(\cos 2 t) d t$
$t y=3 \int t \cdot \cos 2 t d t$
integrating the right hand side using integrating by parts
$\int t \cos 2 t d t=t \frac{\sin 2 t}{2}-\int \frac{\sin 2 t}{2} dt$
$=t \cdot \frac{\sin 2 t}{2}-\frac{1}{2}\left(-\frac{\cos 2 t)}{2}\right)$
substituting the right hand side
$t y=3\left[\left(\frac{t}{2}\right) \cdot \sin 2 t+\left({1/4}\right) \cdot \cos 2 t\right]$
further simplifying by dividing both sides by t, here c is the integrating factor
\begin{equation}
\begin{array}{l}
t y=\frac{3}{2} \cdot t \cdot \sin 2 t+\frac{1}{4} \cdot \cos 2 t+c \\
y=\frac{3}{2} \sin 2 t+\frac{3}{4} \frac{\cos 2 t}{t}+\frac{c}{t}
\end{array}
\end{equation}