# How do you differentiate y=x^(x-1)?

Jun 29, 2016

Use logarithmic differentiation to get $y ' = \left(\ln x + 1 - \frac{1}{x}\right) {x}^{x - 1}$.

#### Explanation:

Take the natural logarithm of both sides, to drop the exponent:
$\ln y = \left(x - 1\right) \ln x$

Now differentiate both sides with respect to $x$:
$\frac{d}{\mathrm{dx}} \left(\ln y = \left(x - 1\right) \ln x\right)$

Note that this will require knowledge of implicit differentiation, because the derivative of $\ln y$ w.r.t.x is $\frac{1}{y} \cdot y '$. The derivative of $\left(x - 1\right) \ln x$ is found with the product rule:
$\frac{d}{\mathrm{dx}} \left(\left(x - 1\right) \left(\ln x\right)\right) = \left(x - 1\right) ' \left(\ln x\right) + \left(x - 1\right) \left(\ln x\right) '$
$= \left(1\right) \left(\ln x\right) + \left(x - 1\right) \cdot \left(\frac{1}{x}\right)$
$= \ln x + \frac{x - 1}{x}$
$= \ln x + 1 - \frac{1}{x}$

Since $\frac{d}{\mathrm{dx}} \left(\ln y\right) = \frac{1}{y} \cdot y '$, and $\frac{d}{\mathrm{dx}} \left(\left(x - 1\right) \left(\ln x\right)\right) = \ln x + 1 - \frac{1}{x}$, we have:
$\frac{1}{y} \cdot y ' = \ln x + 1 - \frac{1}{x}$

Multiply both sides by $y$ to isolate $y '$:
$y ' = \left(\ln x + 1 - \frac{1}{x}\right) y$

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