Answer
$y=\sin x(-\ln |sin x|+C)$
Work Step by Step
We are given:
$$y'=\cos x(\csc x-1)$$
$$y'=\cos x \csc x - \cos x$$
$$y'-\frac{\cos x}{\sin x}=-\cos x$$
Integrating factor:
$$I=e^{-\frac{\cos x}{\sin x}dx}=e^{-\ln |\sin x|}=(\sin x)^{-1}$$
The equation becomes:
$$\frac{d}{dx}(y(\sin)^{-1})=-\frac{\cos x}{\sin x}$$
Integrating both sides:
$$\frac{y}{\sin x}=-\ln |\sin x|+C$$
$$y=\sin x(-\ln |sin x|+C)$$
The general solution is $y=\sin x(-\ln |sin x|+C)$