What is the residue of $f(z)=\tan{z}$ at any of its pole ? Is the solution correct? The residue of $$f(z)=\tan{z}$$ at any of its pole is,
$$f(z)=\tan{z}=\frac{(z-\frac{\pi}{2})(\tan{z})}{(z-\frac{\pi}{2})}$$
$$\begin{align}
\left({\operatorname{Res} {f(z)=\tan{z}; z=\frac{\pi}{2}}}\right)&=\lim_{z\to \large{\frac{\pi}{2}}}\left((z-\frac{\pi}{2})(\tan{z})\right)\\
\\
&=0\\
\end{align}$$
 A: The set of poles of $\tan$ is $\big\{c_k:=\big({\frac1 2 +k}\big)\pi,k\in\mathbb{Z} \big\}$, and there we have
$$\lim_{z\to c_{k}^{\pm}}\tan z=(-1)^k (\mp\infty),$$
$$\lim_{z\to c_{k}}((z-c_k)\tan z)=\lim_{z\to c_{k}}\bigg(\sin z \frac{z-c_k}{\cos z}\bigg)=\lim_{z\to c_{k}}\sin z\lim_{z\to c_{k}}\bigg(\frac{z-c_k}{\cos z}\bigg)=$$
$$\lim_{z\to c_{k}}\sin z\lim_{z\to c_{k}}\bigg(\frac{1}{-\sin z}\bigg)=-1$$
Having applied the L'Hôpital's rule for the indeterminate form $0/0$; therefore the points $c_k$ are all single poles of $\tan$, all with residue $$\mathrm{res}_{c_k}\tan= -1.$$
A: $$\tan z = \frac{\sin z}{ \cos z}$$
$$\lim_{z \to \frac{\pi}{2}} \left(z- \frac{\pi}{2} \right)\frac{\sin z}{ \cos z} = \frac{\sin \left(\frac{\pi}{2} \right)}{ - \sin \left(\frac{\pi}{2} \right)}=-1$$
where 
$$f'(z_0) =\lim_{z \to z_0}\frac{f(z)-f(z_0)}{z-z_0}$$
$z_0 =\frac{\pi}{2}$ ,$f = \cos(z)$
A: The residue of $f(z)$ at the $m$-ordered pole $z_0$ is
$\displaystyle R(f(z),z_0)=\frac{1}{(m-1)!}\lim_{z\to z_0}\frac{d^{m-1}}{dz^{m-1}}\left((z-z_0)^m f(z)\right)$
