Implicit differentiation for the following function

68 Views Asked by At

Finding the derivative $\frac{dy}{dx}$ for $x^y=y^x$, I noticed that in this question it took the log of both sides and then it implicitly differentiates, thus we have: $$y\ln(x) = x \ln(y).$$ But isn't that wrong since we are changing the function to something different?


Wouldn't the correct step be to take the log and exponential since that would not change the function to a different one, i.e. $$e^{y \ln (x)}= e^{x \ln (y)}.$$

6

There are 6 best solutions below

4
On

The exponential function is one-to -one. Hence there is no difference between $e^{y\ln x }=e^{x \ln y}$ and $y \ln x=x \ln y$.

1
On

Since $\mathrm{e}^z$ is injective, your last display is equivalent to your first display.

That a function, $f$, is injective means that for all $u,v$ in the domain of $f$, if $f(u) = f(v)$, then $u = v$. This property is also called "one-to-one", where the sense of this phrase is "to each element, $y$, of the image of $f$, there is exactly one element in the domain of $f$, $x$, such that $f(x) = y$."

0
On

Remember, doing the same thing on both sides doesn't change the function. You can check this: $$x^y=y^x$$ $$y=\log_{x}(y^x)$$

And then changing the base of the log to $e$ (which gives us $\ln(x)$

$$y=x\frac{\ln(y)}{\ln(x)}$$ $$y\ln(x)=x\ln(y)$$

0
On

Perhaps to address your concern about altering the differentiation, you argue that the "first step" ought to be $$ e^{\ y \ln (x)} \ \ = \ \ e^{ \ x \ln (y)} \ \ . $$ But then we would differentiate this as $$ \frac{d}{dx} \ [ \ e^{y \ln (x)} \ ] \ \ = \ \ \frac{d}{dx} \ [ \ e^{x \ln (y)} \ ] \ \ \Rightarrow \ \ e^{y \ln (x)} · \frac{d}{dx} \ [ \ y \ \ln (x) \ ] \ \ = \ \ e^{x \ln (y)} · \frac{d}{dx} \ [ \ x \ \ln (y) \ ] \ \ . $$ Since the original equation tells us that the first factors on each side of the equation are equal, we can "cancel" them, leaving us with $$ \Rightarrow \ \ \frac{d}{dx} \ [ \ y \ \ln (x) \ ] \ \ = \ \ \frac{d}{dx} \ [ \ x \ \ln (y) \ ] \ \ . $$ So the "jump" directly to applying the natural logarithm (or, really, the logarithm with any acceptable base) to both sides of the equation is simply an unspoken economy.

0
On

There is nothing wrong with taking the logarithm of both sides because the question is not about each individual side but the relationship between $y$ and $x$ which, is maintained even as the sides themselves are transformed.

However, you also don't have to take the logarithm. There is a rule, the "generalized power rule", that you can use for any $a^b$ type of relationship. The generalized power rule is:

$$d\left(a^b\right) = b\,a^{b - 1}\,da + \ln(a)\,a^b\,db $$

Note that this is a simple linear combination of the power rule and the exponent rule. Applying this to your problem, you get:

$$ d\left(x^y\right) = d\left(y^x\right) \\ y\,x^{y - 1}\,dx + \ln(x)\,x^y\,dy = x\,y^{x - 1}\,dy + \ln(y)\,y^x\,dx \\ \ln(x)\,x^y\,dy - x\,y^{x - 1}\,dy = \ln(y)\,y^x\,dx - y\,x^{y - 1}\,dx \\ \frac{dy}{dx} = \frac{\ln(y)\,y^x - y\,x^{y - 1}}{\ln(x)\,x^y - x\,y^{x - 1}} $$

0
On
  1. it took the log of both sides and then it implicitly differentiates... isn't that wrong since we are changing the function to something different?

    That part I understand but why does... make it equivalent to $y\ln(x)=x\ln(y)\,?$

    It is always valid to perform the same operation to both sides of an equation; the equality of left and right sides continues to hold (i.e., the new relationship continues to apply to the original variable tuple).

    Note that the resulting equation may not be equivalent to the original one, and may not be useful. For example, it is valid to multiply $x^y=y^x$ by $0,$ but the new equation $0=0$ is clearly useless for determining $\frac{\mathrm dy}{\mathrm dx}.$

    Note also that the resulting equation need not be equivalent to the original one in order to be useful. For example, $$\ln x=\ln y\implies x=y\implies \frac{\mathrm dy}{\mathrm dx}=1,$$ even though there are some $(x,y)$ for which $x=y {\kern.6em\not\kern-.6em\implies} \ln x=\ln y.$

  2. In the given exercise, for $x,y>0,$ $$x^y=y^x\iff y\ln x = x \ln y\implies\ldots\iff \frac{\mathrm dy}{\mathrm dx}=\dfrac {y(x \ln y - y)}{x(y \ln x - x)};$$ the first step's equivalence is because $\ln$ is an injective function, as explained in Eric's answer.