# How do you differentiate f(x)=ln(x)^x-lnx/x^x?

Nov 9, 2015

$y ' = \left\{\frac{1 - {x}^{-} x}{x}\right\} + \ln \left(x\right) \left\{\left(1 + \ln \left(x\right)\right) \left({x}^{-} x\right)\right\}$

#### Explanation:

Start with assuming $f \left(x\right) = y$.

Therefore,

$y = \ln \left(x\right) - \ln \frac{x}{x} ^ x$

$\therefore y = \ln \left(x\right) \left[1 - \frac{1}{x} ^ x\right]$

$\therefore y = \ln \left(x\right) \left[1 - {x}^{-} x\right]$

Now, differentiating wrt x,

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

$\therefore y ' = \left(1 - {x}^{-} x\right) \frac{d}{\mathrm{dx}} \ln \left(x\right) + \ln \left(x\right) \frac{d}{\mathrm{dx}} \left(1 - {x}^{-} x\right)$ ...(1)

(Using the Chain Rule of Differentation)

The first term is simple to handle, and it reduces to $\frac{1 - {x}^{-} x}{x}$ but the second term is tricky, so we'll evaluate it separately.

Let $t = {x}^{-} x$

Taking the natural log on both sides of the equation,

$\ln \left(t\right) = - x \ln \left(x\right)$

Differentiating both sides wrt x,

$\frac{1}{t} \frac{\mathrm{dt}}{\mathrm{dx}} = - \left(1 + \ln \left(x\right)\right)$

$\therefore \frac{\mathrm{dt}}{\mathrm{dx}} = - \left(1 + \ln \left(x\right)\right) . t$

Replacing value of t,

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

Extrapolating further and using the value $1 - {x}^{-} x$

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

Using the above expression in (1),

$y ' = \left\{\frac{1 - {x}^{-} x}{x}\right\} + \ln \left(x\right) \left\{\left(1 + \ln \left(x\right)\right) \left({x}^{-} x\right)\right\}$

This can be further simplified to suit the provided answer. But this, I believe, is in a simple form by itself. The trick here is to differentiate the $\left(1 - {x}^{-} x\right)$ separately, as shown, by equating it to the natural logarithm of any variable $t$ and then simplifying the process of differentiation.