I am interested in understanding the general behavior of the derivative for $$f(x)^{g(x)}$$ at points where $f(x)=0$.
For example, if $f^g=x^n$ we have $$\frac{d}{dx}f^g(0)=\begin{cases}0 & n\ge 1 \\ \pm\infty & n<1\end{cases}$$
The general formula $$(f^g)'=f^g\left(g'\ln |f|+g\frac{f'}{f}\right)$$ breaks down when $f=0$, though as the example above shows the derivative may still exist there.
I am not sure what the proper assumptions should be. Tentatively, take $f(x)^{g(x)}\ge 0$ for all $x$ in the relevant domain, so that (I believe) we have $$\ln \left(f(x)^{g(x)}\right)=g(x)\ln |f(x)|$$ when $f$ is strictly positive and undefined otherwise.
Also, is there any non-trivial example of a well-defined function (meaning "nice", as in differentiable almost everywhere) $f^g$ where $f$ takes on negative values and where $g$ is not constant? In other words, for cases of $f<0$ are the only functions worth considering of the form $f^c$ for constants $c$?
EDIT: I want the function(s) to be real, although arguments using complex numbers are of course permissible.
I would imagine that for negative f<0 you could write:
$f^g=(-1)^g\,|\,f\,|^g=e^{\pm i \pi\, g}|\,f\,|^g=(\cos(\pi\,g)\pm i\,\sin(\pi\,g))|\,f\,|^g$
So in general it is a complex valued function and the argument (or the phase) of the function f^g is independent on f. There are also two possible choices for the imaginary part of the function. Once you make that choice I would imagine that there are many examples which are differentiable (differentiable f and g should work) provided you don't mind having a complex function of one real variable.