$\begin{aligned}
& \frac{d y}{d x}+3\left(\sec ^2 x\right) y=\sec ^2 x, y(0)=\frac{1}{3}+e^3 \
& \text { If }=e^{3 \int \sec ^2 x d x}=e^{3 \tan x}
\end{aligned}$
∴ Solution is
$\begin{aligned}
& e^{3 \tan x} y=\int e^{3 \tan x} \sec ^2 x d x \
& e^{3 \tan x} y=\frac{e^{3 \tan x}}{3}+c \
& \because y(0)=\frac{1}{3}+e^3 \Rightarrow c=e^3 \
& \therefore y\left(\frac{\pi}{4}\right)=\frac{\frac{e^3}{3}+e^3}{e^3}=\frac{4}{3}
\end{aligned}$