# How do you find the first and second derivative of x^lnx?

Jan 22, 2018

$\frac{d}{\mathrm{dx}} {x}^{\ln x} = \left(2 \ln x\right) {x}^{\ln x - 1}$

$\frac{{d}^{2}}{\mathrm{dx}} ^ 2 {x}^{\ln x} = 2 {x}^{\ln x - 2} \left(2 {\ln}^{2} x - \ln x + 1\right)$

#### Explanation:

Write the function as:

${x}^{\ln x} = {\left({e}^{\ln} x\right)}^{\ln x} = {e}^{{\ln}^{2} x}$

then using the chain rule:

$\frac{d}{\mathrm{dx}} {x}^{\ln x} = {e}^{{\ln}^{2} x} \frac{d}{\mathrm{dx}} \left({\ln}^{2} x\right) = {x}^{\ln x} \frac{2 \ln x}{x}$

and using the product rule:

$\frac{{d}^{2}}{\mathrm{dx}} ^ 2 {x}^{\ln x} = \frac{2 \ln x}{x} \frac{d}{\mathrm{dx}} {x}^{\ln x} + {x}^{\ln x} \frac{d}{\mathrm{dx}} \frac{2 \ln x}{x}$

$\frac{{d}^{2}}{\mathrm{dx}} ^ 2 {x}^{\ln x} = \frac{4 {\ln}^{2} x}{x} ^ 2 {x}^{\ln x} + 2 {x}^{\ln x} \frac{1 - \ln x}{x} ^ 2$

$\frac{{d}^{2}}{\mathrm{dx}} ^ 2 {x}^{\ln x} = {x}^{\ln x} \frac{4 {\ln}^{2} x - 2 \ln x + 2}{x} ^ 2$

Note now that:

${x}^{\ln x} / x = {x}^{\ln x} \cdot {x}^{-} 1 = {x}^{\ln x - 1}$

so we can simplify as:

$\frac{d}{\mathrm{dx}} {x}^{\ln x} = \left(2 \ln x\right) {x}^{\ln x - 1}$

$\frac{{d}^{2}}{\mathrm{dx}} ^ 2 {x}^{\ln x} = 2 {x}^{\ln x - 2} \left(2 {\ln}^{2} x - \ln x + 1\right)$