# Principal value of integral

How to find the Cauchy principal value of the integral $$\int_0^\infty \left(\frac{1}{x^2}-\frac{\cot(x)}{x} \right) dx?$$

-
As far as I know it, the principal value of the integral $$\int\limits _0 ^{\infty} \frac {\tan(x)}{x} dx =\frac {\pi}{2}.$$ Maple produces that result. – user64494 May 7 '13 at 13:42

A few preliminary notes

1. $\displaystyle f(z)=\frac1{z^2}-\frac{\cot(z)}{z}$ has a removable singuarity at $0$.

2. the other singularities of $f$ have residue $-\dfrac1{n\pi}$ at $z=n\pi$.

3. $\lfloor x/\pi\rfloor=\dfrac12\implies\cot(z)=i\tanh(y)$

4. $|\cot(z)+i\,|\sim2e^{-2|y|}$ as $y\to\infty$.

We will integrate along the following contours:

$\hspace{7mm}$

sending the blue vertical segments to $\pm\infty$, then the green segment to $i\infty$.

Since the contour contains no singularities, we have \begin{align} 0= &\mathrm{PV}\int_{-\infty}^\infty\left(\frac1{x^2}-\frac{\cot(x)}{x}\right)\,\mathrm{d}x +\color{#C00000}{\int_{\large\gamma_s}\left(\frac1{z^2}-\frac{\cot(z)}{z}\right)\,\mathrm{d}z}\\ &+\color{#0000FF}{\int_{\large\gamma_v}\left(\frac1{z^2}-\frac{\cot(z)}{z}\right)\,\mathrm{d}z} +\color{#00A000}{\int_{\large\gamma_h}\left(\frac1{z^2}-\frac{\cot(z)}{z}\right)\,\mathrm{d}z} \end{align} Due to 2., the integral along $\color{#C00000}{\gamma_s}$ tends to $0$; that is, the residue at $k\pi$ cancels the residue at $-k\pi$.

Due to 3., the integral along $\color{#0000FF}{\gamma_v}$ tends to $0$; that is, $|\cot(z)|\le1$ on those segments.

Due to 4., the integral along $\color{#00A000}{\gamma_h}$ tends to $-\pi$; that is, $\cot(z)\to-i$.

Putting this all together, we get $$0= \mathrm{PV}\int_{-\infty}^\infty\left(\frac1{x^2}-\frac{\cot(x)}{x}\right)\,\mathrm{d}x +\color{#C00000}{0}+\color{#0000FF}{0}+\color{#00A000}{-\pi}$$ Therefore, $$\mathrm{PV}\int_0^\infty\left(\frac1{x^2}-\frac{\cot(x)}{x}\right)\,\mathrm{d}x=\frac\pi2$$

-
It would seem that the fact that $|\cot z|$ is bounded on the left and right sides of the rectangle only shows that the integral on those sides vanish if the height of the rectangle remains fixed. Is there something subtle here I'm overlooking? – Random Variable Apr 30 '14 at 21:20
@RandomVariable: sending the vertical segments to infinity shows that the integral along the green (top) path from $-\infty+yi$ to $+\infty+yi$ equals the integral along the black and red path from $-\infty$ to $+\infty$, for any finite $y$. Next, take the limit as $y\to\infty$. – robjohn Apr 30 '14 at 22:11
Does the argument not work if you place the vertices at $\pm \pi (N+\frac{1}{2})$ and $\pm \pi (N+\frac{1}{2}) + i \pi(N+ \frac{1}{2})$ where $N$ is some integer as opposed to $\pm \pi (N+\frac{1}{2})$ and $\pm \pi (N+\frac{1}{2}) + i y$? – Random Variable Apr 30 '14 at 23:01
@RandomVariable: You would have to analyze $\frac1{z^2}-\frac{\cot(z)}{z}$ more closely, but I believe it would (it would have to given that the integrals along the other contours behave the same). – robjohn May 1 '14 at 0:00
see above my work – user 1618033 Nov 12 '14 at 11:38

See the answer to this question at MO here

-
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. – Douglas S. Stones May 14 '13 at 20:09
This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. – user31280 May 14 '13 at 20:25
GEdgar's answer should be the accepted answer on MO. It is clear, concise, and accurate (and it uses no complex methods!). The accepted answer on MO has some errors which just happen to cancel out: $\cos(z)$ is replaced by $e^{iz}$ in the upper halfplane and by $e^{-iz}$ in the lower halfplane, but the discarded parts do not disappear on the contour at infinity, which is also discarded. – robjohn May 15 '13 at 9:51