When deriving $x^x$, why can't you choose $u$ to be $x$, and find $\dfrac{d(x^u)}{du} \dfrac{du}{dx} = x^x$?. Or you could go the other way and find $\dfrac{d(u^x)}{du}\dfrac{du}{dx}$, giving $\ln(x)\cdot{x^x}$. Both methods seem to be equally wrong.
Sign up
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
|
|
Both methods are wrong, but the fix is easy: the solution is the sum of the two proposals, and this is not by coincidence ! Naturally, turning a single instance of $x$ to a constant cannot be the way as that is not symmetric. The correct way is by differentiating on every instance in turn, and is justified by the chain rule with partial derivatives: $$\frac{df(u,v)}{dx}=\frac{\partial f(u,v)}{\partial u}\frac{du}{dx}+\frac{\partial f(u,v)}{\partial v}\frac{dv}{dx}.$$ In other words, you keep one instance variable while the other remains constant and sum the two cases. Here, $f(u,v)=u^v$ with $u=v=x$, and $$\frac{dx^x}{dx}=\frac{du^v}{dx}=vu^{v-1}\cdot1+\ln(u)u^v\cdot1=x^x+\ln(x)x^x,$$ or with a more intuitive notation$$\frac{dx^x}{dx}=\frac{dx^v}{dx}\cdot1+\frac{du^x}{dx}\cdot1=vx^{v-1}+\ln(u)u^x=x^x+\ln(x)x^x.$$ This works with as many instances of $x$ as you like. For instance $x^{x+x^2}$ seen as $u^{v+w^2}$ yields
Then globally $$(1+x+\ln(x)(1+2x))e^{x+x^2}.$$ |
||||
|
|
|
If you work with the formal definition of the chain rule, you'll see how what you're trying to do makes no sense. But if you want to stick with the abuse of notation $\frac{dz}{dx}=\frac{dz}{dy}\frac{dy}{dx}$, I'd say that the heart of the problem is in your claim that $\frac{d(x^u)}{du}=x^u\log x$. This is only valid if $x$ is constant, and doesn't apply if $x$ is a function of $u$ (in our case, $x=u$). That's the difference between a total derivative $\frac{d}{dt}$ and a partial derivative $\frac{\partial}{\partial t}$. The latter, $\frac{\partial f(s,t)}{\partial s}$, means, "change in $f$ when $s$ changes and nothing else does". Whereas $\frac{df(s,t)}{ds}$ means "change in $f$ when $s$ changes, and everything else changes accordingly". So you can't have $u$ depend on $x$ and calculate a total derivative in a way that assumes $x$ is constant. |
|||
|
|
|
Both are wrong, since in spite of choosing $u=x$, you are replacing only one variable $x$ by $u$ while leaving the other $x$ intact. And then again, you decide to differentiate with respect to $u$ by chain rule, initially treating $x$ as a constant in $x^u$ and in $u^x$, which again is wrong. What you should do is:
|
|||||
|
|
Other answers answer this question well and, but I guess another way to find the error might be helpful to some. When you know you've done something wrong but don't know what it is, it's often a good idea to try to use the same method with simpler, even ridiculously simple, examples, and see where it goes wrong. At least I've used this approach with success. Let's try. What about differentiating $x$? That's probably not instructive because you don't have two separate $x$s there so you really can't apply your idea. But let's "cheat" a bit by defining $f$ to be a constant function, say $f(y)=1$ for all $y$, and differentiating $x f(x)$ (which equals $x$ of course). $$ \frac{dx}{dx} = \frac{d(xf(x))}{dx} = \frac{d(xf(u))}{du}\frac{du}{dx} = x \frac{df(u)}{du} \times 1 = 0. $$ But because $f(u)$ is a constant $1$, this would be equivalent to writing $$ \frac{dx}{dx} = \frac{d(x\times 1)}{dx} = \frac{d(x\times 1)}{du} \frac{du}{dx} = 0 \times 1, $$ or to simplify even more, $$ \frac{dx}{dx} = \frac{dx}{du} \frac{du}{dx} = 0 \times 1, $$ So what went wrong here and why? Ah! $\frac{dx}{du}$ probably shouldn't equal $0$ when we have defined $u=x$. So (as others have pointed out) in the original problem the corresponding place is when we calculate $\frac{d(x^u)}{du}$ as if $x$ were a constant. |
|||
|
|
|
There is an easier method.I tried this out. $u=x^x,$ (taking log on both sides) $\log u=x\log(x)$, $\frac{d(\log u)}{dx}=\frac{d(x\log(x))}{dx}$, $\frac{1}{u}\frac{du}{dx}=\log(x)+x\frac{1}{x}$, so, $\frac{du}{dx}=u(\log(x)+1)$, i.e. $\frac{d(x^x)}{dx}=x^x(\log(x)+1)$ The entire reason for substitution is always to make the differentiable item to be less complex. As you asked if you take both ways putting u as x for the exponent or base, the substitution doesnt make the work easier for us. But taking a log and then differentiating makes things far more easier. |
|||||||||
|
|
Your approach is fine, but your execution fails — you didn't post the calculation so I'm guessing, but it looks like you did two things wrong:
What we do have is that $$ \mathrm{d}(x^u) = u x^{u-1} \mathrm{d}x + \ln(x) x^u \mathrm{d} u $$ or equivalently $$ \mathrm{d}(u^x) = x u^{x-1} \mathrm{d}u + \ln(u) x^u \mathrm{d} x $$ The nice thing about differentials is that equations like this remain true no matter how $u$ and $x$ are related. One method to derive such equations is that the coefficients can be viewed as partial derivatives; basically the same as the method described at this other answer. If $x$ and $u$ are independent, it doesn't make sense to ask for things like $\frac{\mathrm{d}(x^u)}{\mathrm{d}u}$, because $\mathrm{d}(x^u)$ simply isn't a multiple of $\mathrm{d}u$. But if they are (sufficiently smoothly) related, it does make sense (because $\mathrm{d}x$ will be a multiple of $\mathrm{d}u$). The other nice thing about differentials is that if we do something like impose the relationship $x=u$, then the differential of this equation is also true: in this case $\mathrm{d}x = \mathrm{d}u$. Applied to the first equation, we'd get $$ \mathrm{d}(x^x) = x x^{x-1} \mathrm{d}x + \ln(x) x^x \mathrm{d} x $$ or equivalently, $$ \mathrm{d}(x^x) = x^x (1 + \ln(x)) \mathrm{d}x $$ which indeed leads to the correct formula for the derivative. |
|||||
|