Incomplete+lecture+9+notes

Residue theorem
Recall that residue theorem allows one to compute an integral of an analytic function with isolated singularities: math \int_\gamma f(z)\,dz=2\pi i \sum (Res(f;z_i)) math where the sum is over the singularities math z_i math contained inside of the curve math \gamma math .

Last time we've seen some simple examples of computing residues. What we usually do is find enough terms in the Laurent series expansion of the function until we find the minus-first one.

Computing a residue by manipulation of power series
Let's start by considering an example:

Compute math \int \frac{\cot^2 z}{z} \, dz math over the circle math math
 * z|=1

Solution: the singularities of math \frac{\cot^2z}{z}=\frac{\cos^2 z}{z\sin^2 z} math are located at the zeroes of math z\sin^2 z math , i.e. at integer multiples of math \pi math . Only one such point is inside math math , so all we have to do to compute the integral is find the residue math Res(\frac{\cot^2z}{z};z=0) math and multiply the answer by math 2\pi i math
 * z|=1

To find the Laurent series expansion for math \frac{\cos^2 z}{\sin^2 z} math we first compute several terms of Taylor series expansions of math \cos^2 math and math \sin^2 math and then try to divide one by the other:

math \cos z=1-z^2/2+... math , so math \cos ^2 z = (1-z^2/2+...)(1-z^2/2+...) = 1-z^2+... math

Similarly math \sin z=z-z^3/6+... math so math z\sin^2 z=z(z-z^3/6+...)(z-z^3/6+...)=z^3-z^5/3+... math

Now the quotient math \frac{\cos^2 z}{z\sin^2z}=\frac{1-z^2+...}{z^3-z^5/3+...} math obviously has a leading term math 1/z^3 math , i.e. it has a pole of order math 3 math . But since we are interested in the residue, i.e. the minus-first coefficient in Laurent series expansion, we'll have to go a little further in the computation.

We know that there is some Laurent expansion math \frac{1-z^2+...}{z^3-z^5/3+...}=1/z^3 + a_{-2}/z^2 + a_{-1}/z+... math . To find math a_{-1} math we multiply both sides by the denominator to get math 1-z^2+... = (1/z^3 + a_{-2}/z^2 + a_{-1}/z+...)(z^3-z^5/3+...) math , or math 1-z^2+...=1+a_{-2}z+(a_{-1}-1/3)z^2+... math Hence math a_{-1}=1/3 math and the original integral math \int_{|z|=1} \frac{\cot^2 z}{z} \, dz= 2\pi i / 3 math

Computing a residue without computing
Another example: what is the residue of math \frac{\cos^9z}{z\sin^{15}z} math at math z=0 math ?

We could try to use the previous method: it would involve some enormously long computation with power series. But in this example we can just notice that since the function in question is even, its Laurent series expansion has only even terms. Hence in particular the residue is zero.

Integral of a rational function of sine and cosine over the full period
We can use residue calculus to compute not only integrals over closed loops in the complex domain, but also some special integrals on the real line. In fact it was the problem of computing certain real integrals that has led Cauchy to invent residues and much of complex analysis.

For instance we have seen once that to find an integral of a rational function of sine and cosine over the full period, we can make a substitution math z=e^it math and transform it to an integral of a rational function over the unit circle. \textit{Now} we actually can compute any such integral.

Here's an example: compute the integral math \int\limits_{-\pi}^{\pi}\frac{dx}{(5+4\cos x) ^2} math .

To solve it we make a substitution math z=e^{ix} math and notice that math \cos x=\frac{z+1/z}{2} math , math dx=-i\frac{dz}{z} math and as math x math goes from math -\pi math to math \pi math , the variable math z math goes around the unit circle and makes exactly one full turn. Thus the integral is equal to math \int\limits_{|z|=1} \frac{-i\frac{dz}{z}}{(5+2z+\frac{2}{z})^2} math

This integral simplifies to math -i\int\limits_{|z|=1}\frac{z\,dz}{(2z^2+5z+2)^2} math . We factor the denominator to find the poles: math 2z^2+5z+2=2(z+\frac12)(z+2) math , thus there is only one pole in the unit circle: math z=-\frac12 math . The residue at this point can be easily computed:

math \frac{z}{4(z+\frac12)^2(z+2)^2}=\frac{1}{(z+\frac12)^2} (\frac{z}{4(z+2)^2}) math

If math \frac{z}{4(z+2)^2}=a_0+a_1(z+\frac12)+\ldots math , then math \frac{z}{4(z+\frac12)^2(z+2)^2}=\frac{a_0}{(z+\frac12)^2}+\frac{a_1}{z+\frac12}+\ldots math so we are basically trying to compute the coefficient math a_1 math , which is the derivative of math \frac{z}{4(z+2)^2} math at math z=-\frac12 math . This derivative turns out to be math \frac14 \frac{(z+2)^2-2z(z+2)}{(z+2)^2}|_{z=-\frac12}=\frac{5}{12} math .

Thus the original integral is math -i\cdot 2\pi i \cdot \frac{5}{12}=\frac{5\pi}{6} math

Integral of a rational function over the real line
Another type of integrals we can compute is an integral of a rational function over the real line, for instance math \int_{-\infty}^\infty \frac{dx}{(x^2+1)^2} math . One can compute this integral by the usual methods of calculus: find the antiderivative and use Newton-Leibnitz formula. But it's rather messy (especially if one doesn't know complex numbers).

Instead we can try to apply residue theorem. The problem is that we want to integrate a function over the real line, which isn't a closed loop. Even if we write the integral as math \lim\limits_{R\to \infty}\int\limits_{-R}^{R}\frac{dx}{(x^2+1)^2} math , we are still dealing with an integral over a non-closed path. The idea is to close the path using a large semicircle in the upper half-plane, and hope that this addition doesn't really change the integral. It is reasonable to expect that indeed the integral over the semicircle is small, since the integrand is of order math \frac1{R^4} math while the path length is only of order math R math .

Let's now do everything accurately. Let math C_R math be the semicircle in the upper half-plane of radius math R math . We can estimate the integral math \int_{C_R} \frac{dx}{(x^2+1)^2} math as follows: by triangle inequality for integrals math math which tends to math 0 math as math R math tends to math \infty math . So indeed adding an integral over a large semicircle contributes less and less as math R math becomes larger and larger.
 * \int_{C_R} \frac{dx}{(x^2+1)^2}|\leq length(C_R)\cdot \max\limits_{x\in C_R}(\frac{1}{(x^2+1)^2})\leq \pi R\cdot \frac{1}{(R^2-1)^2}

Now the integral over the interval from math -R math to math R math together with the integral over the semicircle math C_R math give us an integral over a closed path, which can be computed using residue theorem.

The integrand math \frac{1}{(x^2+1)^2} math has only one pole in the upper half-plane: the point math z=i math . Thus all we have to do is find the residue of math \frac{1}{(z-i)^2}\cdot \frac{1}{(z+i)^2} math at math z=i math . If math \frac{1}{(z+i)^2}=a_0+a_1(z+i)+\ldots math , then math \frac{1}{(z-i)^2}\cdot \frac{1}{(z+i)^2}=\frac{a_0}{(z-i)^2}+\frac{a_1}{z-i}+\ldots math and hence the residue is equal to math a_1 math , which is the derivative of math \frac{1}{(z+i)^2} math at math z=i math . This derivative is math (\frac{1}{(z+i)^2})'|_{z=i}=\frac{-2}{(i+i)^3}=-\frac{i}{4} math .

Thus the integral over math [-R,R] math +integral over math C_R math is math 2\pi i\cdot (-\frac{i}{4})=\frac{pi}{2} math .

As math R math tends to infinity, the first integral tends to what we have to find, math \int\limits_{-\infty}^{\infty}\frac{dx}{(x^2+1)^2} math , while the second integral tends to zero, as we showed. So the answer is math \int\limits_{-\infty}^{\infty}\frac{dx}{(x^2+1)^2}=\frac{\pi}{2} math .

A word of warning
Notice that in the end we got a reasonable answer: a real positive answer. If we somehow get a negative or imaginary number by integrating a real positive function over the reals, we can immediately know that we have made a mistake! Don't ever leave such mistakes without a comment: common sense is very important even for a mathematician!

Integral of an oscillating function
Another example of a real integral that can be computed using residues calculus is an integral of the form math \int\limits_{-\infty}^{\infty}R(x)\sin(ax)\,dx math or math \int\limits_{-\infty}^{\infty}R(x)\cos(ax)\,dx math where math R math is a rational function.

Let's compute for instance math \int\limits_{-\infty}^{\infty}\frac{\cos x\, dx}{x^2+1} math .

The idea is similar to the idea used in the previous example: we should close the loop by adding a large semicircle. However it doesn't work this way: the function math \cos x math grows very fast as the imaginary part of math x math grows. The trick that saves the day is to use the fact that for \textbf{real} values of math x math , the function math \cos x math is equal to math Re(e^{ix}) math . Thus we can rewrite the integral math \int\limits_{-\infty}^{\infty}\frac{\cos x\, dx}{x^2+1} math as math Re\int\limits_{-\infty}^{\infty}\frac{e^{ix}\, dx}{x^2+1}\,dx math . The rest is more or less like it was in the previous example.

We first write the integral math \int\limits_{-\infty}^{\infty}\frac{e^{ix}\, dx}{x^2+1}\,dx math as the limit of the integral math \int\limits_{-R}^{R}\frac{e^{ix}\, dx}{x^2+1}\,dx math as math R\to \infty math . Then we would like to add to this integral an integral of math \frac{e^{iz}\, dz}{z^2+1} math over a large semicircle. To be sure it doesn't affect the result very much, we should estimate this addition:

math math . Now math math and this is at most math 1 math if math Im z\geq 0 math .
 * \int_{C_R}\frac{e^{iz}\, dz}{z^2+1}|\leq \frac{\pi R}{R^2-1}\max\limits_{z\in C_R}|e^{iz}|
 * e^{iz}|=e^{-Im z}

So indeed the contribution of the integral over math C_R math tends to zero as math R math tends to infinity.

Finally the sum of the integrals over the interval math [-R,R] math and the semicircle is equal by the residue theorem to math 2\pi i math times the residue of math \frac{e^{iz}\, dz}{z^2+1} math at math z=i math , which can be computed very easily: math \frac{e^{iz}}{(z+i)(z-i)}=\frac{e^{i\cdot i}}{i+i} \cdot \frac{1}{z-i}+\ldots math . Thus the residue is math \frac{1}{2ie} math and hence the integral is math 2\pi i\cdot \frac{1}{2ie}= \frac{pi}{e} math

Exploiting multi-valuedness
Let's try to compute math \int\limits_0^{\infty} \frac{dx}{(1+x)x^{2/3}}\,dx math . Notice that this integral is an improper integral which should be interpreted as math \lim\limits_{\epsilon\to 0^+, R\to \infty} \int\limits_{\epsilon}^{R}\frac{dx}{(1+x)x^{2/3}}\,dx math . Then we should somehow close the contour of integration to be able to apply residue calculus. If one completes it to a sector with an angle of less than math 2\pi math , then one adds some integral along a straight line which really contributes something new and doesn't help us. There is a strange idea: consider a "key-hole" contour consisting of the interval from math \epsilon math to math R math , a circle of radius math R math in counter-clockwise direction, a ray from math R math back to math \epsilon math and then a circle of radius math \epsilon math in clock-wise direction.

One can even compute math \sum\limits_{n=-\infty}^{\infty}\frac{1}{n^2+a^2} math using residue theorem for integral of math \frac{\cot \pi z}{z^2+a^2} math over large rectangle.

\end{document}