If xy = 1, then differentiating both sides with respect to x gives
x dy/dx + y = 0
(use the product rule)
Solve for dy/dx :
dy/dx = -y/x
Solve the starting equation for y and substitute that into the derivative.
xy = 1 → y = 1/x
→ dy/dx = -(1/x)/x = -1/x²