Answer
\[y^{-2}=2\cos x+\frac{C}{\cos x}\]
Work Step by Step
\[\frac{dy}{dx}+\frac{1}{2}(\tan x)y=2y^3 \sin x\]
\[y^{-3}\frac{dy}{dx}+\frac{1}{2}(\tan x)y^{-2}=2 \sin x\;\;\;\ldots (1)\]
Substitute $\;u=y^{-2}\;\;\;\ldots (2)$
Differentiate (2) with respect to $x$
\[\frac{du}{dx}=-2y^{-3}\frac{dy}{dx}\;\;\;\ldots (3)\]
Using (2),(3) in (1)
\[\frac{-1}{2}\frac{du}{dx}+\frac{1}{2}(\tan x)u=2\sin x\]
\[\frac{du}{dx}-(\tan x)u=-4\sin x\;\;\;\ldots (4)\]
This is linear differential equation
Integrating Factor:- \[e^{-\int\tan x dx}=e^{\ln |\cos x|}=\cos x\]
Multiply (4) by $\cos x$
\[\cos x\frac{du}{dx}-(\sin x)u=-4\sin x\cos x\]
\[\frac{d}{dx}(u\cos x)=-4\sin x\cos x\]
Integrating,
\[u\cos x=4\int\cos x(-\sin x)dx+C\]
Where $C$ is constant of integration
Substitute $\;t=\cos x\;\;\;\ldots (5)$
\[\Rightarrow dt=-\sin x dx\]
\[u\cos x=4\int tdt+C\]
By (5)
\[u\cos x=2(\cos x)^2+C\]
\[u=2\cos x+\frac{C}{\cos x}\]
From (2)
\[y^{-2}=2\cos x+\frac{C}{\cos x}\]
Hence, \[y^{-2}=2\cos x+\frac{C}{\cos x}.\]