Skip to main content
2 of 5
added 153 characters in body
David
  • 15k
  • 4
  • 47
  • 121

Am I getting a correct answer with the Dt command?

We are asked to find $dy/dx$ when $x^y=y^x$. Our hand calculations use logarithmic differentiation. $$\begin{align*} x^y&=y^x\\ \ln x^y&=\ln y^x\\ y\ln x&=x\ln y\\ \end{align*}$$ Then we differentiate implicitly both sides with respect to $x$. $$\begin{align} y\frac{1}{x}+\frac{dy}{dx}\ln x&=x\frac{1}{y}\frac{dy}{dx}+\ln y\\ \frac{y}{x}+\frac{dy}{dx}\ln x&=\frac{x}{y}\frac{dy}{dx}+\ln y \end{align}$$ And then we solve for $dy/dx$. $$\begin{align*} \left(\ln x-\frac{x}{y}\right)\frac{dy}{dx}&=\ln y-\frac{y}{x}\\ \frac{dy}{dx}&=\frac{\ln y-\dfrac{y}{x}}{\ln x-\dfrac{x}{y}}\\ \frac{dy}{dx}&=\frac{y^2-xy\ln y}{x^2-xy\ln x} \end{align*}$$ Now, consider the use of Dt.

Dt[x^y == y^x, x]

The result is:

x^y (y/x + Dt[y, x] Log[x]) == y^x ((x Dt[y, x])/y + Log[y])

Now, note the extra $x^y$ at the beginning of the left-hand side and the extra $y^x$ on the right-hand side. That doesn't compare with our work. To check, we did:

Solve[Dt[x^y == y^x, x], Dt[y, x]]

Which produced:

{{Dt[y, x] -> (y (x^y y - x y^x Log[y]))/(x (x y^x - x^y y Log[x]))}}

Now we tried to compare with our hand-calculated answer.

(y (x^y y - x y^x Log[y]))/(x (x y^x - x^y y Log[x])) == (
  x y Log[y] - y^2)/(x y Log[x] - x^2) // FullSimplify

Here's a photo of this last work to make it easier to read:

enter image description here

But we did not get "True." I'm worried about this situation and cannot figure out how to explain this to my students. Any help? Am I missing something?

David
  • 15k
  • 4
  • 47
  • 121