# Need help with contour integral problem

Need help with this https://en.wikipedia.org/wiki/Methods_of_contour_integration#Example_1

$\int_{-\infty}^\infty \frac{1}{\left(x^2+1\right)^2}\,dx$

I understand this part

$f(z)=\frac{1}{\left(z^2+1\right)^2}$

$f(z)=\frac{\frac{1}{(z+i)^2}}{(z-i)^2}$

but am confused here :

$\oint_C f(z)\,dz = \oint_C \frac{\frac{1}{(z+i)^2}}{(z-i)^2}\,dz = 2\pi i \frac{d}{dz} \left(\frac{1}{(z+i)^2}\right)\Bigg|_{z=i} =2 \pi i \left(\frac{-2}{(z+i)^3}\right)\Bigg|_{z = i} =\frac{\pi}{2}$

How does taking the contour of the fraction lead to having to take a derivative later? Why does the integral go away? Is there some step missing?

• What's $C$....? – Nosrati Feb 21 '17 at 21:24
• @MyGlasses a semi-circle in the upper part of the complex plane... – Simply Beautiful Art Feb 21 '17 at 21:34
• $\dfrac{1}{(z^2+1)^2}=\dfrac{1}{(z-i)^2(z+i)^2}$ why only the factor $\dfrac{1}{(z-i)^2}$ is noticeable.? – Nosrati Feb 21 '17 at 21:37
• @SimplyBeautifulArt Sorry, I thought that is Thomas bart! – Nosrati Feb 21 '17 at 21:39
• @MyGlasses we only look at $z=i$ since its the only pole enclosed in the contour... – Simply Beautiful Art Feb 21 '17 at 21:46

Cauchy integral formula

$\oint_C \frac {f(z)}{z-a} dz = 2\pi i f(a)$

and

$\oint_C \frac {f(z)}{(z-a)^n} dz = 2\pi i \frac {f^{(n-1)}(a)}{(n-1)!}$

You probably have a much better proof in your book, then I am going to be able to write up here..

The enclosed integral of a function around poles at $a$ by Cauchy's residue theorem, are the coefficients of the $(x-a)^{-1}$ term of the Laurent series (a.k.a. residues). It then follows that since you have a pole of order two, then,

$$\frac1{(z^2+1)^2}=\frac{a_{-2}}{(z-i)^2}+\frac{a_{-1}}{z-i}+a_0+\dots$$

You will note that $a_{-1}$ is recoverable by multiplying by $(z-a)^2$, differentiating once, and letting $z\to a$, which is what was done.

• I see you are well on your way to taking on Complex Analysis :D – Brevan Ellefsen Feb 21 '17 at 21:54
• @BrevanEllefsen Nah, I just know random things XD – Simply Beautiful Art Feb 21 '17 at 21:55
• Haha, I suppose you and I have gotten pretty good at extracting all the necessary info off of a Wikipedia article XD – Brevan Ellefsen Feb 21 '17 at 21:56
• @BrevanEllefsen But did I take it from Wikipedia...? – Simply Beautiful Art Feb 21 '17 at 21:58
• Idk if you took this answer off of Wikipedia, but that wasn't really my point; my point was merely that I am amused you haven't taken a complex analysis class but have gleamed enough info off of random sources in the past to answer a question like this. – Brevan Ellefsen Feb 21 '17 at 22:02

$f(z)=\frac{1}{(z^2+1)^2}$ behaves like $\frac{1}{z^4}$ for large $z$, hence if $\gamma_R$ is a circle centered at the origin with radius $R$, counter-clockwise oriented, $$\lim_{R\to +\infty}\oint_{\gamma_R}f(z)\,dz = 0 \tag{ML}$$ On the other hand $f(z)$ is a meromorphic function with double poles at $z=\pm i$. By Cauchy's integral formula, if $\Gamma_R$ is the closed contour, counter-clockwise oriented, going from $-R$ to $R$ with a straight line, then from $R$ to $-R$ with a half-circle in the upper half-plane, for any $R>1$: $$\oint_{\Gamma_R}f(z)\,dz = 2\pi i\cdot\text{Res}\left(f(z),z=i\right)\tag{RES}$$ and since $z=i$ is a double pole for $f(z)=\frac{1}{(z-i)^2 (z+i)^2}$, $$\text{Res}\left(f(z),z=i\right) = \lim_{z\to i}\frac{d}{dz}\left((z-i)^2 f(z)\right) = \lim_{z\to i}-\frac{2}{(z+i)^3} = -\frac{i}{4}\tag{DZ}$$ so that $\oint_{\Gamma_R}f(z)\,dz$ equals $\frac{\pi}{2}$ for any $R$ large enough. By $(ML)$, $\frac{\pi}{2}$ is the value of the original integral.

Now, a much shorter, real-analytic proof. For any $a>0$ we have $$I(a) = \int_{0}^{+\infty}\frac{1}{x^2+a^2}\,dx = \frac{\pi}{2a}\tag{CauchyPDF}$$ hence by differentiating both sides with respect to $a$ (and exploiting differentiation under the integral sign) we get: $$I'(a) = -\int_{0}^{+\infty}\frac{2a}{(x^2+a^2)^2}\,dx = -\frac{\pi}{2a^2}\tag{DUIS}$$ and it is enough to evaluate the last identity at $a=1$.

• :O I wonder if we can put links in the tags... – Simply Beautiful Art Feb 21 '17 at 21:54
• @SimplyBeautifulArt doesn't appear that we can, though this would be a nice feature – Brevan Ellefsen Feb 21 '17 at 22:10
• @SimplyBeautifulArt This might be a good MSE-Meta question – Brevan Ellefsen Feb 21 '17 at 22:12
• @BrevanEllefsen: I agree. Are we sure that cannot be achieved by a suitable $\LaTeX$+$\text{Markdown}$ hack? – Jack D'Aurizio Feb 21 '17 at 22:23
• @JackD'Aurizio Hmm... so it's not a true tag, but is a decent workaround using horizontal spacing. Nice. – Brevan Ellefsen Feb 21 '17 at 23:33