Question of exponential limits $f(x)^{g(x)}$ Today I was doing a limit and got stuck in this problem:
$$\lim _{x\to0} \left(\dfrac{\sin x}{x}\right)^{1/(1-\cos x)}$$
and while solving this I found a rule and I want to know the prove of that rule:
$$\lim_{x\to a} f(x)^{g(x)}=e^{\lim_{x\to a}(f(x)-1)\cdot g(x)}$$
Kindly explain the rule.
 A: The "rule" is not a rule, it is a trick for evaluating limits of the form $1^\infty$. The reason this works is because
$$f(x)^{g(x)} = \exp\left[\log(f(x))\cdot g(x)\right] = \exp\left[\left(\frac{\log(f(x))}{f(x)-1}\right)\cdot\left((f(x)-1)\cdot g(x)\right)\right]$$
Using the facts that $\lim f(g(x)) = f(\lim g(x))$ and
$$\lim f(x)\cdot g(x) = \lim f(x) \cdot \lim g(x)$$
for continuous functions and when both limits exist, respectively, we can say that
$$\lim_{x\to a}f(x)^{g(x)} = \exp\left[\left(\lim_{x\to a}\frac{\log(f(x))}{f(x)-1}\right)\cdot\left(\lim_{x\to a}(f(x)-1)\cdot g(x)\right)\right]$$
When $\lim_{x\to a} f(x) = 1$, we have that
$$\lim_{x\to a}\frac{\log(f(x))}{f(x)-1} = \lim_{f\to 1}\frac{\log f}{f-1} = 1$$
which is the standard limit
$$\lim_{u\to 0}\frac{e^u-1}{u}$$
rewritten in a different form. This means we have the final equality for the trick
$$\lim_{x\to a}f(x)^{g(x)} = \exp\left[\lim_{x\to a}(f(x)-1)\cdot g(x)\right]$$

In this case, applying the trick gets us
$$\lim_{x\to 0}\left(\frac{\sin x}{x}-1\right)\cdot\frac{1}{1-\cos x} = \lim_{x\to 0}\left(\frac{\sin x - x}{x^3}\right)\cdot\left(\frac{x^2}{1 - \cos x}\right) = -\frac{1}{3}$$
meaning the original limit evaluates to $\boxed{e^{-\frac{1}{3}}}$
A: There is no such rule.
As $N=e^{\ln N}$ for all $N$ which can be arguments to the logarithm function, we can substitute $f(x)^{g(x)}$ for $N$ to get
$${f(x)}^{g(x)} = e^{\ln {f(x)}^{g(x)}}.$$
This, by a well-known property of logarithms, can be replaced with:
$${f(x)}^{g(x)} = e^{\ln {f(x)}^{g(x)}} = e^{(\ln f(x))\cdot {g(x)}}.$$
Both the exponential and logarithmic function are continuous, so
$$\lim_{x\to a} f(x)^{g(x)} = e^{\lim_{x\to a} (\ln f(x))\cdot g(x)}$$
provided the limit exists.
This, however, is not equivalent to what you wrote, unless you assert it's a special case of $f$ satisfying $$\ln f(x) = f(x)-1.$$
