I have to determine the value of $\frac{dy}{dx}$.
The answer of the solution and my answer are different. I don't know where I made a mistake. Could you please help me find it.
My solution:
$y+x=x^{-y}$
$\ln(y+x) =(-y)\ln(x)$
$\frac1{y+x}\big[\frac{dy}{dx}+1\big] =-\frac{dy}{dx}\ln(x)-\frac yx$
$\frac{dy}{dx}\big(\frac1{y+x}+\ln(x)\big)=-\frac1{y+x}-\frac yx$
$\frac{dy}{dx}\big(\frac{1+y\ln(x)+x\ln(x)}{y+x}\big)=\frac{-x-y-xy}{x(x+y)}$
$\frac{dy}{dx} = \frac{-x-y-xy}{x(x+y)}\cdot\frac{x+y}{1+\ln(x)(x+y)}$
$\frac{dy}{dx} = \frac{-(x+xy+y)}{x+x(x+y)\ln(x)}$
Given solution:
$y+x=x^{-y}$
Differentiating both sides with respect to $x$,
$\frac{dy}{dx}+1=x^{-y}\big[-y\frac{dy}{dx}\ln(x)+\ln(x)\frac{d}{dx}(-y)\big]$
$\frac{dy}{dx}+1= x^{-y}\big[\frac{-y}{x}-\ln(x)\frac{dy}{dx}\big]$
$(1+x^{-y}\ln(x))\frac{dy}{dx}=-1-y\cdot x^{-y-1}$
$\implies\frac{dy}{dx} = -\frac{1+y\cdot x^{-y-1}}{1+x^{-y}\ln(x)}$
Given that $y+x=x^{-y}$, the answers are equivalent, and yours is a simpler answer, and a better method. Good work!
To see the equivalence, take the book's answer and replace $x^{-y}$ by $y+x$, and $x^{-y-1}$ by ${\large{\frac{y+x}{x}}}$, then simplify.