## Computing an integral over an absolute value using Cauchy’s theorem

The problem is to compute the following integral:

$$\int_{-1}^1 dx \frac{|x-y|^{\alpha}}{(1-x^2)^{(1+\alpha)/2}}$$

I will show how to compute this integral using Cauchy’s theorem. It was remarked that it should not be possible to use Cauchy’s theorem, as Cauchy’s theorem only applies to analytic functions, and an absolute value certainly does not qualify. True. Nevertheless, for the special case of the integral in question, things work out quite nicely as you will see.

Consider the contour integral

$$\oint_C dz \frac{(z-y)^{\alpha}}{(z^2-1)^{(1+\alpha)/2}}$$

where $C$ is the following contour:

The radii of the small arcs is $\epsilon$ and the large arc is $R$. The left arc is centered at $z=-1$, the right arc is centered at $z=1$, and the center arc is centered at $z=y$.

Note that the integrals about the small arcs vanish in the limit as $\epsilon \to 0$. The integrals along the segment $AB$ cancels with that along $KL$. Thus, the contour integral is equal to, in this limit,

$$e^{-i \left ( \frac{1+\alpha}{2}\right ) \pi} \left [e^{i \pi \alpha} \int_{-1}^y dx \frac{(y-x)^{\alpha}}{(1-x^2)^{(1+\alpha)/2}} + \int_y^1 dx \frac{(x-y)^{\alpha}}{(1-x^2)^{(1+\alpha)/2}}\right ]\\ – e^{i \left ( \frac{1+\alpha}{2}\right ) \pi} \left [e^{-i \pi \alpha} \int_{-1}^y dx \frac{(y-x)^{\alpha}}{(1-x^2)^{(1+\alpha)/2}} + \int_y^1 dx \frac{(x-y)^{\alpha}}{(1-x^2)^{(1+\alpha)/2}}\right ]\\ + i R \int_{-\pi}^{\pi} d\theta \, e^{i \theta} \frac{(R e^{i \theta}-y)^{\alpha}}{(R^2 e^{i 2 \theta}-1)^{(1+\alpha)/2}}$$

In the limit as $R \to \infty$, the last integral about the big arc approaches $i 2 \pi$. Meanwhile, the first four integrals may be greatly simplified to be

$$-i 2 \sin{\left [\left ( \frac{1-\alpha}{2} \right ) \pi \right ]} \int_{-1}^y dx \frac{(y-x)^{\alpha}}{(1-x^2)^{(1+\alpha)/2}} – i 2 \sin{\left [\left ( \frac{1+\alpha}{2} \right ) \pi \right ]} \int_y^1 dx \frac{(x-y)^{\alpha}}{(1-x^2)^{(1+\alpha)/2}}$$

which may be written in more compact form such that the contour integral is equal to

$$-i 2 \cos{\left ( \frac{\pi \alpha}{2} \right )} \int_{-1}^1 dx \frac{|x-y|^{\alpha}}{(1-x^2)^{(1+\alpha)/2}} + i 2 \pi$$

By Cauchy’s theorem, the contour integral is zero. Therefore,

$$\int_{-1}^1 dx \frac{|x-y|^{\alpha}}{(1-x^2)^{(1+\alpha)/2}} = \frac{\pi}{\cos{\left ( \frac{\pi \alpha}{2} \right )}}$$

Note how the absolute value was introduced naturally because we got to the point where we could simply add the pieces of the integral back together. In general, the above methodology will not work. But it is nice to be able to recognize when it will work.

### Integral with two branch cuts II

The problem here is to compute $$\int_0^\infty \log(1+tx)t^{-p-1}dt$$ where $p\in(0,1)$ and $x>0$. This is a great problem for contour integration. Just tricky enough to be really interesting. What makes it interesting is that there are two functions in the integrand needing their own separate branch cuts. One must keep in mind that each function only […]

### Integral with two branch cuts

The problem is to evaluate the following integral: $$\int_{-1}^1 dx \frac{\log{(x+a)}}{(x+b) \sqrt{1-x^2}}$$ where $a \gt 1$ and $|b| \lt 1$. It should be obvious to those who spend time around these integrals that this integral does not converge as stated. However, we only have a simple pole at $x=-b$ so that we can compute […]

### Weird integral whose simplicity is only apparent in the complex plane

Every so often we come across an integral that seems absolutely impossible on its face, but is easily attacked – in fact, is custom designed – for the residue theorem. I wonder why a first year complex analysis class doesn’t show off this case as Exhibit A in why the residue theorem is so useful. […]

### Expansions of $e^x$

A very basic question was asked recently: What is a better approximation to $e^x$, the usual Taylor approximation, or a similar approximation involving $1/e^{-x}$? More precisely, given an integer $m$, which is a better approximation to $e^x$: $$f_1(x) = \sum_{k=0}^m \frac{x^k}{k!}$$ or $$f_2(x) = \frac1{\displaystyle \sum_{k=0}^m \frac{(-1)^k x^k}{k!}}$$ The answer is amazingly simple: […]

The problem posed in M.SE concerns real methods of evaluating $$\int_0^{\infty} dx\frac{\log(x)}{\cosh(x) \sec(x)- \tan(x)}$$ The place I started is the nifty result, proven here, that $$\frac{\sin{x}}{\cosh{t} – \cos{x}} = 2 \sum_{k=1}^{\infty} e^{-k t} \sin{k x}$$ Of course, the integral actually looks like $$\int_0^{\infty} dx \frac{\cos{x}}{\cosh{x} – \sin{x}} \log{x}$$ so we need to […]