The question is from Differential and Integral Calculus by Piskunov:
$$\lim\limits_{z \to 1}\left(1-z\right)\tan{\dfrac{\pi z}{2}}$$
I tried using the identity, $\tan{\frac{x}{2}}=\frac{1-\cos{x}}{\sin{x}}$ to simplify this to:
$$\lim\limits_{z \to 1}\left(1 - z\right)\dfrac{\sin{\pi z}}{1+\cos{\pi z}}$$
But I still can't solve this.
Note that\begin{align}\tan\left(\frac{\pi z}2\right)&=\tan\left(\frac{\pi(z-1)}2+\frac\pi2\right)\\&=-\cot\left(\frac\pi2(z-1)\right),\end{align}and that therefore\begin{align}\lim_{z\to1}(1-z)\tan\left(\frac{\pi z}2\right)&=\lim_{z\to1}\left(\frac{z-1}{\sin\left(\frac\pi2(z-1)\right)}\times\cos\left(\frac\pi2(z-1)\right)\right)\\&=\frac{\lim_{z\to1}\cos\left(\frac\pi2(z-1)\right)}{\lim_{z\to1}\frac{\sin\left(\frac\pi2(z-1)\right)}{z-1}}\text{ (since both limits exist)}\\&=\frac{\cos0}{\frac\pi2\cos0}\\&=\frac2\pi.\end{align}