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

Feb 15, 2017

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

#### Explanation:

Take the natural logarithm of both sides.

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

Now apply $\ln {a}^{n} = n \ln a$.

$\ln y = \left(x + 1\right) \ln \left(x - 2\right)$

Distribute:

$\ln y = x \ln \left(x - 2\right) + \ln \left(x - 2\right)$

Now differentiate using the product rule and implicit differentiation. Let $u = x$ and $v = \ln \left(x - 2\right)$. By the product rule $\frac{d}{\mathrm{dx}} \left(u v\right) = u ' v + v ' u$. The derivative of $v$, by the chain rule, is $\frac{1}{x - 2}$ and $u$ is $1$.

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

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

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

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

Hopefully this helps!