To find $\displaystyle \dfrac {\operatorname d\!y}{\operatorname d\!x}$ for $\sqrt{xy}= 1$:
$$\dfrac{\sqrt y}{2\sqrt x}+\dfrac{y'\sqrt x}{2\sqrt y}=0\\ \dfrac{y'\sqrt x}{2\sqrt y}=\dfrac{-\sqrt y}{2\sqrt x}\\ y'=\dfrac{-y}x$$
Is this correct? and can you show me how to get the same answer solving using $\ln$?
$$\sqrt{xy}=1\implies \ln(\sqrt{xy})=\ln1$$
As $\displaystyle\ln y^m=m\ln y$ where both logarithm is defined unlike $\displaystyle\ln1=\ln(-1)^2=2\ln(-1)$ $$\implies \frac12\ln(xy)=0$$
As $\displaystyle\ln ab=\ln a+\ln b$ where both logarithm is defined unlike $\displaystyle\ln6=\ln (-1)(-6)=\ln(-1)+\ln(-6)$ $$\implies\ln |x|+\ln |y|=0$$
Differentiating we get $$\frac{d(\ln|x|)}{dx}+\frac{d(\ln|y|)}{dy}\frac{dy}{dx}=\frac{d(\ln 1)}{dx}$$
$$\implies\frac1x+\frac1y\frac{dy}{dx}=0$$