Question: How to evaluate this limit?

$$\lim\_{x \to 0} \ln\left(\frac{\cos x}{1+\sin x}\right)^{\frac{1}{x}}$$

I think, somehow it can be transformed to expression, similar to $\frac{\ln (1+x)}{x}$
which limit is equal to $1$, but how?
Can you help?$

Answer: 
For $1+\sin x\ne0,$ $$\dfrac{\cos x}{1+\sin x}=\dfrac{1-\tan\dfrac x2}{1+\tan\dfrac x2}=1+\dfrac{-2\tan\dfrac x2}{1+\tan\dfrac x2}$$

$$\lim\_{x\to0}\left(\dfrac{\cos x}{1+\sin x}\right)^{1/x}$$

$$=\left(\lim\_{x\to0}\left(1+\dfrac{-2\tan\dfrac x2}{1+\tan\dfrac x2}\right)^{-\dfrac{1+\tan\dfrac x2}{2\tan\dfrac x2}}\right)^{-\lim\_{x\to0}\dfrac{\tan\dfrac x2}{\dfrac x2\left(1+\tan\dfrac x2\right)}}$$

Set $\dfrac{1+\tan\dfrac x2}{-2\tan\dfrac x2}=y$ to find the inner limit converges to $e$ 

Now find the limit of exponent
We have
\begin{aligned}
\lim\limits\_{x\to 0}\ln\left(\frac{\cos x}{1+\sin x}\right)^{\frac{1}{x}}&=\lim\limits\_{x\to 0}\left(\frac{\ln(1+(\cos x-1))-\ln(1+\sin x)}{x}\right)\\
&=\lim\limits\_{x\to 0}\left(\frac{\ln(1+(\cos x-1))}{x(\cos x-1)}\cdot\frac{\cos x-1}{x}\cdot x-\frac{\ln(1+\sin x)}{x\sin x}\cdot \sin x\right)\end{aligned}

Can you continue?