2

Find the second derivative $d^2y/dx^2$ when $y=x^x\:(x>0)$.

$$y=x^x,\:\:(x\gt0)$$

\begin{align} \log y&=x\log x \\ \rm{Differentiating}&\:{\rm{with\:respect\:to\:}}x \end{align}

\begin{align} \frac{1}{y}\frac{dy}{dx}&=1\cdot(\log x+1)+x\cdot\frac{1}{x} \\[0.8ex] \frac{dy}{dx}&=x^x(\log x+1) \end{align}

I found the first derivative, and now I want to know how to find the second derivative of this function.

Aakash Kumar
  • 3,480

3 Answers3

1

Just do the same thing: $$\log \left( \frac{dy}{dx} \right) = x \log x + \log (\log x + 1),$$ so $$\frac{1}{\frac{dy}{dx}} \frac{d^2 y}{dx^2} = (\log x + 1) + \frac{1}{\log x + 1} \cdot \frac{1}{x},$$ hence $$\frac{d^2 y}{dx^2} = \frac{dy}{dx} \left( \log x + 1 + \frac{1}{x(\log x + 1)} \right),$$ and substitute the expression you obtained for the first derivative.

Alternatively, $$\frac{dy}{dx} = x^x (\log x + 1)$$ implies $$\frac{d^2 y}{dx^2} = \frac{d}{dx}\left[x^x \right] (\log x + 1) + x^x \cdot \frac{1}{x}$$ by the product rule, and as before, substitute the derivative of $x^x$ that you found earlier.

heropup
  • 135,869
0

$y = x^x$ As shown, $\frac{dy}{dx} = x^x(\log x + 1)$

Differentiating, again w.r.t. $x$, we get,

$\frac {d^2y}{dx^2} = \frac{d}{dx}{x^x (\log x + 1)}$

Using given information and differentiating by parts, we get,

$$\frac {d^2y}{dx^2} = (\log x + 1)\frac{d}{dx}x^x + x^x \frac{d}{dx}(\log x + 1)$$ $$\frac {d^2y}{dx^2} = (\log x + 1).x^x(\log x + 1) + x^x(\frac {1}{x} + 0)$$

$$\frac {d^2y}{dx^2} = x^x(\log x + 1)^2 + x^{x-1}$$

Required answer.

0

This is not an answer but it is too long for a comment.

You have been already given good answers.

What could be interesting is to think how $y$, $y'$, $y''$ would have be coded in the most inexpensive way. $$\color{red}{y=x^x}\implies \log(y)=x \log(x)$$ so $$\frac{y'}y=1+\log (x)\implies \color{red}{y'=y\left(1+\log (x) \right)}\implies\log(y')=\log(y)+\log (1+\log (x))$$ $$\frac{y''}{y'}=\frac{y'}{y}+\frac{1}{x (1+\log (x))}\implies \color{red}{y''=y'\left(\frac{y'}{y}+\frac{1}{x (1+\log (x))}\right)}$$ As you can see, very few basic operations (we could compute $\log(x)$ only once and reuse it)