\documentclass[12pt]{amsart}
\title[HW7 Solutions]{Problem Sheet 7: Solutions}
\author{}
\usepackage[margin=1.2in]{geometry}
\usepackage{amsmath,amssymb}
\usepackage{graphicx}
\newcommand{\problem}[1]{\noindent {\bf Problem #1.}}
\newcommand{\ds}{\displaystyle}

\newcommand{\lp}{\left(}
\newcommand{\rp}{\right)}
\newcommand{\R}{\mathbb{R}}

\newcommand{\nC}{\mathbb{C}^{\times}}
\newcommand{\C}{\mathbb{C}}
\newcommand{\Z}{\mathbb{Z}}
\renewcommand{\iota}{{\mathbf i}}
\newcommand{\ol}[1]{\overline{#1}}
\renewcommand{\Re}{\operatorname{Re}}
\renewcommand{\Im}{\operatorname{Im}}
\newcommand{\Res}[2]{\underset{#1}{\operatorname{Res}}\left(#2\right)}
\newcommand{\Omit}[1]{}

\begin{document}
\maketitle

\problem{1} Compute the following residues.\\

\noindent (a) $\ds \Res{z=2\pi\iota}{\frac{1}{z(1-e^{-z})}}$.\\
{\em Solution.} Change of variables $z=x+2\pi\iota$ changes it to
(since $e^{-x-2\pi\iota} = e^{-x}$):
\[
\Res{x=0}{\frac{1}{(x+2\pi\iota)(1-e^{-x})}}
= \Res{x=0}{\frac{1}{x} \boxed{\frac{1}{x+2\pi\iota}\cdot\frac{x}{1-e^{-x}}}}
\]
The term in the box is defined at $x=0$. So the pole at $x=0$ is of order
$1$ and residue there is the value of the function in the box, at $x=0$,
namely: $\ds\frac{1}{2\pi\iota}$ (since $\ds\lim_{x\to 0}\frac{x}{1-e^{-x}} = 1$.)\\

\noindent (b) $\ds \Res{z=3\pi}{\cot(z)}$.\\
{\em Solution.} Change of variables $z=x+3\pi\iota$ changes it to
($\cos(x+3\pi) = -\cos(x)$ and $\sin(x+3\pi)=-\sin(x)$, so $\cot(x+3\pi)
=\cot(x)$):
\[
\Res{x=0}{\frac{\cos(x)}{\sin(x)}} = \Res{x=0}{\frac{1}{x} \boxed{\cos(x)\cdot
\frac{x}{\sin(x)}}}
\]
So, the pole is of order $1$, and residue there is the value of the
function in the box at $x=0$, namely $1$, since $\cos(0)=1$
and $\ds\lim_{x\to 0}\frac{x}{\sin(x)}=1$.\\

\noindent (c) $\ds \Res{z=0}{\frac{1}{z^2\sin(z)}}$.\\
{\em Solution.} Multiply and divide the function by $z$ to write:
\[
\Res{z=0}{\frac{1}{z^2\sin(z)}} = \Res{z=0}{\frac{1}{z^3}\boxed{
\frac{z}{\sin(z)}}}
\]
So, the pole at $z=0$ is of order $3$ and residue there is computed
by either $\ds \frac{1}{2} \left[ \frac{d^2}{dz^2}\frac{z}{\sin{z}}\right]_{z=0}$,
or by computing the coefficient of $z^2$ in $\ds\frac{z}{\sin(z)}$.
I prefer the latter, and the computation is:
\[
\frac{z}{\sin(z)} = a_0 + a_1z + a_2z^2+\cdots \ \Rightarrow\ 
z = \lp z-\frac{z^3}{6} + \cdots \rp \lp a_0+a_1z+a_2z^2+\cdots\rp
\]
Comparing coefficients of $z$ gives $1=a_0$; of $z^2$ gives
$0=a_1$; of $z^3$ gives $\ds 0=a_2-\frac{a_0}{6}\ \Rightarrow
a_2 = \frac{1}{6}$. Hence $\ds\Res{z=0}{\frac{1}{z^2\sin(z)}}
=\frac{1}{6}$.\\

\noindent (d) $\ds \Res{z=n\pi}{\frac{1}{z^2\sin(z)}},\ (n\in\Z_{\neq 0})$.\\
{\em Solution.} Change variables $z=x+n\pi$ and use $\sin(x+n\pi)
=(-1)^n$ to rewrite the problem as:
\[
\Res{x=0}{\frac{(-1)^n}{(x+n\pi)^2\sin(x)}} = 
\Res{x=0}{\frac{1}{x} \boxed{
\frac{(-1)^n}{(x+n\pi)^2}\cdot \frac{x}{\sin(x)}
}}
\]
Again, using $\ds\lim_{x\to 0}\frac{x}{\sin(x)}=1$, the value of the function
in the box, at $x=0$ is $\ds\frac{(-1)^n}{n^2\pi^2}$.\\

\noindent (e) $\ds \Res{z=0}{\frac{z-\sin(z)}{z}}$.\\
{\em Solution.} Since $\ds z-\sin(z) = \frac{z^3}{6}-\cdots$, dividing it
by $z$ still gives a function defined at $0$. Hence the residue is $0$.\\

\noindent (f) $\ds \Res{z=0}{\frac{e^z-e^{-z}}{z^4(1-z^2)}}$.\\
{\em Solution.} The answer is the coefficient of $z^3$ in $\ds
\frac{e^z-e^{-z}}{1-z^2}$, which we can compute as follows:
\[
\frac{e^z-e^{-z}}{1-z^2} = (e^z-e^{-z}) \frac{1}{1-z^2}
= 2 \lp z + \frac{z^3}{3!} + \cdots \rp \lp 1 + z^2 + z^4 + \cdots \rp
\]
So, the coefficient of $z^3$ is $\ds 2\lp 1+\frac{1}{6}\rp = \frac{7}{3}$.\\

\noindent (g) $\ds \Res{z=0}{\frac{\ln(1+z)\sin(z)}{z^5}}$.\\
{\em Solution.} Again, the answer is the coefficient of $z^4$ in
$\ln(1+z)\sin(z)$ which we compute as follows:
\[
\ln(1+z)\sin(z) = \lp z - \frac{z^2}{2} + \frac{z^3}{3} - \frac{z^4}{4} + \cdots\rp
\lp z - \frac{z^3}{6} + \frac{z^5}{5!} - \cdots \rp
\]
Coefficient of $\ds z^4 = -\frac{1}{6} + \frac{1}{3} = \frac{1}{6}$.\\

\problem{2} Prove that $\ds\Res{z=\infty}{\frac{2z^3+7}{z(z-1)^3}} = -2$.\\
{\em Solution.} (see Lecture 26, \S 26.2) Use
$\ds \Res{z=\infty}{f(z)} = -\Res{w=0}{w^{-2}f(w)}$ where $w=z^{-1}$.
\[
\Res{z=\infty}{\frac{2z^3+7}{z(z-1)^3}} = 
-\Res{w=0}{\frac{1}{w^2}\cdot \frac{2+7w^3}{w^3}\cdot \frac{w^4}{(1-w)^3}}
= -\Res{w=0}{\frac{1}{w}\boxed{\frac{2+7w^3}{(1-w)^3}}}
\]
which is equal to $(-1)$ times the value of the function in the box at $w=0$,
that is $-2$.\\

\problem{3} Let $C$ be the counterclockwise circle of radius $3$, centered
at $0$. Compute the following integral, using the change of variables
$w=z^{-1}$: $\ds \int_C \frac{z^3e^{\frac{1}{z}}}{1+z^3}\, dz$.\\
{\em Solution.} Change of variables $w=z^{-1}$ changes $C$ into
a clockwise circle (denoted by $-C'$), centered at $0$, of 
radius $1/3$; $dz$ into $-w^{-2}dw$. Hence:
\[
\int_C \frac{z^3e^{\frac{1}{z}}}{1+z^3}\, dz = 
\int_{-C'} \frac{w^{-3}e^w}{1+w^{-3}}\, (-w^{-2}dw)
= \int_{C'} \frac{e^w}{w^3+1} \frac{dw}{w^2}
\]
By Cauchy's integral formula, this integral is given by:
$\ds 2\pi\iota \left[\frac{d}{dw} \frac{e^w}{w^3+1}\right]_{w=0}$,
which is equal to
$\ds 2\pi\iota \left[\frac{(w^3+1)e^w - e^w\cdot 3w^2}{(w^3+1)^2}
\right]_{w=0} = 2\pi\iota$.\\

\problem{4} Let $n<m$ be two positive integers. Let
$P(z) = a_n z^n + a_{n-1}z^{n-1} + \cdots + a_0$
and $Q(z) = b_m z^m + \cdots + b_0$ be two polynomials of degrees $n$
and $m$ respectively. Prove that $\ds\Res{z=\infty}{\frac{P(z)}{Q(z)}}
= \left\{\begin{array}{cl} 0 & \text{if } n<m-1 \\ -\frac{a_n}{b_m}
& \text{if } n=m-1 \end{array}\right.$.\\
{\em Solution.} I am again going to use 
$\ds \Res{z=\infty}{f(z)} = -\Res{w=0}{w^{-2}f(w)}$ where $w=z^{-1}$.
\[
\Res{z=\infty}{\frac{P(z)}{Q(z)}} = -\Res{w=0}
{w^{-2}\frac{P(w^{-1})}{Q(w^{-1})}}
\]
\[
=-\Res{w=0}{\frac{w^m}{w^{n+2}} \boxed{\frac{a_n+a_{n-1}w+\cdots+a_0w^n}
{b_m+b_{m-1}w+\cdots+b_0w^m}}}
\]
Now $m\geq n+1$ is given. If $m\geq n+2$, the function written
above is holomorphic at $w=0$, so its residue at $w=0$ is $0$.
If $m=n+1$, then the residue is simply $(-1)$ times the value of the fraction
in the box at $w=0$ equal to $\ds -\frac{a_n}{b_m}$.\\

\problem{5} Let $\Omega\subset\C$ be an open set and 
$f:\Omega\to\C$ be a holomorphic function. Assume
that $z_0\in\Omega$ is a zero of $f$ of order $N\in\Z_{\geq 1}$.
Prove that $\ds \Res{z=z_0}{\frac{f'(z)}{f(z)}} = N$.\\
{\em Solution.} $f$ vanishes at $z_0$ to order $N$ means $f(z)=(z-z_0)^Ng(z)$,
and $g$ does not vanish at all in a small enough disc around $z_0$.
This allows us to compute:
\[
\frac{f'(z)}{f(z)} = \frac{N(z-z_0)^{N-1}g(z) + (z-z_0)^Ng'(z)}{
(z-z_0)^Ng(z)} = \frac{N}{z-z_0} + \frac{g'(z)}{g(z)}.
\]
Now $\ds\frac{g'(z)}{g(z)}$ is holomorphic near $z_0$, hence
has residue $0$ at $z_0$. So,
\[
\Res{z=z_0}{\frac{f'(z)}{f(z)}}=
\Res{z=z_0}{\frac{N}{z-z_0}} = N.
\]
\ \\

\problem{6} Let $\Omega\subset\C$ be an open set, $\alpha\in\Omega$,
and $f:\Omega\setminus\{\alpha\}\to\C$ be a holomorphic function,
such that $\alpha$ is a pole of $f$, of order $M\in\Z_{\geq 1}$.
Prove that $\ds\Res{z=\alpha}{\frac{f'(z)}{f(z)}} = -M$.\\
{\em Solution.} Same as Problem 5, just change $N$ to $-M$.\\

\problem{7} Compute the following integrals:\\

\noindent (a) $\ds \int_0^{2\pi} \frac{d\theta}{5+4\sin(\theta)}$.\\
{\em Solution.} Write $z=e^{\iota\theta}$ so that
$\ds \sin(\theta) = \frac{z-z^{-1}}{2\iota}$ and $\ds
d\theta = \frac{dz}{\iota z}$. Let $C$ be the counterclockwise
circle around $0$ of radius $1$. Then the integral we have to 
compute is:
\[
\int_C \frac{1}{5+4\lp\frac{z-z^{-1}}{2\iota}\rp}\, \frac{dz}{\iota z}
= \int_C \frac{dz}{2z^2+5\iota z-2}\ .
\]
Now the quadratic equation $2z^2+5\iota z-2 = 0$ has two solutions:
$\ds \alpha_1 = -\frac{\iota}{2}$ and $\ds\alpha_2 = -2\iota$.
$\alpha_1$ is within $C$ and $\alpha_2$ is outside. So, we can compute
the integral using Cauchy's formula:
\[
\int_C \frac{dz}{2z^2+5\iota z-2} = \int_C \frac{dz}{2(z+2\iota)
\lp z+\frac{\iota}{2}\rp} = 2\pi\iota \frac{1}{2\lp 2\iota - \frac{\iota}{2}\rp}
\]
which gives the answer: $\ds\frac{2\pi}{3}$.\\

\noindent (b) $\ds \int_0^{2\pi} \frac{d\theta}{(a+\cos(\theta))^2},\ (a\in\R_{>1})$.\\
{\em Solution.} Again, change of variables $z=e^{\iota\theta}$ turns the
integral in question to:
\[
\int_C \frac{1}{\lp a + \frac{z+z^{-1}}{2}\rp^2} \frac{dz}{\iota z}
= \frac{4}{\iota} \int_C \frac{z}{(z^2+2az+1)^2}\, dz.
\]
$z^2+2az+1=0$ has two solutions:
$\ds \alpha_1 = -a+\sqrt{a^2-1}$ and $\ds \alpha_2 = -a-\sqrt{a^2-1}$.
As $a>1$, $|\alpha_2| = a+\sqrt{a^2-1}>1$, hence $\alpha_2$ is outside
of $C$. As $\alpha_1\alpha_2=1$, $\alpha_1$ must be inside $C$.
\[
\frac{4}{\iota} \int_C \frac{z}{(z^2+2az+1)^2}\, dz
= \frac{4}{\iota} \int_C \frac{z}{(z-\alpha_1)^2(z-\alpha_2)^2}\, dz
= \frac{4}{\iota} 2\pi\iota \left[\frac{d}{dz} \lp
\frac{z}{(z-\alpha_2)^2}\rp \right]_{z=\alpha_1}
\]
\[
= 8\pi \left[ \frac{1}{(z-\alpha_2)^2} - \frac{2z}{(z-\alpha_2)^3}\right]_{z=\alpha_1}
= 8\pi \frac{-(\alpha_1+\alpha_2)}{(\alpha_1-\alpha_2)^3}
\]
\[
= 8\pi \frac{2a}{(2\sqrt{a^2-1})^3} = \frac{2\pi a}{(a^2-1)^{\frac{3}{2}}}.
\]
\ \\

\noindent (c) $\ds \int_0^{2\pi} \frac{d\theta}{1+\sin^2(\theta)}$.\\
{\em Solution.} $z=e^{\iota\theta}$ changes the problem to:
\[
\int_C \frac{1}{1+\lp\frac{z-z^{-1}}{2\iota}\rp^2}\ \frac{dz}{\iota z}
= -\frac{4}{\iota} \int_C \frac{z}{z^4-6z^2+1}\, dz.
\]
Now, $z^4-6z^2+1=0$ is a quadratic equation in $z^2$, which gives
us two solutions $z^2=r_1,r_2$, where:
\[
r_1 = 3+2\sqrt{2} \qquad\text{and}\qquad r_2 = 3-2\sqrt{2}.
\]
$r_1$ is clearly outside of $C$; and because of $r_1r_2=1$, we must
have $r_1$ inside $C$. Thus, $z^4-6z^2+1 = (z^2-r_1)(z^2-r_2)
= (z^2-r_1)(z-\sqrt{r_2})(z+\sqrt{r_2})$. Our integral can now
again be computed using Cauchy's formula:
\[
-\frac{4}{\iota} \int_C \frac{z}{z^4-6z^2+1}\, dz
=
-\frac{4}{\iota} \int_C \frac{z}{(z^2-r_1)(z-\sqrt{r_2})(z+\sqrt{r_2})}\, dz
\]
\[
=-\frac{4}{\iota} 2\pi\iota \lp
\frac{\sqrt{r_2}}{(r_2-r_1)2\sqrt{r_1}} + \frac{-\sqrt{r_2}}{(r_2-r_1)
(-2\sqrt{r_2})}
\rp
\]
\[ 
= \frac{8\pi}{r_1-r_2} = \frac{8\pi}{4\sqrt{2}} = \sqrt{2}\pi.
\]
\ \\

\noindent (d) $\ds \int_0^{2\pi} \frac{\cos(2\theta)\ d\theta}
{1-2p\cos(\theta)+p^2},\ (0<p<1)$.\\
{\em Solution.} Perform the change of variables $z=e^{\iota\theta}$
again to convert the integral in question to:
\[
\int_C \frac{\frac{z+z^{-1}}{2}}{1-2p\lp\frac{z+z^{-1}}{2}\rp + p^2}\,
\frac{dz}{\iota z}
= \frac{1}{2\iota} \int_C \frac{z^4+1}{z^2(z-pz^2-p+p^2z)}\, dz.
\]
Using the factorization: $z-pz^2-p+p^2z = (z-p)(1-pz)$, we see
that the integrand has $2$ singularities inside $C$: at $z=0$
and $z=p$ (since $0<p<1$). Let $C_1$ be a small (counterclockwise)
circle around $p$ and $C_2$ around $0$.
\[
\frac{1}{2\iota} \int_C \frac{z^4+1}{z^2(z-p)(1-pz)}\, dz
=\frac{1}{2\iota} \int_{C_1} \frac{z^4+1}{z^2(z-p)(1-pz)}\, dz
+\frac{1}{2\iota} \int_{C_2} \frac{z^4+1}{z^2(z-p)(1-pz)}\, dz
\]
Now,
\[
\frac{1}{2\iota} \int_{C_1} \frac{z^4+1}{z^2(z-p)(1-pz)}\, dz
=
\frac{2\pi\iota}{2\iota}\cdot 
\frac{p^4+1}{p^2(1-p^2)} = \pi \frac{p^4+1}{p^2(1-p^2)}.
\]
\[
\frac{1}{2\iota} \int_{C_2} \frac{z^4+1}{z^2(z-p)(1-pz)}\, dz
= \frac{2\pi\iota}{2\iota}\cdot
\left[
\frac{d}{dz}\lp \frac{z^4+1}{(z-p)(1-pz)}\rp
\right]_{z=0}
\]
\[
= \pi \left[
\frac{4z^3}{(z-p)(1-pz)} - \frac{z^4+1}{(z-p)^2(1-pz)}
+ \frac{p(z^4+1)}{(z-p)(1-pz)^2}
\right]_{z=0}
\]
\[
= -\pi \frac{1+p^2}{p^2}.
\]
Combining, we get:
\[
\frac{1}{2\iota} \int_C \frac{z^4+1}{z^2(z-p)(1-pz)}\, dz
= \pi\lp \frac{1+p^4}{p^2(1-p^2)} - \frac{1+p^2}{p^2}\rp
\]
\[
= \pi \frac{1+p^4 - (1-p^2)(1+p^2)}{p^2(1-p^2)} = \pi
\frac{1+p^4-(1-p^4)}{p^2(1-p^2)} = \frac{2\pi p^2}{1-p^2}.
\]
\ \\

\problem{8} For $n\in\Z_{\geq 0}$, prove that
$\ds \int_0^{\pi} \sin^{2n}(\theta)\, d\theta = \frac{(2n)!}{2^{2n} (n!)^2}\pi$.\\
{\em Solution.} Let us compute $\ds \int_0^{2\pi} \sin^{2n}(\theta)\, d\theta$
first (we will divide it by $2$ in the end). Again we do the
change of variables $z=e^{\iota\theta}$. Our function is going to
become:
\[
\sin^{2n}(\theta) = \lp \frac{z-z^{-1}}{2\iota}\rp^{2n}
= \frac{(-1)^n}{2^{2n}} (z-z^{-1})^{2n}
\]
And the integral we are trying to compute is:
\[
\int_0^{2\pi}\sin^{2n}(\theta)\, d\theta
= \int_C \frac{(-1)^n}{2^{2n}} (z-z^{-1})^{2n}\, \frac{dz}{\iota z}
= \frac{(-1)^n}{2^{2n}\iota} \int_C (z-z^{-1})^{2n} \frac{dz}{z}\ .
\]
We can expand $(z-z^{-1})^{2n}$ using the binomial formula:
\[
(z-z^{-1})^{2n} = \sum_{k=0}^{2n} (-1)^k \lp\begin{array}{c}
2n \\ k\end{array}\rp z^{2n-k} (z^{-1})^k
= \sum_{k=0}^{2n} (-1)^k \lp\begin{array}{c}
2n \\ k\end{array}\rp z^{2n-2k}
\]
Therefore our integral becomes:
\[
\frac{(-1)^n}{2^{2n}\iota} \int_C (z-z^{-1})^{2n} \frac{dz}{z}
=
\frac{(-1)^n}{2^{2n}\iota}\cdot \lp\sum_{k=0}^{2n}
(-1)^k \lp\begin{array}{c} 2n \\ k\end{array}\rp 
\int_C z^{2n-2k-1}\, dz \rp
\]
Using the fact that $\int_C z^\ell\ dz$ is $2\pi\iota$ for $\ell=-1$
and $0$ otherwise, we see that the only term in the sum
that gives a non--zero integral is when $k=n$. So,
our integral simplifies to:
\[
\int_0^{2\pi} \sin^{2n}(\theta)\, d\theta = 
\frac{(-1)^n}{2^{2n}\iota} 2\pi\iota (-1)^n
\lp\begin{array}{c} 2n \\ n\end{array}\rp
= \frac{2\pi}{2^{2n}} \frac{(2n)!}{(n!)^2}.
\]
Hence, $\ds\int_0^\pi \sin^{2n}(\theta)\, d\theta
= \frac{\pi}{2^{2n}} \frac{(2n)!}{(n!)^2}$.\\

\problem{9} Compute the following integrals.\\

\noindent (a) $\ds\int_{-\infty}^{\infty} \frac{dx}{x^4+1}$.\\
{\em Solution.} We are going to integrate $\ds
\frac{1}{z^4+1}$ along $C_R$. See the figure below.
\begin{figure}[h]
\includegraphics[width=2in]{HW7P9a.pdf}
\caption{Contour $C_R$ consisting of two smooth
pieces.}
\end{figure}

\noindent {\em Step 1.} Let us estimate the function 
$\ds\frac{1}{z^4+1}$ as $z$ lies on $\gamma_R$. By triangle inequality
$|z^4+1|\geq |z^4|-1 = R^4-1$, so by our {\em important} inequality:
\[
\left|\int_{\gamma_R}\frac{dz}{z^4+1}\right|
\leq \frac{1}{R^4-1}\cdot \pi R \to 0 \text{ as } R\to \infty.
\]

\noindent {\em Step 2.} $\ds\int_{C_R}\frac{1}{z^4+1}\, dz$.
(This computation is very similar to the one given in Lecture 27,
\S 27.5). The solutions of $z^4=-1$ are the following (see Figure
above).
\[
\alpha_1=e^{\frac{\pi}{4}\iota},\ \ \alpha_2=e^{\frac{3\pi}{4}\iota}
\]
\[
\beta_2=e^{\frac{5\pi}{4}\iota},\ \ \beta_1=e^{\frac{7\pi}{4}\iota}
\]
So, $\ds\int_{C_R}\frac{1}{z^4+1}\, dz = 2\pi\iota\lp\Res{z=\alpha_1}
{\frac{1}{z^4+1}} + \Res{z=\alpha_2}{\frac{1}{z^4+1}}\rp$.
\[
\Res{z=\alpha_1}{\frac{1}{z^4+1}} = \lim_{z\to\alpha_1}
\frac{z-\alpha_1}{z^4+1} = \lim_{z\to\alpha_1} \frac{1}{4z^3}
= \frac{1}{4\alpha_1^3}
\]
\[
= \frac{\alpha_1}{4\alpha_1^4} = - \frac{\alpha_1}{4}
\]
Now, $\alpha_1+\alpha_2 = e^{\iota\pi/4} + e^{\iota 3\pi/4}
= e^{\iota\pi/4} - e^{-\iota\pi/4} = 2\iota\sin(\pi/4)
=\sqrt{2}\iota$.\\

Thus, the sum of the residues is:
\[
\int_{C_R}\frac{1}{z^4+1}\, dz =
-2\pi\iota \frac{\alpha_1+\alpha_2}{4}
= -2\pi\iota \frac{\sqrt{2}\iota}{4} = \frac{\pi}{\sqrt{2}}.
\]

\noindent {\em Final step.} The integral in question
$\ds\int_{-\infty}^{\infty} \frac{dx}{x^4+1}$
is the limit
\[
\lim_{R\to\infty} \lp\int_{C_R} \frac{1}{z^4+1}\, dz - \int_{\gamma_R}
\frac{1}{z^4+1}\, dz\rp.
\]
The latter being zero, we get that the answer is
$\ds \frac{\pi}{\sqrt{2}}$.\\

\noindent (b) $\ds\int_{-\infty}^{\infty} \frac{x^2}{(x^2+9)(x^2+4)^2}\ dx$.\\
{\em Solution.} We again are going to compute the integral over
$C_R$ (contour from the previous problem). The singularities of
the integrand are $\pm 2\iota$ and $\pm 3\iota$, of which 
$2\iota, 3\iota$ are within $C_R$ and the other two are outside.\\

{\em Step 1.} Figure out the bound of the integrand as $z$ lies on
$\gamma_R$:
\[
\left|\int_{\gamma_R}\frac{z^2}{(z^2+9)(z^2+4)^2}\, dz\right| \leq \frac{R^2}
{(R^2-9)(R^2-4)^2}\cdot \pi R \to 0 \text{ as } R\to \infty.
\]

{\em Step 2.} Compute the integral over $C_R$:
\[
\int_{C_R}\frac{z^2}{(z^2+9)(z^2+4)^2}\, dz
= \int_{C_R} \frac{z^2}{(z+3\iota)(z+2\iota)^2} \frac{dz}{(z-3\iota)(z-2\iota)^2}
\]
\[
2\pi\iota\lp
\left[\frac{z^2}{(z+3\iota)(z^2+4)^2} \right]_{z=3\iota}
+
\left[\frac{d}{dz}\lp\frac{z^2}{(z^2+9)(z+2\iota)^2}\rp \right]_{z=2\iota}
\rp
\]
\[
=2\pi\iota\lp
\frac{(3\iota)^2}{(-9+4)^2 (6\iota)}
+ \left[
\frac{2z}{(z^2+9)(z+2\iota)^2} - \frac{z^2.2z}{(z^2+9)^2
(z+2\iota)^2} - \frac{2z^2}{(z^2+9)(z+2\iota)^3}
\right]_{z=2\iota}
\rp
\]
\[
= 2\pi\iota\lp
\frac{-9}{25(6\iota)}+\frac{4\iota}{5(4\iota)^2}
-\frac{(2\iota)^2 4\iota}{(25)(4\iota)^2}
-\frac{2(2\iota)^2}{5(4\iota)^3}
\rp
\]
\[
= 2\pi\lp
\frac{-3}{50} + \frac{1}{20} + \frac{1}{25} - \frac{1}{40}
\rp = \frac{\pi}{100}.
\]

{\em Final step.} Put everything together to get:
\[
\int_{-\infty}^{\infty} \frac{x^2}{(x^2+9)(x^2+4)^2}\ dx
= \frac{\pi}{100}.
\]
\ \\

\problem{10} Let $a,b\in\R_{>0}$ be two positive real numbers.
Prove that: 
\[ 
\int_0^{\infty} \frac{x^4}{(a+bx^2)^4}\, dx
= \frac{\pi}{32 a^{\frac{3}{2}} b^{\frac{5}{2}}}.
\]

\noindent {\em Solution.} Let us write $t=a/b$ so that the
integrand has singularities at $\pm t\iota$. Again, we are going
to integrate $\ds\frac{z^4}{(a+bz^2)^4}$ over the contour
$C_R$ from the figure above (we will have to divide the answer
by $2$ at the end, since the problem is only asking for
$\ds\int_0^{\infty}$.)

\noindent {\em Step 1.} This is pretty much the same as
the ones given before. We estimate the integral:
\[
\left|
\int_{\gamma_R} \frac{z^4}{b^4(z^2+t)^4}\, dz
\right|\leq \frac{R^4}{b^4(R^2-t)^4}\cdot \pi R \to 0 \text{ as }
R\to\infty.
\]

\noindent {\em Step 2.} This is going to be a lengthy computation.
\[
\frac{1}{b^4}\int_{C_R} \frac{z^4}{(z+t\iota)^4(z-t\iota)^4}\, dz
= \frac{2\pi\iota}{b^4} \cdot X\ ,
\]
where $X$ can be computed either as $\ds
\frac{1}{6} \left[ \frac{d^3}{dz^3}\lp \frac{z^4}{(z+t\iota)^4}\rp\right]_{z=t\iota}$,
or as the coefficient of $(z-t\iota)^3$ in the Taylor
series expansion of $\ds\frac{z^4}{(z+t\iota)^4}$ near
$z=t\iota$. I like the second way (after computing first derivative
it becomes clear that the calculation is only going to get messy).\\

So, a little change of variable $z=w+t\iota$ turns our problem to:
\[
X = \text{ Coefficient of } w^3 \text{ in the Taylor series of }
\lp\frac{w+t\iota}{w+2t\iota}\rp^4 \text{ near } w=0.
\]
\[
\lp\frac{w+t\iota}{w+2t\iota}\rp^4 = (w+t\iota)^4\cdot
\frac{1}{(2t\iota)^4} \cdot \frac{1}{\lp 1+\frac{w}{2t\iota}\rp^4}
\]
\[
= \frac{1}{(2t\iota)^4} (w^4+4w^3(t\iota)+6w^2(t\iota)^2+4w(t\iota)^3
+(t\iota)^4) \lp 1 - 4\frac{w}{2t\iota} + 10 \frac{w^2}{(2t\iota)^2}
-20 \frac{w^3}{(2t\iota)^3} + \cdots \rp
\]
(here I opened the first term using binomial formula, and the second
using $\ds\frac{1}{(1-z)^{\ell+1}} = \sum_{n=0}^{\infty}
\lp\begin{array}{c} n+\ell\\ \ell \end{array}\rp z^n$.)\\

So, the coefficient of $w^3$ in this product is:
\[
X = \frac{1}{16t^4} (t\iota)\lp
4 - 12  + 10  -\frac{5}{2}\rp = \frac{\iota}{16t^3}\lp -\frac{1}{2}\rp.
\]
Hence, we get:
\[
\frac{1}{b^4}\int_{C_R} \frac{z^4}{(z+t\iota)^4(z-t\iota)^4}\, dz
= \frac{2\pi\iota}{b^4} \frac{\iota}{16t^3} \lp \frac{-1}{2}\rp
= \frac{\pi}{16t^3 b^4} = \frac{\pi}{16 a^{\frac{3}{2}} b^{4-\frac{3}{2}}}.
\]
(since $t=ab^{-1}$.)\\

{\em Final step.} Gathering the results from the previous two steps,
and dividing by $2$, we get:
\[
\int_0^{\infty} \frac{x^4}{(a+bx^2)^4}\, dx
= \frac{\pi}{32 a^{\frac{3}{2}} b^{\frac{5}{2}}}.
\]
\ \\

\problem{11} {\bf (Bonus)} Let $n\in\Z_{\geq 0}$. Prove that
\[
\int_0^{2\pi} e^{\cos(\theta)} \cos(n\theta-\sin(\theta))\, d\theta
= \frac{2\pi}{n!} \qquad \text{and}\qquad
\int_0^{2\pi} e^{\cos(\theta)} \sin(n\theta-\sin(\theta))\, d\theta
=0.
\]
{\em Solution.} We are going to combine the two integrals as 
real and imaginary parts of one: 
\[
\cos(n\theta-\sin(\theta)) + \iota \sin(n\theta-\sin(\theta))
= e^{\iota (n\theta - \sin(\theta))} = e^{\iota n\theta} e^{-\iota \sin(\theta)}.
\]
Meaning, let $\ds A = \int_0^{2\pi} e^{\cos(\theta)} \cos(n\theta-\sin(\theta))\, d\theta$
and $\ds B= \int_0^{2\pi} e^{\cos(\theta)} \sin(n\theta-\sin(\theta))\, d\theta$,
so that:
\[
A+\iota B = \int_0^{2\pi} e^{\cos(\theta)} e^{\iota(n\theta-\sin(\theta))}\, d\theta
= \int_0^{2\pi} e^{\cos(\theta)-\iota\sin(\theta)} e^{-\iota n\theta}\, d\theta.
\]

Now do the substitution: $z=e^{\iota\theta}$. Again, let
$C$ be the counterclockwise oriented circle of radius $1$,
centered at $0$. Our integral turns into:
\[
\int_C e^{z^{-1}} z^n \, \frac{dz}{\iota z} =
\frac{1}{\iota}\int_C e^{z^{-1}} z^{n-1}\, dz
= 2\pi \Res{z=0}{z^{n-1}e^{z^{-1}}}.
\]
Now, we have to use the series expansion of $e^{z^{-1}}$. We are
looking for the coefficient of $z^{-1}$ in the product
$z^{n-1}e^{z^{-1}}$:
\[
z^{n-1}e^{z^{-1}} = \sum_{k=0}^{\infty} \frac{z^{n-1-k}}{k!}
\]
So, the coefficient of $z^{-1}$ is $\ds\frac{1}{n!}$. Hence,
\[
A+B\iota = 2\pi \Res{z=0}{z^{n-1}e^{z^{-1}}}
=\frac{2\pi}{n!} \ \Rightarrow\ A=\frac{2\pi}{n!} \text{ and }
B=0.
\]
\ \\

\problem{12}
Let $\Omega\subset\C$ be an open set, and let $f :\Omega\dashrightarrow\C$
be a meromorphic function. (Recall: this means that there is a subset
$A\subset \Omega$, such that $f$ is defined and holomorphic on
$\Omega\setminus A$; and every point of $A$ is a pole of $f$).\\
Let $\gamma:[a,b]\to\Omega$ be a counterclockwise oriented contour,
which does not pass through any of the poles of $f$.
\begin{itemize}
\item Let $z_1,z_2,\ldots,z_k \in \text{Interior}(\gamma)$
be zeroes of $f(z)$ which are inside $\gamma$, of orders
$N_1,N_2,\ldots, N_k$ respectively.\\
\item Let $\alpha_1,\alpha_2,\ldots,\alpha_{\ell}\in\text{Interior}(\gamma)$
be poles of $f$ which are inside $\gamma$, of orders
$M_1,M_2,\ldots,M_{\ell}$ respectively.
\end{itemize}
Prove that $\ds \frac{1}{2\pi\iota}\int_{\gamma}
\frac{f'(z)}{f(z)}\, dz = \sum_{a=1}^k N_a - \sum_{b=1}^\ell M_b$.\\
{\em Solution.} This is nothing but Problems 5 and 6, combined with
Cauchy's residue theorem.
\end{document}
