Here we will use:
cot(x) = cos(x)/sin(x)
cosec2(x) = 1 + cot2(x)
Chain rule : dy/dt * dt/ dx = dy/ dx
Product rule : d/dx (uv) = udv/dx + v*du/dx
x = cot(y)= cos(y)/sin(y)
dx/dy = -cos(y)(cos(y)/sin(y)2) + 1/sin(y) (-sin(y))
= -cos2(y)/sin2(y) -1 = - cos2(y)/sin2(y) -sin2(y) /sin2(y)
= -(sin2(y)+ cos2(y))/sin2(y) = -cosec2(y)
cosec2(y) = 1 + cot2(y)
x = cot(y)
dx/dy = -(1 + x2)
dy/dx = -1/(1+x2)