Trolling with math?

Somewhere on the worldwide prairie of Internet I encountered an interesting math question about the derivative of \sqrt{x}^{\sqrt{x}}. Reading such questions, taking into consideration the place I found them and the way they’re formulated, I sometimes suspect juveniles trying to troll people with seemingly difficult questions, just to see them jumping through hoops answering them.

But then again, it could all be serious. And it can be fun to look for a concise answer. Here I don’t have to be concise, because this is my blog and I can do what I want. Tough luck, young man.

But it’s not that difficult.
We all know the power rule, where the derivative of x^n morphs into nx^{n-1}. If you’re familiar with

– the derivative of ln(x) (that’s \tfrac{1}{x});
– the derivative of e^x, (which is e^x);
– the chain rule g(f(x))'=g'(f(x))\cdot f'(x);
– the product rule f\cdot g=f'g+fg';

complemented with a few basic logarithm rules, then you’re all set for a simple solution.

In math it’s customary to write things very complicated to prove things. Like multiplication by one, in which you find some weird formulation in both the numerator and the denominator. You could call it multiplication by a very complicated version of one. Or we divide by such a construction, alternatively add 1 (or more) and simultaneously subtract the same amount.

This is a variation on that theme: we write x^n as

    \[x^n=e^{\ln(x^n)}\]

That’s a good start. From the log rules we know that we can write this as

    \[x^n=e^{\ln(x^n)}=e^{n\ln(x)}\]

Now we can apply the chain rule, taking the derivative of the containing function times the derivative of the function contained, so

    \[e^{n\ln(x)}\cdot n\cdot\frac{1}{x}\]

which of course is

    \[x^n\cdot n\cdot\frac{1}{x}=n\cdot x^{n-1}\]

So far, so good. But now for the next step. Let’s assume we have two functions u(x) and v(x) which we will write as u and v. So both are functions of x.
Now we look at u^v. We’ll make it complicated by writing again

    \[u^v=e^{\ln(u^v)}=e^{v\ln(u)}\]

We need to take the derivative of e^{v\ln(u)} times the derivative of v\ln(u), which of course requires us to use both the product rule and the chain rule for v\ln(u) as well, as u is a function of x. Here we go:

    \[\tfrac{d}{dx}(u^v)=e^{v\ln(u)}\cdot(\tfrac{dv}{dx}\ln(u)+v\cdot (\frac{1}{u}\cdot \tfrac{du}{dx}))\]

So we end up with

    \[\tfrac{d}{dx}(u^v)=u^v\left(\ln(u)\tfrac{dv}{dx}+\frac{v}{u}\tfrac{du}{dx}\right)\]

as the general formula.
Put \sqrt{x} in for both u and v and you’re good to go.

Was it trolling? The bait was delicious.