Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|cite|improve this question
5  
Short answer: both wrong. If you have two instances of the same variable you can not substitute just one of the out and then the other. You must substitute them both out simultaneously. – fleablood 17 hours ago
3  
So suing x for u means you must derive $\dfrac {d u^u}{d u}\dfrac {du}{dx} $ which helps you not one #@%&ing bit. – fleablood 17 hours ago
3  
$\dfrac {x^u}{du} =\ln x x^u$ implies the base $x$ is a constant with respect to $u $. As $x=u $ this is not the case. – fleablood 17 hours ago
3  
@fleablood And that's why we don't take math variables to court. – MKII 13 hours ago
up vote 20 down vote accepted

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

  • varying the first instance, $(v+w^2)x^{v+w^2-1}$;

  • varying the second instance, $\ln(u)u^{x+w^2}$;

  • varying the third instance, $\ln(u)u^{v+x^2}2x$.

Then globally

$$(1+x+\ln(x)(1+2x))e^{x+x^2}.$$

share|cite|improve this answer

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.

share|cite|improve this answer

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:

Write $x^x$ as $e^{\ln x^x}=e^{x\ln x}$ and then you should differentiate with respect to $x$ using chain rule.

share|cite|improve this answer
1  
With dependent variables, you don't have to substitute all occurrences of one variable with the other; in fact it is often convenient not to do so and write expressions that use both variables. – Hurkyl 5 hours ago

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.

share|cite|improve this answer

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.

share|cite|improve this answer
    
How does this answer the question? – JiK 10 hours ago
    
@JiK : This answer is useful because it shows what to substitute as u. See, as far as I know we substitute complex variables only to make our job easier else these substitutions hold no purpose. So basically we need to know what to substitute and I think thats was misleading the guy. If he gets to know what to substitute and what not to and why we need to substitute things would be more easier I suppose. – Akash Raveendran 9 hours ago

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:

  • You assumed $x$ is constant with respect to $u$ and vice versa, which is clearly false if $x=u$
  • You mixed up the rules for $z^{(\text{constant})}$ and $(\text{constant})^z$.

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.

share|cite|improve this answer
    
Aside: it's interesting to think of this calculation as differentiating $x^x$ with respect to one $x$ and then with respect to the other $x$. I wonder if that is the reason for the name "partial differentiation"? – Hurkyl 5 hours ago

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.