Answer
$y=\sin x \cos x+c$
Work Step by Step
Re-write the given differential equation as: $y'+(\tan x)y=\cos^2(x)$
The integrating factor is: $v(x)=e^{\tan x dx}=\dfrac{1}{\cos x}$
Now, $\int (\dfrac{1}{\cos x})y'+(\dfrac{\sin x}{\cos^2 x})y=\int \cos x dx$
$\int (\dfrac{1}{\cos x} y)'=\int \cos x$
or, $\dfrac{1}{\cos x}y=\sin x+c$
Hence, the General solution is:
$y=\sin x \cos x+c$