Before reading this post, I would suggest checking the following thread: Is it possible to evaluate $\lim_{x\rightarrow 0}(-1+\cos x)^{\tan x}$? The answers provided by other users and my further input could be helpful.
I have the following limit that I should evaluate without using l'Hôpital: $$\lim_{x \rightarrow 0} (-1+\cos x)^{\tan x}$$
Here's what I've done: $$\lim_{x \rightarrow 0} (-1+\cos x)^{\tan x}=\lim_{x \rightarrow 0} e^{\ln((-1+\cos x)^{\tan x})}=\lim_{x \rightarrow 0} e^{\tan x \cdot \ln(\cos x-1)}=\lim_{x \rightarrow 0} e^{\sin x \cdot \frac{\ln (\cos x-1)}{\cos x}}$$
but I'm stuck. Any help would be appreciated, thanks.
Claim: $\lim\limits_{x\to 0} (\cos(x)-1)^{\tan(x)} = 1$. Proof: We will need the half angle and double angle formulas:
Half angle formula: $\cos(x) -1 = -2\sin^2(\frac{x}{2})$
Double angle formula: $\sin(x) = 2\sin(\frac{x}{2})\cos(\frac{x}{2})$
\begin{align} (\cos(x)-1)^{\tan(x)} &= \text{exp}\Big( \tan(x)\log(-2\sin^2(\frac{x}{2}))\Big) \\ &= \text{exp}\Big( \frac{\sin(x)}{\cos(x)}\log(-2\sin^2(\frac{x}{2}))\Big) \\ &= \text{exp}\Big( \frac{2\sin(\frac{x}{2})\cos(\frac{x}{2})} {\cos(x)}2\log(i\sqrt{2}\sin(\frac{x}{2}))\Big) \\ &= \text{exp}\bigg(-i2\sqrt{2} \underbrace{\bigg(\frac{\cos(\frac{x}{2})}{\cos(x)}\bigg)}_{=:g(x)} \underbrace{\Big(i\sqrt{2}\sin(\frac{x}{2})\Big)}_{=:f(x)} \log(i\sqrt{2}\sin(\frac{x}{2}))\bigg) \\ \end{align}
And here we have $\lim\limits_{x\to 0} g(x) = 1$ and $\lim\limits_{x\to 0} f(x)\log(f(x)) = 0$, where the latter follows from $\lim\limits_{x\to 0}f(x) = 0$ and $\lim\limits_{z\to 0} z\log(z) = 0$ for complex $z$.
Hence $\lim\limits_{x\to 0} \text{exp}(-i2\sqrt{2}g(x)f(x)\log(f(x))) = \text{exp}(0) = 1$