How to solve $\lim _{x\to \pi/2}\left(\tan x-1\right)\left(1-\tan\left(\frac{x}{2}\right)\right) =\infty\cdot 0$? $\lim _{x\to \pi/2}\left(\tan x-1\right)\left(1-\tan\left(\frac{x}{2}\right)\right) $ Is there a way to solve this limit without any fancy trigonometric identity?
 A: Note that we can write
$$\begin{align}
(1-\tan(x))\,(1-\tan(x/2))&=\frac{\cos(x)-\sin(x)}{\cos(x)}\,\frac{\cos(x/2)-\sin(x/2)}{\cos(x/2)}\\\\
&=\underbrace{\frac{\cos(x)-\sin(x)}{\cos(x/2)}}_{\to -\sqrt{2}\,\text{as}\,x\to \pi/2}\,\frac{\cos(x/2)-\sin(x/2)}{\cos(x)}\\\\
\end{align}$$
So, the problem boils down to evaluating the limit
$$\lim_{x\to\pi/2}\frac{\cos(x/2)-\sin(x/2)}{\cos(x)}\overbrace{=}^{LHR}\lim_{x\to\pi/2}\frac{-\frac12\sin(x/2)-\frac12\cos(x/2)}{-\sin(x)}=\frac{1}{\sqrt 2}$$
A: HINT:
W/O L'Hospital's rule,
$$\displaystyle\left(\tan x-1\right)\left(1-\tan\left(\frac{x}{2}\right)\right) =\dfrac{\sin x-\cos x}{\cos\dfrac x2}\cdot\dfrac{\cos\dfrac x2-\sin\dfrac x2}{\cos x}$$
Now $\cos \left[ 2\left(\dfrac x2\right) \right] =\cos^2\dfrac x2-\sin^2\dfrac x2$
A: Assuming that you can use Taylor series.
First, let $x=y+\frac \pi 2$ to make $$(\tan (x)-1)\left(1-\tan \left(\frac{x}{2}\right)\right) =(\cot (y)+1)\left(\tan \left(\frac{y}{2}+\frac \pi 4 \right)-1\right) $$ Now, using $$\cot(y)=\frac{1}{y}-\frac{y}{3}+O\left(y^3\right)$$ $$\tan \left(\frac{y}{2}+\frac \pi 4 \right)=1+y+\frac{y^2}{2}+O\left(y^3\right)$$ then 
$$A=(\cot (y)+1)\left(\tan \left(\frac{y}{2}+\frac \pi 4 \right)-1\right)=\left(1+\frac{1}{y}-\frac{y}{3}+O\left(y^3\right) \right)\left(y+\frac{y^2}{2}+O\left(y^3\right)\right)$$ Expanding and simplifying $$A=1+\frac{3 y}{2}+O\left(y^2\right)$$ which shows the limit and how it is approached.
A: Using double angle formula, $$\tan x=\dfrac{2t}{1-t^2}$$ where $t=\tan\dfrac x2$
$$\implies\lim _{x\to \pi/2}\left(\tan x-1\right)\left(1-\tan\left(\frac{x}{2}\right)\right)=\lim_{t\to1}\dfrac{(2t-1+t^2)(1-t)}{1-t^2}$$
As $t\to1,t\ne1\iff t-1\ne0,$ we can cancel out $1-t$ safely from the denominator & the numerator.
