# Differentiating $f(x)^{g(x)}$

Is there any general rule for what the derivative of $f(x)^{g(x)}$ (where $f(x),g(x)$ are differentiable functions) is in terms of $f(x),g(x),f'(x),g'(x)$.

In other words is there something analogous to product,chain and quotient rules for such expressions?

-
–  MJD Oct 21 '13 at 1:44
–  Jp McCarthy Oct 21 '13 at 12:22

Indeed there is, note that $$f(x)^{g(x)} = e^{g(x)\log f(x)}$$ so differentiating gives $$\frac{d}{dx}(\cdot) =f(x)^{g(x)}\frac{d}{dx}(g(x)\log f(x)) = f(x)^{g(x)}(g'(x)\log f(x) + g(x) \frac{f'(x)}{f(x)})$$ Make sure to be careful about this derivative existing though.
Where this makes sense (that is, where the derivative exists), we can use the chain rule and product rule on $$f(x)^{g(x)}=e^{g(x)\cdot\ln(f(x))}$$
What about logarithmic differentiation? $$h=f^g\Rightarrow \ln h=g\cdot \ln f\Rightarrow \frac{h'}{h}=g'\cdot\ln f+\frac{f'}{f}\Rightarrow h'=h\bigl(g'\cdot\ln f+\frac{f'}{f}\bigr)$$