# What's the derivative of f(x)=g(x)^(h(x))?

Sep 20, 2016

$f ' \left(x\right) = g {\left(x\right)}^{h \left(x\right) - 1} \left(h ' \left(x\right) g \left(x\right) \ln \left(g \left(x\right)\right) + h \left(x\right) g ' \left(x\right)\right)$

#### Explanation:

Using logarithmic differentiation:

$\ln \left(f \left(x\right)\right) = \ln \left(g {\left(x\right)}^{h \left(x\right)}\right) = h \left(x\right) \ln \left(g \left(x\right)\right)$

Differentiating both sides (chain, product rules):

$\frac{1}{f} \left(x\right) f ' \left(x\right) = h ' \left(x\right) \ln \left(g \left(x\right)\right) + h \left(x\right) \frac{1}{g} \left(x\right) g ' \left(x\right)$

$\frac{1}{f} \left(x\right) f ' \left(x\right) = \frac{h ' \left(x\right) g \left(x\right) \ln \left(g \left(x\right)\right) + h \left(x\right) g ' \left(x\right)}{g} \left(x\right)$

Multiply both sides by $f \left(x\right) = g {\left(x\right)}^{h \left(x\right)}$:

$f ' \left(x\right) = \frac{g {\left(x\right)}^{h \left(x\right)} \left(h ' \left(x\right) g \left(x\right) \ln \left(g \left(x\right)\right) + h \left(x\right) g ' \left(x\right)\right)}{g} \left(x\right)$

$f ' \left(x\right) = g {\left(x\right)}^{h \left(x\right) - 1} \left(h ' \left(x\right) g \left(x\right) \ln \left(g \left(x\right)\right) + h \left(x\right) g ' \left(x\right)\right)$