This uses implicit differentiation, which is a special case of the chain rule for derivatives. Generally differentiation problems involve functions i.e. #y=f(x)# - written explicitly as functions of #x#.

However, some functions of #y# are written implicitly as functions of #x# and either we cannot separate #y# or doing so makes it complicated. Observe that #f(x,y)=cot(xy)=k#, where#k# is a constant is such a function.

So what we do is to treat #y# as #y=y(x)# and use chain rule. This means differentiating #y# w.r.t. #y#, but as we have to derive w.r.t. #x#, as per chain rule, we multiply it by #(dy)/(dx)#.

#cot(xy)=k#

#csc^2(xy)(1*y+x*(dy)/(dx))=0#

or #ycsc^2(xy)+xcsc^2(xy)(dy)/(dx)=0#

or #(dy)/(dx)=-(ycsc^2(xy))/(xcsc^2(xy))=-y/x#