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?

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.
$$
