Answer
$y^2=8x^2\sin x + C$
Work Step by Step
Given:
$$y'-x^{-1}y=4x^2y^{-1}\cos x$$
$$\frac{xy'-y}{x}=\frac{4x^2}{y}\cos x$$
$$\frac{xy'-y}{x^2}=\frac{4x}{y}\cos x$$
Let $y=vx \rightarrow \frac{dv}{dx}=\frac{xy'-y}{x^2}$
Then it becomes:
$$v+x\frac{dv}{dx}=\frac{2-v}{1+4v}$$
$$\frac{dv}{dx}=\frac{4}{v}\cos x$$
$$vdv=4\cos xdx$$
Integrating both sides:
$\frac{v^2}{2}=4 \sin x +C$$
where $C$ is a constant of integration.
Subtitute when $y=vx $
$$\rightarrow \frac{y^2}{2x^2}=4 \sin x +C$$
The solution to the differential equation is:
$$y^2=8x^2\sin x + C$$