[Math] Residue of $\frac{1}{\cos z}$ at $z=\pi/2$

complex-analysisresidue-calculus

What is the residue of $$\frac{1}{\cos z}$$ at $z=\pi/2$? Given that $$\cos z=\prod_{k\in\mathbb{Z}}(z-z_k)=(z-\pi/2)(z+\pi/2)(z^2-(3\pi/2)^2)(z^2-(5\pi/2)^2)\cdots,$$ the point $z=\pi/2$ is a simple pole (order $n=1$) and so usning the definition of residue $$\mathrm{Res}\{f(z),z=w\}=\lim_{z\to w}\frac{1}{(n-1)!}\frac{d^{n-1}}{dz^{n-1}}[(z-w)^nf(z)]$$ I find
$$\mathrm{Res}\{\frac{1}{\cos z},z=\pi/2\}=\lim_{z\to \pi/2}[(z-\pi/2)\frac{1}{\cos z}]=$$$$=\lim_{z\to \pi/2}\frac{1}{(z+\pi/2)(z^2-(3\pi/2)^2)(z^2-(5\pi/2)^2)\cdots}=$$
$$=\lim_{z\to \pi/2}\frac{1}{z+\pi/2}\prod_{k>0}\frac{1}{z^2-\frac{\pi^2}{4}(2k+1)^2}=$$
$$=-\frac{1}{\pi^3}\prod_{k>0}\frac{1}{k^2+k}.$$
WolframAlpha find $-1$ for the residue, but if I ask it to calculate the product i found it turn out that $$\prod_{k>0}\frac{1}{k^2+k}=0.$$ Where is my error?

Best Answer

With $g(z)=\cos z$ we have

$ \frac{\cos z}{z- \frac{\pi}{2}}=\frac{\cos z- \cos(\frac{\pi}{2})}{z- \frac{\pi}{2}}- \to g'(\frac{\pi}{2})=-1 $ for $z \to \pi /2$

hence

$ \frac{z- \frac{\pi}{2}}{\cos z} \to -1$ for $z \to \pi /2$

Related Question