Why does this method for differentiating work?

66 Views Asked by At

Consider the function $$f(x)=x^x.$$ If I differentiate with respect to $x$ treating the exponent as a constant and then sum the derivative treating the base as a constant, I get \begin{align} f'(x)&= xx^{x-1}+x^x\ln x\\ f'(x)&= x^x(1+\ln x). \end{align}

3

There are 3 best solutions below

0
On

Take logarithms and implicitly differentiate $$ \ln y = x \ln x\\ \frac{y'}{y} = \ln x + 1 $$ To compute the derivative of the right-hand side, you are essentially doing the same manipulation you are describing without taking the logarithms -- which is why it works in this case...

0
On

You can prove it by the logarithmic differentiation.

$$ y= x^x$ \implies \ln y = x\ln x$$

$$ \frac {y'}{y} = \ln x +1 $$

$$ y'= y(\ln x +1) = x^x(\ln x +1)$$

See if you can generalize it $y= f(x) ^{g(x)}$

1
On

Good observation and indeed there is a deeper meaning.

Let $f:\mathbb{R}^2\to \mathbb{R}$ be differentiable and $i:\mathbb{R}\to\mathbb{R}^2$ be given by $i(x)=(x,x)$. Then

$$(f\circ i)'(x)=\frac{\partial f}{\partial x}(x)+\frac{\partial f}{\partial y}(x)$$

This can be seen as a special case of the multi-dimensional chain rule (the "$+$" part comes from the matrix multiplication).

In your case $f(x,y)=x^y$ (obviously not defined everywhere but the chain rule still holds on open subsets of $\mathbb{R}^2$).