Find $\frac{dy}{dx}$ in terms of $x$ and $y$ of $x^2y^2=\frac{(y+1)}{(x+1)}$
Ok so using the product rule on the LHS and the quotient rule on the RHS I differentiated both sides of the equation and got:
$2xy(x\frac{dy}{dx}+y)=\frac{(x+1)\frac{dy}{dx}-y-1}{(x+1)^2}$
Now the textbook gives the answer as $-\frac{y(y+1)(3x+2)}{x(x+1)(y+2)}$ and I'm wondering how to get that answer. I think I'm going about this the wrong way so any hints/guidance would be much appreciated.
$x^2y^2=(y+1)/(x+1)$
Take log of both sides,
$log(x^2y^2)=log \frac{y+1}{x+1}$
$log(x^2)+log(y^2)=log(y+1)-log(x+1)$
$2\times log(x)+2\times log(y)=log(y+1)-log(x+1)$
Now differentiate both sides wrt $x$,
$\frac{2}{x}+\frac{2}{y}\times\frac{dy}{dx}=\frac{1}{y+1}\times\frac{dy}{dx}-\frac{1}{x+1}$
$\frac{2}{y}\times\frac{dy}{dx}-\frac{1}{y+1}\times\frac{dy}{dx}=-\frac{1}{x+1}-\frac{2}{x}$
$(\frac{2}{y}-\frac{1}{y+1})\frac{dy}{dx}=-\frac{1}{x+1}-\frac{2}{x}$
$\frac{2y+2-y}{y(y+1)}\frac{dy}{dx}=\frac{-x-2x-2}{x(x+1)}$
$\frac{y+2}{y(y+1)}\frac{dy}{dx}=\frac{-(3x+2)}{x(x+1)}$
$\frac{dy}{dx}=\frac{-(3x+2)}{x(x+1)}\times\frac{y(y+1)}{y+2}$