# Thread: Is there a trick for logarithmic functions such as these?

1. ## Is there a trick for logarithmic functions such as these?

Let's say we had a function like this:

$f(x) = {(\ln x)^{\ln x}}$

I'm just wondering what the best method for differentiating this type of function. I'm thinking there is likely a trick or shortcut to it rather than making a messy chain, but I just don't know it yet.

How would you guys and gals approach this one?

2. I would probably do a logarithmic differentiation. Taking $\ln$ on each sides gives $\ln f(x)=(\ln x)(\ln \ln x)$. I would then proceed to (implicitly) differentiate.

Can you take it from there?

3. Originally Posted by Malaclypse
I'm thinking there is likely a trick or shortcut to it rather than making a messy chain, but I just don't know it yet.
Nope! I don't think there is a less messy way of doing it. And it really isn't that messy.

4. In general, there is a "trick" to differentiating a term of the form $f(x)=[g(x)]^{h(x)}$ although I'm not sure it's useful to learn it because it's not that common.

Suppose we had a function $f_1(x) = [g(x)]^a$ with $a$ constant. You probably know that the derivative would be $f_1'(x)=a \cdot [g(x)]^{a-1} \cdot g'(x)$.

Suppose we had another function $f_2(x) = b^{h(x)}$ with $b$ constant. Again you could differentiate to get $f_2'(x)=h'(x) \cdot \ln b \cdot b^{h(x)}$.

It turns out that you can calculate the derivative of $[g(x)]^{h(x)}$ by first treating $g(x)$ constant and differentiating; then treat $h(x)$ constant and differentiating; then adding the two results. It's basically like combining the two differentiation rules I just mentioned into one.

In other words:

$f'(x)=h(x) \cdot [g(x)]^{h(x)-1} \cdot g'(x) + h'(x) \cdot \ln (g(x)) \cdot [g(x)]^{h(x)}$

Applying this to the problem $f(x)=(\ln x)^{\ln x}$

$f'(x)=\ln x \cdot (\ln x)^{\ln x - 1} \cdot \frac{1}{x} + \frac{1}{x} \cdot \ln(\ln x) \cdot (\ln x)^{\ln x}$

$= \frac{1}{x} (\ln x)^{\ln x} ( 1 + \ln(\ln x) )$

Usually though you would do such a problem with logarithmic differentiation techniques, and get the solution almost as quickly.

5. Just in case a picture helps...

Taking logs of both sides of y = ..., we can solve the bottom row for dy/dx in...

... where... (key in spoiler)

Spoiler:

... the chain rule, is wrapped in the legs-uncrossed version of...

... the product rule. In both, straight continuous lines differentiate downwards (integrate up) with respect to x, and the straight dashed line similarly but with respect to the dashed balloon expression which is the inner function of the composite expression requiring the chain rule.

Complete:
Spoiler:

Alternatively, as drumist says, and Wolfram also chooses by default, you can use the chain rule for a composite with two inner functions...

$\displaystyle{\frac{d}{dx}\ f(u(x), v(x)) = \frac{\partial f}{\partial u} \frac{du}{dx} + \frac{\partial f}{\partial v} \frac{dv}{dx}}$

... and I fancy this picture makes it palatable...

... where

... is the double version of the ordinary chain rule. As with that, straight continuous lines differentiate downwards (integrate up) with respect to x, and the straight dashed lines similarly but with respect to the (corresponding) dashed balloon expression which is (one of) the inner function(s) of the composite expression. So...

Spoiler:

You do, of course, need logarithmic differentiation to see the logic of the double-dashed differentiation, i.e. the logic of...
$\frac{d}{du}\ a^u = \ln a\ a^u$

_____________________________________
Don't integrate - balloontegrate!

Balloon Calculus: Standard Integrals, Derivatives and Methods

Balloon Calculus Drawing with LaTeX and Asymptote!

6. as stated earlier by roninpro , logarithmic differentiation is probably the best way to go ...

let $u = \ln{x}$

$y = u^u$

$\ln{y} = u\ln{u}$

$\displaystyle \frac{y'}{y} = u \cdot \frac{u'}{u} + u' \cdot \ln{u}$

$\displaystyle \frac{y'}{y} = u' + u' \cdot \ln{u}$

$\displaystyle \frac{y'}{y} = u'(1 + \ln{u})$

$y' = y \cdot u'(1+\ln{u})$

$\displaystyle y' = (\ln{x})^{\ln{x}} \cdot \frac{1 + \ln(\ln{x})}{x}$

7. Thank you everybody! A lot of great information in this thread, and it was exactly what I was looking for. Logarithmic differentiation was new to me, but it makes perfect sense now.

I also like to see different approaches to see what feels best. So thank you all for your insights.