2

If $f(x) = x^{x^x} $, then find $f''(1)$.

My attempt:
Now,
$\begin{align}y =x^{x^x} \\&\implies ln(y) = x^x \cdot ln(x) \\&\implies ln(ln(y))= x\cdot ln(x)+ln(ln(x))\\&\implies\frac{y'}{y\cdot ln(y)} =ln(x) +1+\frac{1}{x\cdot ln(x)}\\&\implies y'=(x^{x^x})\cdot (x^xln(x))\cdot [ln(x) +1+\frac{1}{xln(x)}] \end{align}$

I find it really tedious to continue in this way to reach desired answer.
I have already checked finding second derivative of $x^x$.
So, I wonder if I have to continue in the similar manner to get to answer or there is any better method to calculate this?

5 Answers5

4

Proceeding along your approach

Let $y = x^{x^x}$. We have $y(1) = 1$.

We have $$y' = y x^x (\ln^2 x + \ln x + x^{-1}).$$ We have $y'(1) = 1$.

We have \begin{align*} y'' &= y' x^x (\ln^2 x + \ln x + x^{-1}) + y \cdot x^x(\ln x + 1) \cdot (\ln^2 x + \ln x + x^{-1})\\ &\qquad + y x^x (2x^{-1}\ln x + x^{-1} - x^{-2} ). \end{align*}

Letting $x = 1$, using $y(1) = 1$ and $y'(1)=1$, we have $y''(1) = 2$, i.e. $f''(1) = 2$.

River Li
  • 37,323
  • This is best. I missed that OP only wants the second derivative at $x=1$. – 2'5 9'2 Mar 18 '22 at 23:54
  • Definitely a better way, especially given the time constraint in examination. Moreover, we can skip the derivatives $ln(x)$ is left out, to save time. – Jaswanth Naga Mar 19 '22 at 14:16
2

You could consider $F(u,v,w)=u^{v^w}$ and composed with $u(x)=v(x)=w(x)=x$ and use the multivariate chain rule. You want $\frac{d}{dx}\left(\frac{d}{dx}F\circ(u,v,w)\right)$.

$$\begin{align} \frac{d}{dx}\left(\frac{d}{dx}F\circ(u,v,w)\right) &=\frac{d}{dx}\left(\frac{\partial F}{\partial u}\frac{d u}{d x}+\frac{\partial F}{\partial v}\frac{d v}{d x}+\frac{\partial F}{\partial w}\frac{d w}{d x}\right)\\ &=\frac{d}{dx}\left(\frac{\partial F}{\partial u}+\frac{\partial F}{\partial v}+\frac{\partial F}{\partial w}\right)\\ &=\frac{d}{dx}\left(\frac{\partial F}{\partial u}\right)+\frac{d}{dx}\left(\frac{\partial F}{\partial v}\right)+\frac{d}{dx}\left(\frac{\partial F}{\partial w}\right)\\ &=\sum_{h=u,v,w}\sum_{k=u,v,w}\frac{\partial}{\partial h}\left(\frac{\partial F}{\partial k}\right)\frac{dh}{dx}\\ &=\sum_{h=u,v,w}\sum_{k=u,v,w}\frac{\partial}{\partial h}\left(\frac{\partial F}{\partial k}\right)\\ \end{align}$$

This is a sum over 9 terms. Let's explicitly find $F$'s first derivatives:

$$\begin{align} \frac{\partial F}{\partial u}&=v^wu^{v^w-1}& \frac{\partial F}{\partial v}&=u^{v^w}\ln(u)wv^{w-1}& \frac{\partial F}{\partial w}&=u^{v^w}\ln(u)v^{w}\ln(v) \end{align}$$ Now then:

$$\begin{align} &\frac{d}{dx}\left(\frac{d}{dx}F\circ(u,v,w)\right)\\ &=\sum_{h=u,v,w}\frac{\partial}{\partial h}\left(v^wu^{v^w-1}+u^{v^w}\ln(u)wv^{w-1}+u^{v^w}\ln(u)v^{w}\ln(v)\right)\\ &=\sum_{h=u,v,w}\frac{\partial}{\partial h}\left[F(u,v,w)\cdot v^{w-1}\left(\frac{v}{u}+\ln(u)\left[w+v\ln(v)\right]\right)\right]\\ &\text{Three times, use the product rule over three factors.}\\ &\text{Divide out $u^{v^w}$ and $v^{w-1}$ as you go, for simplicity.}\\ \frac{1}{u^{v^w}v^{w-1}}\frac{d^2F}{dx^2}&= u^{-1}v^{w}\left(\frac{v}{u}+\ln(u)\left[w+v\ln(v)\right]\right) + \left(-\frac{v}{u^2}+\frac{1}{u}\left[w+v\ln(v)\right]\right)\\ &\\ &{}+\ln(u)wv^{w-1}\left(\frac{v}{u}+\ln(u)\left[w+v\ln(v)\right]\right)\\ &{}+(w-1)v^{-1}\left(\frac{v}{u}+\ln(u)\left[w+v\ln(v)\right]\right)+\left(\frac{1}{u}+\ln(u)\left[\ln(v)+1\right]\right)\\ &\\ &{}+\ln(u)v^{w}\ln(v)\left(\frac{v}{u}+\ln(u)\left[w+v\ln(v)\right]\right)\\ &{}+\ln(v)\left(\frac{v}{u}+\ln(u)\left[w+v\ln(v)\right]\right)+\ln(u) \end{align}$$

Well, is it worth continuing? Just as painful as what you were first considering? But you could replace $u,v,w$ with $x$ and simplify.

2'5 9'2
  • 54,717
  • I am very much intrigued by your solution though it is a bit lengthy. Also, is it a standard method for finding derivatives, because I never came across this type of solution.? – Jaswanth Naga Mar 19 '22 at 14:12
  • 1
    I think it is a nice technique sometimes. For example to find the first derivative of $x^x$. Of course the power rule ($x\cdot x^{x-1}$) is not correct. And the exponential function rule ($x^x\ln(x)$) is not correct. But viewed as $u^v$, then taking both partial derivatives and adding them, the sum of those two incorrect attempts is correct: $x\cdot x^{x-1}+x^x\ln(x)$. – 2'5 9'2 Mar 19 '22 at 18:47
  • That is a really cool method. If possible could you please provide with a pdf or something with more such examples.? – Jaswanth Naga Mar 20 '22 at 15:38
  • @JaswanthNaga Here is the general multivariate chain rule. In this post I was using $u=v=w=g_i(x)=x$. A wikipedia entry is not the best to learn from (it's better as a reference) but I didn't go looking for something better. Google "multivariate chain rule" and you may find better content. – 2'5 9'2 Mar 20 '22 at 17:42
2

Since you are only interested in derivative at one point, once you have $$f'(x) = x^{x^x}\cdot x^x \cdot\left(\log^2x + \log x + \frac1x\right)$$ you can use the definition of second derivative in $1$, and fundamental limits $$\frac{e^\alpha-1}{\alpha} \to 1 \tag{1}\label{1}$$ and $$\frac{\log(1+\alpha)}{\alpha} \to 1 \tag{2}\label{2}$$ for $\alpha \to 0$ to get \begin{eqnarray} f''(1) &=&\lim_{x\to 1} \frac{f'(x)-f'(1)}{x-1}=\\ &=&\lim_{x \to 1} \frac{x^{x^x}\cdot x^x \cdot \left(\log^2x+\log x+\frac1x\right)-1}{x-1}=\\ &=&\lim_{x\to 1}\frac{e^{\log x \cdot e^{x\log x} + x\log x+\log\left(\log^2x+\log x +\frac1x\right)}-1}{x-1}=\\ &\stackrel{\eqref{1}}{=}&\lim_{x\to 1}\frac{\log x \cdot e^{x\log x} + x\log x+\log\left(\log^2x+\log x +\frac1x\right)}{x-1}=\\ &=&2\cdot \lim_{x\to 1}\frac{\log x}{x-1} + \lim_{x\to 1}\frac{\log\left(\log^2 x + \log x + \frac1x\right)}{x-1}=\\ &\stackrel{\eqref{2}}{=}&2 + \lim_{x\to 1}\frac{\log^2x +\log x +\frac1x-1}{x-1}=\\ &=&2+\lim_{x\to 1}\frac{\log^2 x}{x-1} + \lim_{x\to 1} \frac{\log x}{x-1} + \lim_{x\to 1}\frac{1-x}{x(x-1)}=\\ &\stackrel{\eqref{2}}{=}&2 + 0 + 1 - 1 =2 \end{eqnarray}

dfnu
  • 7,528
1

I think a good way could be viewing $f(x) = x^{x^x}= e^{ln(x^{x^x})}$ which for logarithm propriety is $f(x) = e^{x^x}x$, from here we know that $$\frac{d}{dx}\big[x^x\big] = x^x(ln(x) +1 )$$ and so for the product rule we have $$ \frac{d}{dx}\big[f(x)\big] = (e^{x^x})'\cdot x + e^{x^x}\cdot 1$$ $$= e^{x^x}\cdot(x^x)'\cdot x + e^{x^x} $$ $$= e^{x^x}\cdot x^x(ln(x) +1 )\cdot x + e^{x^x} $$

reordering in a smarter way $$\frac{d}{dx}\big[f(x)\big] = f(x)\cdot x^x(ln(x) +1 ) + e^{x^x}$$ And this let us with $$\frac{d^2}{dx^2}\big[f(x)\big] = f(x)'\cdot (x^x)' + f(x)\cdot (x^x)'' + e^{x^x}\cdot x^x(ln(x) +1)$$ Since I think you know what $(x^x)''$ is, this way I think it's a little less calculation.

Edit: Premise is wrong (ooops...) , $f(x) = e^{x^xln(x)}$, some calculations can be recycled and this led us to $$f(x)' = e^{x^x\ln\left(x\right)}\left(x^x\ln\left(x\right)\left(\ln\left(x\right)+1\right)+x^{x-1}\right)$$

from here we can use linearity of the derivative and have maybe a little less calculation. With this method the first derivative it can be calculated a little faster, for the second that's still some work to do.

  • 4
    Your premise that $f(x) = e^{x^x}x$ is wrong. It's true that $f(x)=e^{\ln\left(x^{x^x}\right)}$, but this isn't equal to $e^{x^x}x$. – Varun Vejalla Mar 18 '22 at 21:09
  • @VarunVejalla I was very convinced it's true, I overlook it's a multiplication between exponent and not a sum, thank you for the clarification – Turquoise Tilt Mar 19 '22 at 20:58
0

One sneaky way to do this that involves only working with polynomials:

(1) first find the quadratic Taylor approximation of $y=f(x)= x^x $ based at $x=1$: $$f(x)= f(1) + f'(1)(x-1) + \frac{f''(1)}{2} (x-1)^2= 1+ (x-1)+ (x-1)^2$$

and then

(2) use this polynomial approximation to compute an approximation of the iterated function $g(x)=f(f(f(x)))$ by retaining only terms up to second-order.

An additional time saver is to (3) use the fact that since $f(1)=1$ is a fixed point of the function being iterated, it is convenient to shift domain and range variables so that they are centered at this fixed point $1$. (This shift is an isometric translation does not alter the values of derivatives on a graph.) Thus if you set $u=x-1$ then the quadratic approximation is $y-1 = f(x)-1= u+u^2 =q(u)$.

Thus the iterate $q(q(u))= q(u)+ q(u)^2 = u+u^2 + u^2+\ldots =u+ 2u^2+\ldots$ plus higher-order terms, and likewise the next iterate is

$q(q(q(u)))= q(u)+ 2 (q(u))^2 \ldots = u+ u^2 + 2u^2+\ldots =u+ 3u^2$ from which it can be deduced that $q''(u)|_{u=0} = 6$ and therefore (after shifting back to the original variables) $g''(1) = 6$.

MathFont
  • 4,837