I am given $\lim\limits_{x\rightarrow \frac{\pi}{2}} \frac{\ln(1-\cos x)}{\cos x} = -1$
So,
$(1-\cos x)^{\tan x} = e^{(\tan x) \ln(1-\cos x)}$
and as $x\rightarrow \frac{\pi}{2}$, we have:
$(\tan x)\ln(1-\cos x)= (\sin x)\frac{\ln(1-\cos x)}{\cos x} \rightarrow (1)(-1)=-1$
Therefore,
$\lim \limits_{x\rightarrow \frac{\pi}{2}} (1-\cos x )^{\tan x} = \lim \limits_{x\rightarrow \frac{\pi}{2}} e^{(\tan x) \ln(1-\cos x)}=e^{-1} \tag{1}$
I don't quite understand how the last equality in $(1)$ was arrived at.
It seems what the solution is doing is $\lim\limits_{x\rightarrow c}e^x=e^{\lim\limits_{x\rightarrow c} x} $.
But I thought the rule is:
$\lim\limits_{x\rightarrow c}e^x=e^c$, so I should just substitute $x=\frac{\pi}{2}$ into $(\sin x)\frac{\ln(1-\cos x)}{\cos x}$ which will result in a division by 0, so I need to figure out another method.
Am I wrongly understanding and applying the rule to find the limit at a point of an exponential function?
such an trick is here not necessary, we get by L'Hospital $\lim_{x \to \frac{\pi}{2}}\frac{\frac{\sin(x)}{1-\cos(x)}}{-\sin(x)}=-1$