How to calculate Limit of $(1-\sin x)^{(\tan \frac{x}{2} -1)}$ when $x\to \frac{\pi}{2}$. 
How to calculate Limit of $(1-\sin x)^{(\tan \frac{x}{2} -1)}$ when $x\to \frac{\pi}{2}$.

We can write our limit as $\lim_{x\to \frac{\pi}{2}}e^{(\tan \frac{x}{2} -1) \log(1-\sin x)}~ $  but I can not use L'Hopital rule.
Is there another way?
 A: Using (elementary) Taylor series, to low order.
As you noticed, $$
(1-\sin x)^{(\tan \frac{x}{2} -1)}= 
\exp\left( (\tan \frac{x}{2} -1) \ln (1-\sin x)\right)
$$
Now, since I am much more comfortable with limits at $0$ than at other points, let us write $x = \frac{\pi}{2}+h$ and look at the limit of the exponent when $h\to 0$:
$$
(\tan\left(\frac{\pi}{4}+\frac{h}{2}\right) -1) \ln (1-\sin(\frac{\pi}{2}+h))
= 
(\tan\left(\frac{\pi}{4}+\frac{h}{2}\right) -1) \ln (1-\cos h)
$$
Now, using Taylor series at $0$:


*

*$\cos u = 1- \frac{u^2}{2} + o(u^2)$

*$\tan\left(\frac{\pi}{4}+u\right) = 1+\tan'\left(\frac{\pi}{4}\right) u + o(u) = 1+2u+o(u)$


so 
$$
(\tan\left(\frac{\pi}{4}+\frac{h}{2}\right) -1) \ln (1-\sin(\frac{\pi}{2}+h))
= 
(h + o(h)) \ln\left(\frac{h^2}{2} + o(h^2)\right) \operatorname*{\sim}_{h\to0} 2h \ln h
$$
and the RHS converges to $0$ when $h\to0$. By continuity of the exponential, we then have
$$
\exp\left( (\tan \frac{x}{2} -1) \ln (1-\sin x)\right)
\xrightarrow[x\to \frac{\pi}{2}]{} e^0 =1.
$$
A: Use $\sin2A=\dfrac{2\tan A}{1+\tan^2A}$ and write $t=\tan\dfrac x2$ to find
$$\dfrac{\lim_{t\to1}(1-t)^{2(t-1)}}{\lim_{t\to1}(1+t^2)^{(t-1)}}$$
The denominator can be handled easily.
For the numerator,
For $t<1,\lim_{t\to1^-}(1-t)^{2(t-1)}=(\lim_{h\to0}h^h)^2$ (setting $t-1=h$)
For $t>1,\lim_{t\to1^+}(1-t)^{2(t-1)}=\lim_{t\to1^+}(t-1)^{2(t-1)}=(\lim_{h\to0}h^h)^{-2}$ (setting $1-t=h$)
A: Making the substitution $
x = \dfrac{\pi}{2} + y$ the required limit is
$\lim_{y \to 0} \exp h(y)$ where $h(y)= \ln(1-\cos y) \left( \tan(\pi/4 + y/2) - 1 \right) = \ln(1-\cos y) \times \dfrac{2\tan(y/2)}{1-\tan(y/2)}$. 
Since $1-\cos y = 2 \sin^2(y/2)$ we have $$h(y) = (\sqrt{2}\sin(y/2)) \ln(2\sin^2(y/2))  \times \dfrac{2}{\sqrt{2}} \times \dfrac{\dfrac{\tan (y/2)}{y/2}}{\dfrac{\sin(y/2)}{y/2}} \times \dfrac{1}{1-\tan(y/2)}  $$.
Since $\lim_{x\to0}x\ln(x^2) = 2\lim_{x \to 0} x \ln |x| = 0$ and so we have $\lim_{y\to 0}(\sqrt{2}\sin(y/2)) \ln(2\sin^2(y/2)) = 0$ and $\lim_{y\to 0}h(y) = 0 \times \dfrac{2}{\sqrt{2}} \times \dfrac{1}{1} \times 1 = 0.$
So the required limit is 1.
