# Computation of a residue

Consider the function $\cos\left(\frac{z}{z+1}\right)$, which has an essential singularity at the point $z=-1$.

How does one compute its residue at $z=-1$.

-

Let's shift $z$ by $1$ and equivalently find the residue of $\cos((z-1)/z)=\cos(1-1/z)$ at $z=0$. From the Taylor series for $\cos z$, we have

$$\cos\left(1-\frac1z\right)=\sum_{k=0}^\infty\frac{(-1)^k}{(2k)!}\left(1-\frac1z\right)^{2k}\;.$$

The residue at $0$ is the sum of the coefficients of $1/z$, which is

$$\begin{eqnarray} \sum_{k=0}^\infty\frac{(-1)^k}{(2k)!}(-2k) &=& \left[-\frac{\mathrm d}{\mathrm dz}\sum_{k=0}^\infty\frac{(-1)^k}{(2k)!}z^{2k}\right]_{z=1} \\ &=& \left[-\frac{\mathrm d}{\mathrm dz}\cos z\right]_{z=1} \\ &=& \sin 1 \\ &\approx& 0.841471\;. \end{eqnarray}$$

Here's a check of the result by contour integration using Wolfram|Alpha.

Note that the specific form of the Taylor series for $\cos z$ wasn't actually used, so more generally the residue at $0$ of $f(1+1/z)$ for any entire function $f(z)$ is $f'(1)$. Actually we can see this more directly by expanding $f(z)$ around $z=1$; then

$$f\left(1+\frac1z\right)=f(1)+f'(1)\frac1z+\frac1{2!}f''(1)\frac1{z^2}+\dotso\;,$$

from which the residue is again $f'(1)$.

-
Your general statement about $f(1+1/z)$ requires $f$ to be entire. Otherwise the expansion of $f(1+1/z)$ near $z=0$ is not the same as the expansion near $z=\infty$. –  Robert Israel Mar 19 '12 at 1:55
For example, try it with $f(z) = 1/(z-2)$. –  Robert Israel Mar 19 '12 at 2:00
@Robert: I see. Thanks, I fixed it. –  joriki Mar 19 '12 at 10:26

$$A=\cos\left(\frac{z}{z+1}\right) = \cos\left(\frac{z\color{red}{+1-1}}{z+1}\right)=\cos \left( 1- \frac{1}{z+1} \right)$$ $$\cos(a\pm b)=\cos(a)\cos(b) \mp \sin(a)\sin(b)$$ $$A=\cos(1)\cos\left(\frac{1}{z+1}\right)+\sin(1)\sin\left(\frac{1}{z+1}\right)$$ $$\cos(z)=1-\frac{z^2}{2!}+\frac{z^4}{4!}-... \hspace{10mm} \sin(z)=z-\frac{z^3}{3!}+\frac{z^5}{5!}-...$$ $$\cos\left(\frac{1}{z+1}\right)=1-\frac{1}{(z+1)^2 2!}+\frac{1}{(z+1)^4 4!}-...$$ $$\sin\left(\frac{1}{z+1}\right)=\frac{1}{z+1}-\frac{1}{(z+1)^3 3!}+\frac{1}{(z+1)^5 5!}-...$$ $$A=\cos(1) \left[ 1-\frac{1}{(z+1)^2 2!}+\frac{1}{(z+1)^4 4!}-...\right]+\sin(1)\left[ \frac{1}{z+1}-\frac{1}{(z+1)^3 3!}+\frac{1}{(z+1)^5 5!}-... \right]$$ $$\text{ so residue is coefficient of term } \frac{1}{z+1} \rightarrow \sin(1)$$

-