Applications of Residues: Evaluaton of Improper Integrals 3 (Indented Paths)

Suppose that a function $f(z)$ has a simple pole at a point $z=x_0$ on the real axis, with a Laurent series representation in a punctured disk $0<|z-x_0|<R_2$ and with residue $B_0$. Let $C_\rho$ denote the upper half of a circle $|z-x_0|=\rho$, where $\rho<R_2$ and with the clockwise direction.

$f(z)$ can be written as
$$f(z)=g(z)+\frac{B_0}{z-x_0}\ (0<|z-x_0|<R_2),$$
where $g(z)=\sum_{n=0}^\infty a_n(z-x_0)^n$. So, we have
$$\int_{C_\rho}f(z)dz=\int_{C_\rho}g(z)dz+B_0\int_{C_\rho}\frac{dz}{z-x_0}.$$
Let $\rho<\rho_0<R_2$. Then $g(z)$ is bounded on $|z-x_0|\leq\rho_0$ i.e. there exists $M>0$ such that $|g(z)|\leq M$ whenever $|z-x_0|\leq\rho_0$. Thus, we get the estimate
$$\left|\int_{C_\rho}g(z)dz\right|\leq M\pi\rho.$$
Consequently, we have
$$\lim_{\rho\to 0}\int_{C_\rho} g(z)dz=0.$$
The semi-circle $-C_\rho$ has parametric representation
$$z=x_0+\rho e^{i\theta}\ (0\leq\theta\leq\pi).$$
Using this parametric representation, we calculate
\begin{align*}
\int_{C_\rho}\frac{dz}{z-x_0}&=-\int_{-C_{\rho}}\frac{dz}{z-x_0}\\
&=-\int_0^{\pi}\frac{1}{\rho e^{i\theta}}\rho i e^{i\theta}d\theta\\
&=-\pi i.
\end{align*}
Therefore, we obtain

\label{eq:indentpath}
\lim_{\rho\to 0}\int_{C_\rho}f(z)dz=-B_0\pi i.

Example. [Singularity on Contour of Integration] Evaluate the improper Integral
$$I=\int_0^\infty\frac{\sin x}{x}dx.$$

Solution. The function $f(z)=\frac{e^{iz}}{z}$ has a simple pole at $z=0$.

Since $f(z)$ is analytic within and on the simple closed contour, we have
$$\int_{C_R} \frac{e^{iz}}{z}dz+\int_{-R}^{-\rho}\frac{e^{ix}}{x}dx+\int_{C_\rho}\frac{e^{iz}}{z}dz+\int_{\rho}^R\frac{e^{ix}}{x}dx=0.$$
Note that $\frac{1}{z}$ is analytic at all points $z$ in the upper half plane that are exterior to the circle $C_\rho$ and that for any $z$ on $C_R$, $\left|\frac{1}{z}\right|=\frac{1}{R}$
and $\lim_{R\to\infty}\frac{1}{R}=0$. Thus, by Jordan’s Lemma
$$\lim_{R\to\infty}\int_{C_R}f(z)dz=\lim_{R\to\infty}\int_{C_R}\frac{e^{iz}}{z}dz=0.$$
As $R\to\infty$ and $\rho\to 0$, we obtain
$$\int_{-\infty}^\infty\frac{e^{ix}}{x}dx=-\lim_{\rho\to 0}\int_{C_\rho}\frac{e^{iz}}{z}dz=\pi i.$$
Therefore,
$$\int_0^\infty\frac{\sin x}{x}dx=\frac{\pi}{2}.$$

Fresnel Integrals

In this lecture, we derive Fresnel integrals
$$\int_0^\infty\cos(x^2)dx=\int_0^\infty\sin(x^2)dx=\frac{1}{2}\sqrt{\frac{\pi}{2}},$$
which appear in optics and diffraction theory.

Let us consider a contour shown in the following figure.

As seen in the figure, $C_R$ is a part of the circle $z=Re^{i\theta}$, where $0\leq\theta\leq\frac{\pi}{4}$. Let $f(z)=e^{iz^2}$. Then $f(z)$ is analytic on and within the positively oriented simple closed contour $C$ shown in the figure. So, we have $\int_Cf(z)dz=0$ which amounts to the following expression:
$$\int_0^Re^{ix^2}dx+\int_{C_R}e^{iz^2}dz-\int_0^Re^{-r^2}\left(\frac{1}{\sqrt{2}}+i\frac{1}{\sqrt{2}}\right)dr=0.$$
Separating this expression into the real and the imaginary parts, we obtain
\begin{align}
\label{eq:cos}
\int_0^R\cos(x^2)dx&=\frac{1}{\sqrt{2}}\int_0^Re^{-r^2}dr-\mathrm{Re}\int_{C_R}e^{iz^2}dz,\\
\label{eq:sin}
\int_0^R\sin(x^2)dx&=\frac{1}{\sqrt{2}}\int_0^Re^{-r^2}dr-\mathrm{Im}\int_{C_R}e^{iz^2}dz.
\end{align}
\begin{align*}
\left|\int_{C_R}e^{iz^2}dz\right|&=\left|\int_0^{\frac{\pi}{4}}e^{iR^2e^{2i\theta}}Rie^{i\theta}d\theta\right|\\
&\leq R\int_0^{\frac{\pi}{4}}|e^{iR^2e^{2i\theta}}|d\theta\\
&=R\int_0^{\frac{\pi}{4}}e^{-R^2\sin 2\theta}d\theta\\
&=\frac{R}{2}\int_0^{\frac{\pi}{2}}e^{-R^2\sin\phi}d\phi\ (\mbox{by subsitution}\ \phi=2\theta)\\
&=\frac{R}{4}\int_0^\pi e^{-R^2\sin\phi}d\phi\\
&<\frac{R}{4}\frac{\pi}{R^2}\\
&=\frac{\pi}{4R}\to 0
\end{align*}
as $R\to\infty$. The inequality in the second line to the last was obtained by Jordan’s Inequality. Hence, as $R\to\infty$ \eqref{eq:cos} and \eqref{eq:sin} become
\begin{align*}
\int_0^\infty\cos(x^2)dx&=\int_0^\infty\sin(x^2)dx\\
&=\frac{1}{\sqrt{2}}\int_0^\infty e^{-r^2}dr\\
&=\frac{1}{2}\sqrt{\frac{\pi}{2}}.
\end{align*}

Jordan’s Lemma

Suppose that

1. a function $f(z)$ is analytic at all points $z$ in the upper half plane $y\geq 0$ that are exterior to a circle $|z|=R_0$.
2. For any $z$ on $C_R: |z|=R>R_0$, there exists a positive real number $M_R>0$ such that $|f(z)|\leq M_R$ and $\lim_{R\to\infty}M_R=0$.

Then for any positive real number $a$,
$$\lim_{R\to\infty}\int_{C_R}f(z)e^{iaz}dz=0.$$

Proof. We first show Jordan’s Inequality
$$\label{eq:jordan}\int_0^\pi e^{-R\sin\theta}d\theta<\frac{\pi}{R}\ (R>0).$$

The graphs of y=sin(theta) (in red) and y=(2/pi)theta (in blue)

As shown in the figure, $\frac{2}{\pi}\theta\leq\sin\theta$ for $0\leq\theta\leq\frac{\pi}{2}$. If $R>0$, then $$e^{-R\sin\theta}\leq e^{-2R\theta/\pi},\ 0\leq\theta\leq\frac{\pi}{2}.$$So, we have
\begin{align*}
\int_0^{\frac{\pi}{2}}e^{-R\sin\theta}d\theta&\leq\int_0^{\frac{\pi}{2}}e^{-2R\theta/\pi}d\theta\\
&=\frac{\pi}{2R}(1-e^{-R})\\
&<\frac{\pi}{2R}.
\end{align*}Since the graph of $y=\sin\theta$ is symmetric about $\theta=\frac{\pi}{2}$ on the interval $0\leq\theta\leq\pi$,
$$\int_0^\pi e^{-R\sin\theta}d\theta=2\int_0^{\frac{\pi}{2}}e^{-R\sin\theta}d\theta<\frac{\pi}{R}.$$

Let $C_R$ denote the positively oriented circle $z=Re^{i\theta}$ where $0\leq\theta\leq\pi$. Then
$$\int_{C_R}f(z)e^{iaz}dz=\int_0^\pi f(Re^{i\theta})\exp(iaRe^{i\theta})iRe^{i\theta}d\theta$$
and so
\begin{align*}
\left|\int_{C_R}f(z)e^{iaz}dz\right|&\leq M_RR\int_0^\pi e^{-aR\sin\theta}d\theta\\
&<\frac{M_R\pi}{a}\ (\mbox{by Jordan Inequality \eqref{eq:jordan}})\\
&\to 0
\end{align*}
as $R\to\infty$ since by assumption $\lim_{R\to\infty}M_R=0$.

Harmonic Functions

Throughout this course, a connected open subset of $\mathbb{C}$ is called a domain. Suppose that a function $f(z)=u(x,y)+iv(x,y)$ is analytic in a domain $\mathcal{D}$. Then $f(z)$ satisfies the Cauchy-Riemann equations i.e.

\label{eq:c-r}
u_x=v_y,\ u_y=-v_x.

Differentiating the Cauchy-Riemann equations \eqref{eq:c-r} with respect to $x$, we obtain

\label{eq:c-r2}
u_{xx}=v_{yx},\ u_{yx}=-v_{xx}.

Differentiating the Cauchy-Riemann equations \eqref{eq:c-r} with respect to $y$, we obtain

\label{eq:c-r3}
u_{xy}=v_{yy},\ u_{yy}=-v_{xy}.

By the continuity of the partial derivatives of $u(x,y)$ and $v(x,y)$, we have

\label{eq:cont}
u_{xy}=u_{yx},\ v_{xy}=v_{yx}.

Applying \eqref{eq:cont} to \eqref{eq:c-r2} and \eqref{eq:c-r3}, we obtain the Laplace equations:
$$u_{xx}+u_{yy}=0,\ v_{xx}+v_{yy}=0.$$
That is to say, $u(x,y)$ and $v(x,y)$ are harmonic maps in $\mathcal{D}$.

Example. The function $f(z)=e^{-y}\sin x-ie^{-y}\cos x$ is entire (i.e analytic on the complex plane $\mathbb{C}$), so both $e^{-y}\sin x$ and $-e^{-y}\cos x$ are harmonic. (You can of course check it for yourself!)

If two functions $u(x,y)$, $v(x,y)$ are harmonic in a domain $\mathcal{D}$ and their first-order partial derivatives satisfy the Cauchy-Riemann equations \eqref{eq:c-r} throughout $\mathcal{D}$, $v(x,y)$ is said to be a harmonic conjugate of $u(x,y)$.

Theorem. A function $f(z)=u(x,y)+iv(x,y)$ is analytic in a domain $\mathcal{D}$ if and only if $v(x,y)$ is a harmonic conjugate of $u(x,y)$.

Remark. If $v(x,y)$ is a harmonic conjugate of $u(x,y)$ in some domain, it is not in general true that $u$ is a harmonic conjugate of $v$ there.

Example. Let $u(x,y)=x^2-y^2$ and $v(x,y)=2xy$. Since $f(z)=z^2=(x^2-y^2)+i2xy$ is entire, $v(x,y)$ is a harmonic conjugate of $u(x,y)$. However, $u(x,y)$ cannot be a harmonic conjugate of $v(x,y)$ since $2xy+i(x^2-y^2)$ is not analytic anywhere.

Example. [Finding a harmonic conjugate of a harmonic function] Let $u(x,y)=y^3-3x^2y$ and $v(x,y)$ be a harmonic conjugate of $u(x,y)$. Then it follows from the Cauchy-Riemann equations \eqref{eq:c-r} that $v_y=-6xy$. Integrating this with respect to $y$, we obtain
$$v(x,y)=-3xy^2+\phi(x),$$
where $\phi(x)$ is some unknown function. We determine $\phi(x)$ using $u_y=-v_x$:
$$v_x=-3y^2+\phi’(x).$$
Comparing this with $-u_y=-3y^2+3x^2$, we get $\phi’(x)=3x^2$ and so, $\phi(x)=x^3+C$ where $C$ is a constant. Hence, we find a harmonic conjugate of $u(x,y)$:
$$v(x,y)=-3xy^2+x^3+C,$$
where $C$ is a constant. The corresponding analytic function is
$$f(z)=(y^3-3x^2y)+i(-3xy^2+x^3+C),$$
where $C$ is a constant.

Analytic Continuation

The function $f(z)=\displaystyle\frac{1}{1+z}$ has an isolated singularity at $z=-1$. It has the Maclaurin series representation

$$f(z)=\sum_{n=0}^\infty(-1)^nz^n$$
for $|z|<1$. The power series $f_1(z)=\displaystyle\sum_{n=0}^\infty(-1)^nz^n$ converges only on the open unit disk $D_1:\ |z|<1$. For instance, the series diverges at $z=\frac{3}{2}i$ i.e. $f_1\left(\frac{3}{2}i\right)$ is not defined. The first 25 partial sums of the series $f_1\left(\frac{3}{2}i\right)$ are listed below and they do not appear to be approaching somewhere.

S[1] = 1.
S[2] = 1. – 1.500000000 I
S[3] = -1.250000000 – 1.500000000 I
S[4] = -1.250000000 + 1.875000000 I
S[5] = 3.812500000 + 1.875000000 I
S[6] = 3.812500000 – 5.718750000 I
S[7] = -7.578125000 – 5.718750000 I
S[8] = -7.578125000 + 11.36718750 I
S[9] = 18.05078125 + 11.36718750 I
S[10] = 18.05078125 – 27.07617188 I
S[11] = -39.61425781 – 27.07617188 I
S[12] = -39.61425781 + 59.42138672 I
S[13] = 90.13208008 + 59.42138672 I
S[14] = 90.13208008 – 135.1981201 I
S[15] = -201.7971802 – 135.1981201 I
S[16] = -201.7971802 + 302.6957703 I
S[17] = 455.0436554 + 302.6957703 I
S[18] = 455.0436554 – 682.5654831 I
S[19] = -1022.848225 – 682.5654831 I
S[20] = -1022.848225 + 1534.272337 I
S[21] = 2302.408505 + 1534.272337 I
S[22] = 2302.408505 – 3453.612758 I
S[23] = -5179.419137 – 3453.612758 I
S[24] = -5179.419137 + 7769.128706 I
S[25] = 11654.69306 + 7769.128706 I

Also shown below are the graphics of partial sums of the series $f_1\left(\frac{3}{2}i\right)$.

The first 10 partial sums

The first 20 partial sums

The first 30 partial sums

Let us expand $f(z)=\displaystyle\frac{1}{1+z}$ at $z=i$. Then we obtain
\begin{align*}
f(z)&=\frac{1}{1+z}\\
&=\frac{1}{1+i}\cdot\frac{1}{1+\frac{z-i}{1+i}}\\
&=\sum_{n=0}^\infty (-1)^n\frac{(z-i)^n}{(1+i)^{n+1}}
\end{align*}
for $|z-i|<\sqrt{2}$. Let $f_2(z)=\displaystyle\sum_{n=0}^\infty (-1)^n\frac{(z-i)^n}{(1+i)^{n+1}}$. This series converges only on the open disk $D_2:\ |z-i|<\sqrt{2}$, in particular at $z=\frac{3}{2}i$ and $f_2\left(\frac{3}{2}i\right)=f\left(\frac{3}{2}i\right)=\frac{4}{13}-\frac{6}{13}i$. The first 25 partial sums of the series $f_2\left(\frac{3}{2}i\right)$ are listed below and it appears that they are approaching a number. In fact, they are approaching the complex number $f\left(\frac{3}{2}i\right)=\frac{4}{13}-\frac{6}{13}i$.

S[1] = 0.5000000000 – 0.5000000000 I
S[2] = 0.2500000000 – 0.5000000000 I
S[3] = 0.3125000000 – 0.4375000000 I
S[4] = 0.3125000000 – 0.4687500000 I
S[5] = 0.3046875000 – 0.4609375000 I
S[6] = 0.3085937500 – 0.4609375000 I
S[7] = 0.3076171875 – 0.4619140625 I
S[8] = 0.3076171875 – 0.4614257812 I
S[9] = 0.3077392578 – 0.4615478516 I
S[10] = 0.3076782227 – 0.4615478516 I
S[11] = 0.3076934814 – 0.4615325928 I
S[12] = 0.3076934814 – 0.4615402222 I
S[13] = 0.3076915741 – 0.4615383148 I
S[14] = 0.3076925278 – 0.4615383148 I
S[15] = 0.3076922894 – 0.4615385532 I
S[16] = 0.3076922894 – 0.4615384340 I
S[17] = 0.3076923192 – 0.4615384638 I
S[18] = 0.3076923043 – 0.4615384638 I
S[19] = 0.3076923080 – 0.4615384601 I
S[20] = 0.3076923080 – 0.4615384620 I
S[21] = 0.3076923075 – 0.4615384615 I
S[22] = 0.3076923077 – 0.4615384615 I
S[23] = 0.3076923077 – 0.4615384616 I
S[24] = 0.3076923077 – 0.4615384615 I
S[25] = 0.3076923077 – 0.4615384615 I

The following graphics shows that the real parts of the partial sums of the series $f_2\left(\frac{3}{2}i\right)$ are approaching $\frac{3}{14}$ (blue line).

The real parts of the first 25 partial sums

The next graphics shows that the imaginary parts of the partial sums of the series $f_2\left(\frac{3}{2}i\right)$  are approaching $-\frac{6}{13}$ (blue line).

The imaginary parts of the first 25 partial sums

Also shown below is the graphics of the first 25 partial sums of the series $f_2\left(\frac{3}{2}i\right)$. They are approaching the complex number $f\left(\frac{3}{2}i\right)=\frac{4}{13}-\frac{6}{13}i$ (the intersection of horizontal and vertical blue lines).

The first 25 partial sums

Note that $f_1(z)=f_2(z)$ on $D_1\cap D_2$. Define $F(z)$ as

$$F(z)=\left\{\begin{array}{ccc} f_1(z) & \mbox{if} & z\in D_1,\\ f_2(z) & \mbox{if} & z\in D_2. \end{array}\right.$$

Analytic continuation

Then $F(z)$ is analytic in $D_1\cup D_2$. The function $F(z)$ is called the analytic continuation into $D_1\cup D_2$ of either $f_1$ or $f_2$, and $f_1$ and $f_2$ are called elements of $F$. The function $f_1(z)$ can be continued analytically to the punctured plane $\mathbb{C}\setminus\{-1\}$ and the function $f(z)=\frac{1}{1+z}$ is indeed the analytic continuation into $\mathbb{C}\setminus\{-1\}$ of $f_1$. In general, whenever analytic continuation exists it is unique.

Applications of Residues: Evaluation of Improper Integrals 2

In this lecture, we study improper integrals of the form $\int_{-\infty}^\infty f(x)\sin axdx$ or $\int_{-\infty}^\infty f(x)\cos axdx$, where $a$ denotes a positive constant. These integrals appear in Fourier analysis. Assume that $f(x)=\frac{p(x)}{q(x)}$, where $p(x)$ and $q(x)$ are polynomials with real coefficients and no factors in common. Also, $q(z)$ has no real zeros. We discuss how to evaluate improper integrals of the above type through the following example.

Example. Evaluate $\int_{-\infty}^\infty\frac{\cos 3x}{(x^2+1)^2}dx$.

Solution. Let $f(z)=\frac{1}{(z^2+1)^2}$. Then $f(z)e^{3iz}$ is analytic everywhere on and above the real axis except at $z=i$. Let $C_R$ be the upper semi-circle centered at the origin with radius $R>1$. Then by Cauchy’s Residue Theorem,
$$\int_{-R}^R\frac{e^{i3x}}{(x^2+1)^2}dx=2\pi i B_1-\int_{C_R}f(z)e^{i3z}dz,$$
where $B_1=\mathrm{Res}_{z=i}[f(z)e^{i3z}]$. $f(z)e^{i3z}$ can be written as
$$f(z)e^{i3z}=\frac{\phi(z)}{(z-i)^2},$$
where $\phi(z)=\frac{e^{i3z}}{(z+i)^2}$. Since $z=i$ is a pole of order $2$ of $f(z)$,
$$B_1=\phi’(i)=\frac{1}{ie^3}.$$
On $C_R$, $|z|=R$ and so by triangle inequality we obtain
$$|(z+i)^2|\geq (R^2-1)^2$$
and thereby
$$|f(z)|\leq\frac{1}{(R^2-1)^2}.$$
$|e^{i3z}|=e^{-3y}\leq 1$ for all $y\geq 0$. Hence, we find that
$$\left|\mathrm{Re}\int_{C_R}f(z)e^{i3z}dz\right|\leq\left|\int_{C_R}f(z)e^{i3z}dz\right|\leq\frac{\pi R}{(R^2-1)^2}\to 0$$
as $R\to\infty$. Therefore,
$$\int_{-\infty}^\infty\frac{e^{i3x}}{(x^2+1)^2}dx=\frac{2\pi}{e^3}.$$

Applications of Residues: Evaluation of Improper Integrals

Recall the definition of improper integrals in calculus:
\begin{align*}
\int_0^\infty f(x)dx&=\lim_{R\to\infty}\int_0^R f(x)dx,\\
\int_{-\infty}^\infty f(x)dx&=\lim_{R_1\to\infty}\int_{-R_1}^0 f(x)dx+\lim_{R_2\to\infty}\int_0^{R_2}f(x)dx.
\end{align*}
The Cauchy Principal Value (P.V.) is given by
$$\mathrm{P.V.}\int_{-\infty}^\infty f(x)dx=\lim_{R\to\infty}\int_{-R}^R f(x)dx.$$
The Cauchy principal value of an improper integral is not necessarily the same as the improper integral. For example,
$$\mathrm{P.V}\int_{-\infty}^\infty xdx=\lim_{R\to\infty}\int_{-R}^R xdx=0,$$
while
$$\int_{-\infty}^\infty xdx=\lim_{R_1\to\infty}\int_{-R_1}^0xdx+\lim_{R_2\to\infty}\int_0^{R_2}xdx=-\infty+\infty$$
is undefined. In general, if $\int_{-\infty}^\infty f(x)dx<\infty$ then $\mathrm{R.V.}\int_{-\infty}^\infty f(x)dx<\infty$, but the converse need not be true. Suppose that $f(x)$ is an even function. Then
\begin{align*}
\int_0^R f(x)dx&=\frac{1}{2}\int_{-R}^R f(x)dx,\\
\int_{-R_1}^0 f(x)dx&=\int_0^{R_1}f(x) dx.
\end{align*}
So,
$$\mathrm{P.V.}\int_{-\infty}^\infty f(x)dx=\int_{-\infty}^\infty f(x)dx=2\int_0^\infty f(x)dx.$$

Let us consider an even function $f(x)$ of the form $f(x)=\frac{p(x)}{q(x)}$, where $p(x)$, $q(x)$ are polynomials with real coefficients no factors in common. Furthermore, we assume that $q(z)$ has no real zeros but has at least one zero above the real axis. Let us consider a positively oriented upper semicircle $C_R$ whose radius $R$ is large enough to contain all the zeros above the real axis as shown in the figure below.

$C_R$ together with the interval $[-R,R]$ form a positively oriented simple closed contour. Then by Cauchy’s Residue Theorem we have
$$\int_{-R}^R f(x)dx+\int_{C_R} f(z)dz=2\pi i\sum_{k=1}^n\mathrm{Res}_{z=z_k}f(z),$$
i.e.
$$\int_{-R}^R f(x)dx=2\pi i\sum_{k=1}^n\mathrm{Res}_{z=z_k}f(z)-\int_{C_R} f(z)dz.$$
If $\lim_{R\to\infty}\int_{C_R} f(z)dz=0$ then
$$\mathrm{P.V.}\int_{-\infty}^\infty f(x)dx=2\pi i\sum_{k=1}^n\mathrm{Res}_{z=z_k}f(z).$$
If in addition $f(x)$ is even,
$$\int_{-\infty}^\infty f(x)dx=2\pi i\sum_{k=1}^n\mathrm{Res}_{z=z_k}f(z)$$
or
$$\int_0^\infty f(x)dx=\pi i\sum_{k=1}^n\mathrm{Res}_{z=z_k}f(z).$$

Example. Let us consider the improper integral
$$\int_0^\infty\frac{x^2}{x^6+1}dx.$$
Let $f(z)=\frac{z^2}{z^6+1}$ has isolated singularities at the zeros of $z^6+1$, and is analytic everywhere else. $z^6=-1$ has solutions (the sixth roots of $-1$)
$$c_k=\exp\left[i\left(\frac{\pi}{6}+\frac{2k\pi}{6}\right)\right],\ k=0,1,\cdots,5.$$
The first three roots
$$c_0=e^{i\frac{\pi}{6}},\ c_1=i,\ c_2=e^{i\frac{5\pi}{6}}$$
lie in the upper half plane. Let us consider a positively oriented upper semicircle $C_R$ whose radius $R$ is greater than $1$.

Then
$$\int_{-R}^Rf(x)dx=2\pi(B_0+B_1+B_2)-\int_{C_R}f(z)dz,$$
where $B_k$ is the residue of $f(z)$ at $c_k$, $k=0,1,2$. $B_k$ can be found as we studied here
$$B_k=\mathrm{Res}_{z=c_k}\frac{z^2}{z^6+1}=\frac{c_k^2}{6c_k^5}=\frac{1}{6c_k^3},\ k=0,1,2.$$
Thus, we obtain
$$2\pi(B_0+B_1+B_2)=2\pi\left(\frac{1}{6i}-\frac{1}{6i}+\frac{1}{6i}\right)=\frac{\pi}{3}$$
and hence,
$$\int_{-R}^R f(x)dx=\frac{\pi}{3}-\int_{C_R}f(z)dz.$$
On $C_R$, $|z|=R$ so
$$|z^6+1|\geq ||z|^6-1|=|R^6-1|=R^6-1$$
and thereby we obtain
$$|f(z)|\leq\frac{R^2}{R^6-1}.$$
Since the length of $C_R$ is $\pi R$,
$$\left|\int_{C_R} f(z)dz\right|\leq\frac{R^2}{R^6-1}\cdot\pi R\to 0$$
as $R\to\infty$. Hence,
$$\mathrm{P.V.}\int_{-\infty}^\infty\frac{x^2}{x^6+1}dx=\lim_{R\to\infty}\frac{x^2}{x^6+1}dx=\frac{\pi}{3}.$$
Since the integrand is even,
$$\int_{-\infty}^\infty\frac{x^2}{x^6+1}dx=\frac{\pi}{3}$$
and
$$\int_0^\infty\frac{x^2}{x^6+1}dx=\frac{\pi}{6}.$$

Zeros and Poles

Zeros and poles are closely related and their relationship may be used to calculates residues. First we introduce two theorems without proof. (Their proofs can be found, for instance, in [1].)

Theorem 1. A function $f$ is that is analytic at a point $z_0$ has a zero of order $m$ there if and only if there is a function $g$, which is analytic and nonzero at $z_0$, such that
$$f(z)=(z-z_0)^mg(z).$$

Theorem 2. Suppose that:

(i) two functions $p$ and $q$ are analytic at a point $z_0$;

(ii) $p(z_0)\ne 0$ and $q$ has a zero of order $m$ at $z_0$.

Then $\frac{p(z)}{q(z)}$ has a pole of order $m$ at $z_0$.

Now we discuss our main theorem in this lecture.

Theorem. Let two functions $p$ and $q$ be analytic at a point $z_0$. If
$$p(z_0)\ne 0,\ q(z_0)=0,\ \mbox{and}\ q’(z_0)\ne 0,$$
then  $z_0$ is a simple pole of $\frac{p(z)}{q(z)}$ and
$$\mathrm{Res}_{z=z_0}\frac{p(z)}{q(z)}=\frac{p(z_0)}{q’(z_0)}.$$

Proof. From the conditions, we see that $q(z)$ has a zero of order $1$, so by theorem 1 it can be written as
$$q(z)=(z-z_0)g(z)$$
where $g(z)$ is analytic at $z=z_0$ and $g(z_0)\ne 0$. This can be in fact readily seen without quoting theorem 1. Since $q(z)$ is analytic at $z_0$, it can be written as a Taylor series expansion
\begin{align*}
q(z)&=q(z_0)+\frac{q’(z_0)}{1!}(z-z_0)+\frac{q^{\prime\prime}(z_0)}{2!}(z-z_0)^2+\cdots\\
&=\frac{q’(z_0)}{1!}(z-z_0)+\frac{q^{\prime\prime}(z_0)}{2!}(z-z_0)^2+\cdots\\
&=(z-z_0)\left\{\frac{q’(z_0)}{1!}+\frac{q^{\prime\prime}(z_0)}{2!}(z-z_0)+\cdots\right\}.
\end{align*}
Set $g(z)=\frac{q’(z_0)}{1!}+\frac{q^{\prime\prime}(z_0)}{2!}(z-z_0)+\cdots$. Then $g(z)$ is analytic at $z=z_0$ and that $g(z_0)=q’(z_0)\ne 0$.

Now, theorem 2 implies that $\frac{p(z)}{q(z)}$ has a simple pole at $z=z_0$, but without quoting theorem 2, $\frac{p(z)}{q(z)}=\frac{\frac{p(z)}{g(z)}}{z-z_0}$, $\frac{p(z)}{g(z)}$ is analytic and nonzero at $z=z_0$. So, $\frac{p(z)}{q(z)}$ has a simple pole at $z=z_0$ as we studied here. Thus,
$$\mathrm{Res}_{z=z_0}\frac{p(z)}{q(z)}=\frac{p(z_0)}{g(z_0)}=\frac{p(z_0)}{q’(z_0)}.$$
This completes the proof.

Example. Find the residue of the functions
$$f(z)=\frac{z}{z^4+4}$$
at the isolated singularity $z_0=\sqrt{2}e^{\frac{i\pi}{4}}=1+i$.

Solution. Let $p(z)=z$ and $q(z)=z^4+4$. Then $p(z_0)=p(1+i)=1+i\ne 0$, $q(z_0)=0$, and $q’(z_0)=4z_0^3=4(1+i)^3\ne 0$. Hence, $f(z)$ has a simple pole at $z_0$. The residue $B_)$ is found by
$$B_0=\mathrm{Res}_{z=z_0}f(z)=\frac{p(z_0)}{q’(z_0)}=\frac{z_0}{3z_0^3}=\frac{1}{4z_0^2}=-\frac{i}{8}.$$

Example. Evaluate the contour integral
$$\int_C\frac{e^{zt}}{\sinh z}dz,$$
where $C$ is the positively oriented circle $|z|=8$.

Solution. $\sinh z=0$ if and only if $e^{2z}=1$. Let $z=x+iy$. Then it follows from $e^{2z}=1$ that $$e^{2x}\cos 2y=1,\ e^{2x}\sin 2y=0.$$
The solutions are $x=0$ and $y=n\pi$, $n=0,\pm 1,\pm 2,\cdots$. Thus, $\sinh z=0$ if and only if $z=n\pi i$, $n=0,\pm 1,\pm 2$. Among these, only $z_0=0$, $z_1=\pi i$, $z_2=-\pi i$, $z_3=2\pi i$, and $z_4=-2\pi i$ lie within the interior of the circle $|z|=8$. Let $p(z)=e^{zt}$  and $q(z)=\sinh z$. Then for each $i=0,1,2,3,4$, $p(z_i)\ne 0$, $q(z_i)=0$ and $q(z_i)\ne 0$. So each $z_i$ is a simple pole of $f(z)=\frac{e^{zt}}{\sinh z}$. If we denote each residue $\mathrm{Res}_{z=z_i}f(z)$ by $B_i$, then we have
\begin{align*}B_0&=\frac{p(0)}{q’(0)}=1,\\
B_1&=\frac{p(\pi i)}{q’(\pi i)}=-e^{\pi it},\ B_2=\frac{p(-\pi i)}{q’(-\pi i)}=-e^{-\pi it},\\
B_3&=\frac{p(2\pi i)}{q’(2\pi i)}=e^{2\pi it},\ B_4=\frac{p(-2\pi i)}{q’(-2\pi i)}=e^{-2\pi it}.\end{align*}
By Cauchy’s Residue Theorem, we obtain
\begin{align*}
\int_C\frac{e^{zt}}{\sinh z}dz&=2\pi i\sum_{i=0}^4B_i\\
&=2\pi i(1-2\cos\pi t+2\cos 2\pi t).
\end{align*}

References:

[1] James Brown and Ruel Churchill, Complex Variables and Applications, 8th Edition, McGraw-Hill, 2008

Residues at Poles

When $f(z)$ has a pole of order $m$, we may be able to find the residue of $f(z)$ at $z_0$ without expanding $f(z)$ into a Laurent series at $z=z_0$. This gives a great computational advantage.

Suppose that $z_0$ is a pole of order $m$ of $f(z)$. Then $f(z)$ has a Laurent series expansion
$$f(z)=\sum_{n=0}^\infty a_n(z-z_0)^n+\frac{b_1}{z-z_0}+\frac{b_2}{(z-z_0)^2}+\cdots+\frac{b_m}{(z-z_0)^m}\ (b_m\ne 0)$$
valid in a punctured disk $0<|z-z_0|<R$.
Define
$$\phi(z)=\left\{\begin{array}{ccc} (z-z_0)^mf(z) & \mbox{if} & z\ne z_0,\\ b_m & \mbox{if} & z=z_0. \end{array}\right.$$
Then $\phi(z)$ has a power series representation
$$\phi(z)=b_m+b_{m-1}(z-z_0)+\cdots+b_2(z-z_0)^{m-2}+b_1(z-z_0)^{m-1}+\sum_{n=0}^\infty(z-z_0)^{m+n},$$
for $|z-z_0|<R$. That is, $\phi(z)$ is analytic at $z=z_0$ and in the disk $|z-z_0|<R$. We find that
$$b_1=\left\{\begin{array}{ccc}\frac{\phi^{(n-1)}(z_0)}{(m-1)!} & \mbox{if} & m\geq 2,\\ \phi(z_0) & \mbox{if} & m=1. \end{array}\right.$$

Conversely, suppose that $f(z)$ can be written in the form
$$f(z)=\frac{\phi(z)}{(z-z_0)^m},$$
where $\phi(z)$ is analytic and nonzero at $z=z_0$. $\phi(z)$ has a Taylor series expansion at $z_0$
\begin{align*}
\phi(z)=&\phi(z_0)+\frac{\phi’(z_0)}{1!}(z-z_0)+\frac{\phi^{\prime\prime}(z_0)}{2!}(z-z_0)^2\\
&+\cdots+\frac{\phi^{(m-1)}(z_0)}{(m-1)!}(z-z_0)^{m-1}+\sum_{n=m}^\infty\frac{\phi^{(n)}(z_0)}{n!}(z-z_0)^n
\end{align*}
in some neighbourhood $|z-z_0|<\epsilon$. Since $\phi(z_0)\ne 0$, $z_0$ is a pole of order $m$ of $f(z)$. Clearly, we have
$$\mathrm{Res}_{z=z_0}f(z)=\left\{\begin{array}{ccc} \phi(z_0) & \mbox{if} & m=1,\\ \frac{\phi^{(n-1)}(z_0)}{(m-1)!} & \mbox{if} & m\geq 2. \end{array}\right.$$
Therefore, we have the following theorem holds.

Theorem. An isolated singularity $z_0$ of a function $f$ is a pole of order $m$ if and only if $f(z)$ can be written as
$$f(z)=\frac{\phi(z)}{(z-z_0)^m},$$
where $\phi(z)$ is analytic and nonzero at $z=z_0$. Moreover,
$$\mathrm{Res}_{z=z_0}f(z)=\left\{\begin{array}{ccc} \phi(z_0) & \mbox{if} & m=1,\\ \frac{\phi^{(n-1)}(z_0)}{(m-1)!} & \mbox{if} & m\geq 2. \end{array}\right.$$

Example. $f(z)=\frac{z+1}{z^2+9}$ has an isolated singularity at $z=3i$. $f(z)$ can be written as
$$f(z)=\frac{\frac{z+1}{z+3i}}{z-3i}.$$
Then $\phi(z)=\frac{z+1}{z+3i}$ is analytic at $z=3i$ and $\phi(3i)=\frac{3-i}{6}\ne 0$. Hence, $z=3i$ is a simple pole of $f(z)$ and
$$\mathrm{Res}_{z=3i}f(z)=\phi(3i)=\frac{3-i}{6}.$$
$z=-3i$ is also a simple pole of $f(z)$ and
$$\mathrm{Res}_{z=-3i}f(z)=\frac{3+i}{6}.$$

Example. Let us consider $f(z)=\frac{z^3+2z}{(z-i)^3}$. $\phi(z)=z^3+2z$ is analytic at $z=i$ and $\phi(i)=i\ne 0$. Hence, $z=i$ is a pole of order $3$ and
$$b_1=\mathrm{Res}_{z=i}f(z)=\frac{\phi^{\prime\prime}(i)}{2!}=3i.$$

The Three Types of Isolated Singularities

Recall that if $f(z)$ has an isolated singularity at $z=z_0$, it may be represented by a Laurent series
$$f(z)=\sum_{n=0}^\infty a_n(z-z_0)^n+\frac{b_1}{z-z_0}+\frac{b_2}{(z-z_0)^2}+\cdots+\frac{b_n}{(z-z_0)^n}+\cdots$$
in a puctured disk $0<|z-z_0|<R$. The part of series that contains negative powers of $z-z_0$
$$\frac{b_1}{z-z_0}+\frac{b_2}{(z-z_0)^2}+\cdots+\frac{b_n}{(z-z_0)^n}+\cdots$$
is called the principal part of $f(z)$ at $z_0$.

Suppose that there exists $m\in\mathbb{N}$ such that $b_m\ne 0$ and $b_{m+1}=b_{m+2}=\cdots=0$. Then
$$f(z)=\sum_{n=0}^\infty a_n(z-z_0)^n+\frac{b_1}{z-z_0}+\frac{b_2}{(z-z_0)^2}+\cdots+\frac{b_m}{(z-z_0)^m},$$
where $0<|z-z_0|<R$. In this case, the isolated singularity $z_0$ is called a pole of order $m$. A pole of order 1 is usually called a simple pole.

Example.
\begin{align*}
\frac{z^2-2z+3}{z-2}&=z+\frac{3}{z-2}\\
&=2+(z-2)+\frac{3}{z-2},\ 0<|z-2|<\infty
\end{align*}
has a simple pole at $z_0=2$. The residue at $z_0=2$ is 3.

Example.
\begin{align*}
\frac{\sinh z}{z^4}&=\frac{1}{z^4}\left(z+\frac{z^3}{3!}+\frac{z^5}{5!}+\cdots\right)\\
&=\frac{1}{z^3}+\frac{1}{3!z}+\frac{z}{5!}+\frac{z^3}{7!}+\cdots,\ 0<|z|<\infty
\end{align*}
has a pole of order $m=3$ at $z_0=0$. The residue at $z_0=0$ is $\frac{1}{6}$.

When $b_n=0$ for all $n\geq 1$, so that
$$f(z)=\sum_{n=0}^\infty (z-z_0)^n$$
the point $z_0$ is called a removable singularity.

Example.
\begin{align*}
f(z)&=\frac{1-\cos z}{z^2}\\
&=\frac{1}{z^2}\left[1-\left(1-\frac{z^2}{2!}+\frac{z^4}{4!}-\frac{z^6}{6!}+\cdots\right)\right]\\
&=\frac{1}{2!}-\frac{z^2}{4!}+\frac{z^4}{6!}-\cdots,\ 0<|z|<\infty.
\end{align*}
Thus $z_0=0$ is a removable singularity. Define
$$g(z)=\left\{\begin{array}{ccc} f(z) & \mbox{if} & z\ne 0,\\ \frac{1}{2!} & \mbox{if} & z=0. \end{array}\right.$$
Then $g(z)$ is entire.

When an infinite number of the $b_n$ are nonzero, $z_0$ is called an essential singularity.

Example.
\begin{align*}
\exp\left(\frac{1}{z}\right)&=\sum_{n=0}^\infty\frac{1}{n! z^n}\\
&=1+\frac{1}{1!z}+\frac{1}{2!z^2}+\cdots,\ 0<|z|<\infty
\end{align*}
has an essential singularity at $z_0=0$.

Example. $e^z=-1$ when $z=(2n+1)\pi i$ $(n=0,\pm 1, \pm 2,\cdots)$. So $e^{\frac{1}{z}}=-1$ when $\frac{1}{z}=(2n+1)\pi i$ or $z=-\frac{i}{(2n+1)\pi}$ $(n=0,\pm 1,\pm 2,\cdots)$and an infinite number of these points lie in any neighbourhood of the essential singularity $z_0=0$.

Picard’s Theorem. In each neighbourhood of an essential singularity, a function assumes every finite value, with one possible exception, an infinite number of time.

In the above example, since $e^{\frac{1}{z}}\ne 0$ for all $z$, $z=0$ is the exceptional value in Picard’s theorem.