Solve $y'\cos x + y \sin x= x \sin 2x + x^2$ Given a differential equation as below
$$y'\cos x + y \sin x= x \sin 2x + x^2.$$
I need some tips on how to start solving. What do I have to determine?
Homogenity, linearity, or exactness?

Writing your DE as $$y'+y\tan x=\frac{x\sin 2x+x^2}{\cos x},$$
the integrating factor is $$I=e^{\int\tan x dx}=\sec x$$
Therefore the solution is given by $$y\sec x=\int\frac{x\sin 2x+x^2}{\cos^2 x}dx$$
$$=\int2x\tan x+x^2\sec^2 x dx$$
$$\Rightarrow y\sec x=x^2\tan x+c$$
