Solve for $\frac{dy}{dx}$ if $x = y \ln (xy)$
Solve for $\frac{dy}{dx}$: $x = y \ln (xy)$
The first idea to solve this that springs to my mind is, of course, to apply implicit differentiation, but this is not an obvious function and so I got stuck. I simply don't know how to tackle this. Because, if I take the derivative with respect to $x$ of both sides, I get
$$1 = \frac{d}{dx}[y\ln(xy)] = \frac{d}{dx}[y]\ln(xy)+y\frac{d}{dx}[\ln(xy)] = \frac{dy}{dx}[\ln(xy)] + y\frac{dy}{dx}[\ln(xy)] \\
2 \frac{dy}{dx}[\ln(xy)] = 1 \iff \frac{dy}{dx} = \frac{1}{2\ln(xy)}$$
Is it the right way to solve this?
5 Answers
$\begingroup$Differentiating both sides with respect to $x$: $$\begin{align}1=\frac{d}{dx}(y\ln(xy))&=\frac{dy}{dx}\ln(xy)+y\frac{d}{dx}(\ln(xy))\\&=\frac{dy}{dx}\ln(xy)+y\cdot\frac{y+x\frac{dy}{dx}}{xy}\\&=\frac{dy}{dx}\ln(xy)+\frac{y}{x}+\frac{dy}{dx}\\ &=\frac{dy}{dx}(1+\ln(xy))+\frac{y}{x} \end{align}$$ Therefore, $$\frac{dy}{dx}=\frac{1-\frac{y}{x}}{1+\ln(xy)}=\frac{x-y}{x(1+\ln(xy))}$$
$\endgroup$ $\begingroup$i have got $$1=y'\ln(xy)+y\cdot \frac{1}{xy}(y+xy')$$
$\endgroup$ $\begingroup$You were doing just fine until you reached the third step in your solution process. I'm not sure what you were doing there. Here's how to properly do implicit differentiation:
$$ y \ln (xy) = x \\ \frac{d}{dx} [y \ln (xy)]=\frac{d}{dx}[x]\\ \frac{d}{dx} [y \ln (xy)]=1\\ \frac{d}{dx} [y]\cdot \ln (xy)+y\cdot \frac{d}{dx}[\ln (xy)]=1\\ \frac{dy}{dx} \cdot \ln (xy)+y\cdot \frac{1}{xy}\cdot \frac{d}{dx}[xy]=1\\ \frac{dy}{dx} \cdot \ln (xy)+y\cdot \frac{1}{xy}\cdot \left(\frac{d}{dx}[x]\cdot y+x\cdot \frac{d}{dx}[y]\right)=1\\ \frac{dy}{dx} \cdot \ln (xy)+\frac{1}{x}\cdot \left(y+x\cdot \frac{dy}{dx}\right)=1\\ \frac{dy}{dx} \cdot \ln (xy)+\frac{y}{x}+ \frac{dy}{dx}=1\\ \frac{dy}{dx} \left(\ln (xy) + 1\right)=1-\frac{y}{x}\\ \frac{dy}{dx} \left(\ln (xy) + 1\right)=\frac{x}{x}-\frac{y}{x}\\ \frac{dy}{dx} \left(\ln (xy) + 1\right)=\frac{x - y}{x}\\ \frac{dy}{dx} =\frac{x - y}{x\left(\ln (xy) + 1\right)}\\ $$
First of all, $y$ and $\frac{d}{dx}[\ln (xy)]$ are separate quantities. That's why you can move them around. The derivative of $\ln x$ is $\frac{1}{x}$. When there is something inside the natural log function like in our case here ($\ln (xy)$), we have to apply the chain rule: $\frac{d}{dx}[\ln (xy)]=\frac{1}{xy}\cdot \frac{d}{dx}[xy]$. Now, we have to keep differentiating again by applying the product rule: $\frac{1}{xy}\cdot \left(\frac{d}{dx}[xy]\right)=\frac{1}{xy}\cdot \left(\frac{d}{dx}[x]\cdot y+x\cdot \frac{d}{dx}[y]\right)$. And so on and so forth.
$\endgroup$ 0 $\begingroup$It might help you out if you said $\ln xy = \ln x + \ln y$
So $\frac {d}{dx} \ln xy = \frac {d}{dx}\ln x + \frac {d}{dx} \ln y = \frac 1x + \frac 1y y'$
To the problem at hand.
$\frac{d}{dx}x = \frac {d}{dx} (y\ln xy)\\ 1 = (\frac {d}{dx} y)\ln xy + y(\frac {d}{dx}(\ln xy))$
Applying the product rule on the right hand side.
$1 = y'\ln xy + y(\frac 1x + \frac 1y y')$
Using what we have worked out above. Now simplify.
$1 - \frac yx = (\ln xy + 1) y'\\ x - y = x(\ln xy + 1) y'\\ y' = \frac {x - y}{x(\ln xy + 1)}\\ $
$\endgroup$ $\begingroup$I like to treat $x$ and $y$ as independent, so I would do this:
$\begin{array}\\ (x = y \ln (xy))' &\implies(dx = y (\ln (xy))+y' (\ln (xy))\\ &\implies(dx = y (\frac{(xy)'}{xy})+dy (\ln (xy))\\ &\implies(dx = y (\frac{xy'+x'y}{xy})+dy (\ln (xy))\\ &\implies(dx = y (\frac{y'}{y}+\frac{x'}{x})+dy (\ln (xy))\\ &\implies(dx = dy+\frac{y dx}{x})+dy (\ln (xy))\\ &\implies(dx(1-\frac{y}{x})) = dy(1+ (\ln (xy))\\ \end{array} $
From this, you can get either $dy/dx$ or $dx/dy$.
$\endgroup$