\def\Res{\mathop{\rm Res}}
\def\Re{\mathop{\rm Re}\nolimits}
\def\Im{\mathop{\rm Im}\nolimits}
\let\rule\hrule
\def\hrule{\goodbreak\medskip\rule\medskip\goodbreak}

%page 253

\noindent{\bf 4.}

\noindent{\it (a)}

$$(\sec z)^{-1} = \cos z = q(z).$$
$$p(z) = z.$$
$$p(\pi/2+n\pi) = \pi/2 + n\pi = z_n\neq 0, \qquad q(\pi/2+n\pi) = 0,
\qquad q'(\pi/2+n\pi) = -\sin(\pi/2+n\pi) = (-1)^{n+1} \neq 0,$$
so this is a simple pole with residue
$$\Res_{z=z_n}(z\sec z) = (-1)^nz_n.$$

\noindent{\it (b)}

Similarly,
$$(\tanh(z)) = {\sinh z\over\cosh z},$$
giving $p(z) = \sinh z$ and $q(z) = \cosh z,$
which forms a simple pole because
$$p(z_n) = -\sin(\pi/2 + n\pi) = (-1)^n, \qquad q(z_n) = \cos(\pi/2 +
n\pi) = 0, \qquad q'(z_n) = \sin(\pi/2 + n\pi) = (-1)^n.$$

$$p(z_n)/q'(z_n) = (-1)^n/(-1)^n = 1 = \Res_{z=z_n}\tanh z$$

\noindent{\bf 6.}

The value of this integral is equal to $2\pi i$ times the sum of the
residues of $$f(z) = {1\over z^2\sin z}$$ within the square.
These are $z^2 = 0 \to z = 0$ and $\sin z = 0 \to z = z_n = \pi n,$
where $-N\leq n\leq N.$
This set includes $z = 0.$

$$f(z) = {p(z)\over q(z)}$$
where $p(z) = 1$ and $q(z) = z^2\sin z.$ $p(z_n)\neq 1,$ $q(z_n) = 0,$
and $q(z_n) = z_n^2\cos z_n + 2z_n\sin z_n = z_n^2(-1)^n \neq 0$ (except
at $z_n = 0.$)
The sum of residues within the range of $-N\leq n\leq N$ and $n\neq 0$
is $$\sum_{n=1}^N (-1)^nz_n^{-2}+z_{-n}^{-2} = \sum_{n=1}^N {2(-1)^n\over(\pi
n)^2}.$$

At $z_n = 0,$
$$f(z) = {\phi(z)\over z^3},$$
where $\phi(z) = {z\over\sin z},$
This gives a residue at 0 of ${\phi''(0)\over 3!}$.
$$\phi''(z) = -{\cos z\over(\sin z)^2} - {\cos z - z\sin z\over(\sin z)^2}
+ {2z(\cos z)^2\over(\sin z)^3} =
{-2\cos z\sin z + z(\sin z)^2 + 2z(\cos z)^2 \over (\sin z)^3}.$$
$$\phi''(0) = 1,$$
found by noting that, near 0, $\sin z\to z$ and $\cos z\to 1.$
This gives a 1/6 residue.

Together, this makes
$$\int_{C_N} {dz\over z^2\sin z} = 2\pi i\left[{1\over 6}+2\sum_{n=1}^N
{(-1)^n\over\pi^2 n^2}\right].$$

If the integral tends to 0 as $N\to\infty,$
$$0 = {1\over 6}+2\sum_{n=1}^N{(-1)^n\over \pi^2 n^2} \to 
-{\pi^2\over 12} = \sum_{n=1}^N{(-1)^n\over n^2},$$
meaning the series tends to $\pi^2/12.$

\noindent{\bf 10.}

Because $p(z)/q(z)$ has a pole of order $m,$
$${p(z)\over q(z)} = {\phi(z)\over (z-z_0)^m},$$
where $\phi(z)$ is analytic and non-zero at $z_0,$ further giving
$$q(z) = {p(z)\over\phi(z)}(z-z_0)^m,$$
and because $\phi(z)$ is nonzero, $p(z)/\phi(z)$ is analytic, and this
tells us that $q(z)$ has a zero of order $m$ because $q(z) =
g(z)(z-z_0)^m$ where $g(z)$ is a nonzero analytic function.

\hrule
%page 264

\noindent{\bf 1.}

$$z^2+1 = (z-i)(z+i).$$
The only singularity above the real axis is $z = i.$
This point is a simple pole, so its residue is $1/(i+i) = -i/2.$
This gives the value of the integral as $\pi i*(-i/2) = \pi/2$ (since
the integrand is even and $\pi R/(R^2-1)$ vanishes to 0 as $R$ tends to
infinity).

\noindent{\bf 4.}

The singularities of this integrand are, like in the example, the sixth
roots of $-1,$ and they are simple poles, but the residues $B_k$
evaluate instead to $$B_k = \Res_{z=c_k} {z^2\over z^6+1} = {c_k^2\over
6c_k^5} = {c_k^3\over 6c_k^6} = -{c_k^3\over 6}.$$
$$c_k = e^{i(\pi/6+k\pi/3)} \to c_k^3 = e^{i(\pi/2+k\pi)} = i(-1)^k.$$
Since $k\in\{0,1,2\},$ the residues sum to $-i/6,$ giving the value of
the integral to be $\pi i*(-i/6) = -\pi/6,$ (again valid because the
integrand is even and $\pi R^3/(R^6-1)$ vanishes to 0 as $R$ tends to
infinity).

\noindent{\bf 8.}

$$q(z)=(z^2+1)(z^2+2z+2) = (z+i)(z-i)(z+(1+i))(z+(1-i)).$$
The singularities above the real axis are simple poles $z = i, -1+i.$
At these singularities, the residues $p(z)/q'(z)$ are respectively
$${i\over (2i)(1+2i)(1)} = {1-2i\over10}$$ and $${-1+i\over
(-1+2i)(-1)(2i)} = {-1+3i\over 10}.$$

$M_R = {R\over (R^2-1)(R^2-2)} \to R\pi M_R = {R^2\over
(R^2-1)(R^2-2)},$
so $\int_{C_R}f(x)dx = 0$ as $R$ tends to infinity.
This allows us to determine the Cauchy principal value of the integral
to be $2\pi i\cdot i/10 = -\pi/5.$

\hrule
%page 273

\noindent{\bf 1.}

$$\int_{-\infty}^\infty {\cos x\thinspace dx\over (x^2+a^2)(x^2+b^2)} =
\Re \int_{-\infty}^\infty {e^{ix}dx\over (x^2+a^2)(x^2+b^2)}.$$
The singularities in the upper half of the plane are simple poles
$x=ai, x=bi.$
These have residues $${e^{-a}\over (2ai)(-a^2+b^2)}$$ and $$e^{-b}\over
(2bi)(-b^2+a^2),$$ respectively.
$$\int_{-\infty}^\infty {e^{ix}dx\over (x^2+a^2)(x^2+b^2)}
= 2\pi iB - \int_{C_R} f(z)e^{iz} dz.$$
This last integral tends to $0$ by Jordan's lemma because $f(z)$ has
maximum value ${1\over (R^2-a^2)(R^2-b^2)},$ which tends to 0 as $R$
tends to infinity where $R>a$ and $R>b.$
$$2\pi iB = 2\pi i\left({e^{-a}/2a-e^{-b}/2b \over i(a^2-b^2)}\right) =
\pi({e^{-a}/a - e^{-b}/b \over (a^2-b^2)}),$$
proving the integral formula.

\noindent{\bf 5.}

$$\int_{-\infty}^\infty {x^3\sin ax\over x^4+4}dx = \Im
\int_{-\infty}^\infty {x^3e^{iax}\over x^4+4}dx.$$

$$\int_{-\infty}^\infty {x^3e^{iax}\over x^4+4}dx = 2\pi iB - \int_{C_R}
f(x)e^{iax}dx.$$
Where $|x|>R>\sqrt 2,$ the maximum value of $f(x)$ is
$$M_R<{R^3\over R^4-4},$$
which tends to $0$ as $R\to\infty,$ telling us the integral evaluates to
$0.$
The singularities in the upper half of the plane are $c_k = \sqrt
2e^{i(\pi/4+k\pi/2)},$ where $k\in\{0,1\}.$
These are simple poles, so they evaluate to $$p(c_k)/q'(c_k) = {c_k^3
e^{iac_k}\over 4c_k^3} = e^{iac_k}/4 =
e^{ia\sqrt2 e^{i(\pi/4+k\pi/2)}}/4 =
$$$$ e^{ia\sqrt2(\cos(\pi/4+k\pi/2)+i\sin(\pi/4+k\pi/2))}/4
= e^{ia((-1)^k+i)}/4
= e^{a(i(-1)^k-1)}/4
= e^{-a}(\cos(a(-1)^k)+i\sin(a(-1)^k))/4,$$
summing to $2e^{-a}\cos(a)/4.$
Therefore, the integral evaluates to $2\pi ie^{-a}\cos a/2,$
giving imaginary component (and value of the original integral)
$\pi e^{-a}\cos a.$

\noindent{\bf 8.}

$$\int_{-\infty}^\infty {\sin x dx\over x^2+4x+5} =
\Im\int_{-\infty}^\infty {e^{ix} dx\over (x+(2+i))(x+(2-i))}$$

The only singularity in the upper half of the plane is $-2+i,$
with a residue of
$$e^{-2i-1}\over 2i,$$
giving the integral a value
${2\pi ie^{-2i-1}\over 2i} = \pi e^{-1-2i} = {\pi\over e}(\cos(-2)+i\sin(-2)),$
giving an imaginary component $-\pi\sin(2)/e.$

This answer is valid because $f(z)$ tends to zero on $C_R$ as
$R\to\infty,$ where $$f(z) = {1\over z^2+4z+5}.$$

\bye
