[tex]\mathrm dx+(x\cot y+\sin y)\,\mathrm dy=0[/tex]
Multiply both sides by [tex]\sin y[/tex]:
[tex]\sin y\,\mathrm dx+(x\cos y+\sin^2y)\,\mathrm dy=0[/tex]
The ODE is now exact, since
[tex]\dfrac{\partial(\sin y)}{\partial y}=\cos y[/tex]
[tex]\dfrac{\partial(x\cos y+\sin^2y)}{\partial x}=\cos y[/tex]
so there exists a solution of the form [tex]\Psi(x,y)=C[/tex]. This solution satisfies
[tex]\dfrac{\partial\Psi}{\partial x}=\sin y[/tex]
[tex]\dfrac{\partial\Psi}{\partial y}=x\cos y+\sin^2y[/tex]
Integrating both sides of the first PDE wrt [tex]x[/tex] gives
[tex]\Psi(x,y)=x\sin y+f(y)[/tex]
and differentiating wrt [tex]y[/tex] gives
[tex]\dfrac{\partial\Psi}{\partial y}=x\cos y+\sin^2y=x\cos y+\dfrac{\mathrm df}{\mathrm dy}[/tex]
[tex]\implies\dfrac{\mathrm df}{\mathrm dy}=\sin^2y=\dfrac{1-\cos2y}2[/tex]
[tex]\implies f(y)=\dfrac y2-\dfrac{\sin2y}4+C[/tex]
So the ODE has solution
[tex]\Psi(x,y)=x\sin y+\dfrac y2-\dfrac{\sin2y}4=C[/tex]
which can be rewritten and simplified as
[tex]\Psi(x,y)=\boxed{\sin y(2x-\cos y)+y=C}[/tex]