Implicit differentiation 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 y are written implicitly as functions of #x#.

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)#.

Hence differentiating #sin(y-x)^2-y=2#, we get

#cos(y-x)^2*d/(dx)(y-x)^2-(dy)/(dx)=0#

or #cos(y-x)^2*2(y-x)*d/(dx)(y-x)-(dy)/(dx)=0#

or #cos(y-x)^2*2(y-x)*((dy)/(dx)-1)-(dy)/(dx)=0#

i.e. #(dy)/(dx)[2(y-x)cos(y-x)^2-1]=2(y-x)cos(y-x)^2#

and #(dy)/(dx)=(2(y-x)cos(y-x)^2)/(2(y-x)cos(y-x)^2-1)#