# Integral by residue - “dog bone”

Let $I=\int_{-1}^{1}\frac{x^2 dx}{\sqrt{(1-x)(1+x)^2}}$. I used complex function $f(z)=\frac{z^2}{\sqrt{(z-1)(z+1)^2}}$, which we can define such that it is holomorphic on $\mathbb{C}\setminus[-1,1]$. I use a "dog bone"-contur to integrate it. I have problem with integral on the big circle : $\lim_{R \to \infty}\int_{C_R}f(z)dz$. How to calculate it ? (I know that it should be nonzero.)

## 4 Answers

Consider the function

$$f(z) = (z-1)^{-1/3} (z+1)^{-2/3}$$

$f$ is obviously the product of two functions, each having their own branch cuts. For example, $(z-1)^{-1/3}$ has a branch cut along $(-\infty,1]$, while $(z+1)^{-2/3}$ has a branch cut along $(-\infty,-1]$. Note that $z+1$ never changes sign along $(-1,1)$; it is always positive and away from its branch cut. Therefore, we can say that $\arg{(z+1)}=0$ on the lines of the dogbone. However, we do cross the branch cut of $(z-1)^{-1/3}$, i.e., $\arg{(z-1)}=\pi$ above the real axis and $\arg{(z-1)}=-\pi$ below.

Now consider the contour integral

$$\oint_C dz \, z^2 f(z)$$

where $C$ is (1) the circle $z=R e^{i \theta}$, $\theta \in [-\pi,\pi)$, (2) a line extending from the circle at $\theta=\pi$ to the dogbone contour, (3) the dogbone, and (4) a line back to the circle at $\theta=-\pi$. Note that the integral vanishes along the lines to the dogbone and along the small circles of the dogbone. Thus, the contour integral is

$$i R \int_{-\pi}^{\pi} d\theta \, e^{i \theta} R^2 e^{i 2 \theta} \left ( R e^{i \theta}-1 \right )^{-1/3} \left ( R e^{i \theta}+1 \right )^{-2/3} + e^{-i \pi/3} \int_{-1}^1 dx \, x^2 (1-x)^{-1/3} (1+x)^{-2/3} \\ + e^{i \pi/3} \int_1^{-1} dx \, x^2 (1-x)^{-1/3} (1+x)^{-2/3}$$

Note that we defined the limits of the first integral so that no branch cut on the negative real axis is traversed. There is no branch cut for $x \gt 1$. Thus, to deal with the first integral, we may expand the roots for large $R$:

$$\left ( R e^{i \theta}-1 \right )^{-1/3} = R^{-1/3} e^{-i \theta/3} \left (1 - \frac1{R e^{i \theta}} \right )^{-1/3} = R^{-1/3} e^{-i \theta/3} \left [1+\frac1{3 R e^{i \theta}} + \frac{2}{9 R^2 e^{i 2 \theta}} + O \left ( \frac1{R^3} \right ) \right ]$$

$$\left ( R e^{i \theta}+1 \right )^{-2/3} = R^{-2/3} e^{-i 2 \theta/3} \left (1 + \frac1{R e^{i \theta}} \right )^{-1/3} = R^{-2/3} e^{-i 2 \theta/3} \left [1-\frac{2}{3 R e^{i \theta}} + \frac{5}{9 R^2 e^{i 2 \theta}} + O \left ( \frac1{R^3} \right ) \right ]$$

We may extract the dominant piece of each binomial term as above because we have not crossed a branch cut. Thus, the integrand is

$$i R^2 e^{i 2 \theta} - i\frac{1}{3} R e^{i \theta} + i \frac{5}{9} + O \left ( \frac1{R} \right )$$

It is important to see that all terms in the expansion vanish upon integration over $\theta \in (-\pi,\pi)$, except the constant term. This is the so-called residue at infinity.

By Cauchy's theorem, the contour integral is zero. Thus

$$i 2 \pi \frac{5}{9} -i 2 \sin{\frac{\pi}{3}} \int_{-1}^1 dx \, x^2 (1-x)^{-1/3} (1+x)^{-2/3} = 0$$

or

$$\int_{-1}^1 dx \, x^2 (1-x)^{-1/3} (1+x)^{-2/3} = \frac{10 \pi}{9 \sqrt{3}}$$

• Is there some way of solving this by appealing to beta functions ? Mathematica certainly seems to point in that direction. But I don't know how to “get rid” of the $1+x$ factor. – Lucian Mar 14 '15 at 16:40
• @Lucian: I think there is, but don't hold me to it. This way is way more interesting. To me anyway. – Ron Gordon Mar 14 '15 at 16:43

With these types of integrals usually what is being asked for is to use two branches of the logarithm whose cuts cancel outside of the integration interval.

Suppose we seek to compute $$Q = \int_{-1}^1 \frac{x^2}{\sqrt{(1-x)(1+x)^2}} dx.$$

Re-write this as $$\int_{-1}^1 z^2 \exp(-1/3\mathrm{LogA}(1-z)) \exp(-2/3\mathrm{LogB}(1+z)) dz$$ and call the function $f(z).$

We must choose two branches of the logarithm $\mathrm{LogA}$ and $\mathrm{LogB}$ so that the cut is on the real axis from $-1$ to $1.$ This is accomplished when $\mathrm{LogA}$ has the cut on the negative real axis and $\mathrm{LogB}$ on the positive real axis. The argument of $\mathrm{LogA}$ is in $(-\pi, \pi]$ and of $\mathrm{LogB}$ is in $[0,2\pi).$ With these definitions we have for $x\lt 1$ that $\mathrm{LogA}(1-x) = \log(1-x)$ and for $x\gt -1$ that $\mathrm{LogB}(1+x) = \log(1+x)$ (both just above the cut) which means the complex function agrees with the real one on the integration interval.

In order to be rigorous we also need to show continuity across the two overlapping cuts on $(1, \infty)$ as shown in this MSE link. The key idea here is to note that just above $(1,\infty)$ we get the factor $$\exp(-1/3(-\pi i)-2/3\times 0)=\exp(1/3\pi i)$$ and just below we get $$\exp(-1/3(\pi i)-2/3(2\pi i))=\exp(-5/3\pi i)$$ and these two agree.

Suppose the dogbone contour is traversed counterclockwise. Then $\mathrm{LogA}$ gives the real value just below the cut but $\mathrm{LogB}$ contributes a factor of $\exp(2\pi i \times - 2/3).$ Above the cut $\mathrm{LogA}$ again produces the real value but so does $\mathrm{LogB}.$ As there are no finite poles this implies that

$$Q\times (\exp(-4/3\pi i)-1) = - 2\pi i \times \mathrm{Res}_{z=\infty} f(z).$$

Now for the residue at infinity we use the formula $$\mathrm{Res}_{z=\infty} h(z) = \mathrm{Res}_{z=0} \left[-\frac{1}{z^2} h\left(\frac{1}{z}\right)\right].$$

In a neighborhood of infinity we have $$\mathrm{LogA}(1-z) = \mathrm{LogA}(-z) - \sum_{q\ge 1} \frac{1}{q z^q}$$ and furthermore $$\mathrm{LogB}(1+z) = \mathrm{LogB}(z) - \sum_{q\ge 1} \frac{(-1)^q}{q z^q}$$

This gives $$-\frac{1}{z^2} f\left(\frac{1}{z}\right) = -\frac{1}{z^4} \exp(-1/3\mathrm{LogA}(-1/z)) \exp\left(1/3\sum_{q\ge 1} \frac{z^q}{q}\right) \\ \times \exp(-2/3\mathrm{LogB}(1/z)) \exp\left(2/3\sum_{q\ge 1} (-1)^q \frac{z^q}{q}\right).$$

We need a careful evaluation of the product $$\exp(-1/3\mathrm{LogA}(-1/z))\exp(-2/3\mathrm{LogB}(1/z))$$ in a neighborhood of zero.

Suppose $z= R \exp(i\theta)$ with $\theta\in[0,\pi)$ we get in the upper half plane ($\epsilon$ might be a more fitting choice for the modulus) $$\exp(-1/3\times(-\log R + \pi i - i\theta)) \exp(-2/3\times(-\log R + 2\pi i - i\theta))$$ which yields $$\exp(\log R + i\theta) \exp(-5/3\pi i) = z \exp(-5/3\pi i).$$ For the lower half plane let $\theta\in[\pi, 2\pi)$ we get (yes this is supposed to be the same) $$\exp(-1/3\times(-\log R + \pi i - i\theta)) \exp(-2/3\times(-\log R + 2\pi i - i\theta))$$ which again yields $$\exp(\log R + i\theta) \exp(-5/3\pi i) = z \exp(-5/3\pi i).$$

Returning to the main thread we have $$-\frac{1}{z^2} f\left(\frac{1}{z}\right) = -\frac{1}{z^4} \times z \times \exp(-5/3\pi i) \\ \times \exp\left(1/3\sum_{q\ge 1} \frac{z^q}{q}\right) \exp\left(2/3\sum_{q\ge 1} (-1)^q \frac{z^q}{q}\right).$$

We seek $$-[z^2] \exp\left(1/3\sum_{q\ge 1} \frac{z^q}{q}\right) \exp\left(2/3\sum_{q\ge 1} (-1)^q \frac{z^q}{q}\right).$$

This can be extracted by direct substitution of the initial terms into the exponential series (this is the rigorous option) or using the fact that the two sums converge in a neighborhood of zero to $$\log\frac{1}{1-z} \quad\text{and}\quad \log\frac{1}{1+z}$$ so that we can use the Newton binomial on $$\frac{1}{(1-z)^{1/3}} \quad\text{and}\quad \frac{1}{(1+z)^{2/3}}.$$

Note that $$\frac{1}{(1-z)^{1/3}} = 1+{\frac {1}{3}}z+{\frac {2}{9}}{z}^{2}+{\frac {14}{81}}{z}^{3}+O \left( {z}^{4} \right)$$ and $$\frac{1}{(1+z)^{2/3}} = 1-{\frac {2}{3}}z+{\frac {5}{9}}{z}^{2}-{\frac {40}{81}}{z}^{3}+O \left( {z}^{4} \right)$$

so that the desired coefficient is $$\frac{2}{9}+\frac{5}{9} - \frac{2}{9} = \frac{5}{9}$$ for a final result of $$-2\pi i \times -\frac{5}{9} \times \frac{\exp(-5/3\pi i)}{\exp(-4/3\pi i)-1} = -2\pi i \times -\frac{5}{9} \times \frac{1/2+1/2i\sqrt{3}}{-3/2+1/2i\sqrt{3}} \\ = \frac{10\pi\sqrt{3}}{27} = \frac{10\pi}{9\sqrt{3}}.$$

Remark. It really helps to think of the map from $z$ to $-z$ as a $180$ degree rotation when one tries to visualize what is happening here.

Acknowledgement. This post relies on ideas by @RonGordon from his initial response.

Here is a real-analysis solution for comparison. Staring with the substitution $x\mapsto2x-1$: \begin{align} \int_{-1}^1\frac{x^2\,\mathrm{d}x}{\sqrt{(1-x)(1+x)^2}} &=\int_0^1\frac{(2x-1)^2\,\mathrm{d}x}{\sqrt{(1-x)x^2}}\\ &=4\int_0^1x^{4/3}(1-x)^{-1/3}\,\mathrm{d}x\\ &-4\int_0^1x^{1/3}(1-x)^{-1/3}\,\mathrm{d}x\\ &+\int_0^1x^{-2/3}(1-x)^{-1/3}\,\mathrm{d}x\\ &=4\mathrm{B}\left(\tfrac73,\tfrac23\right) -4\mathrm{B}\left(\tfrac43,\tfrac23\right) +\mathrm{B}\left(\tfrac13,\tfrac23\right)\\ &=4\frac{\Gamma\left(\frac73\right)\Gamma\left(\frac23\right)}{\Gamma(3)} -4\frac{\Gamma\left(\frac43\right)\Gamma\left(\frac23\right)}{\Gamma(2)} +\frac{\Gamma\left(\frac13\right)\Gamma\left(\frac23\right)}{\Gamma(1)}\\ &=\frac89\Gamma\left(\tfrac13\right)\Gamma\left(\tfrac23\right) -\frac43\Gamma\left(\tfrac13\right)\Gamma\left(\tfrac23\right) +\Gamma\left(\tfrac13\right)\Gamma\left(\tfrac23\right)\\ &=\frac59\Gamma\left(\tfrac13\right)\Gamma\left(\tfrac23\right)\\ &=\frac59\pi\csc(\pi/3)\\ &=\frac{10\sqrt3}{27}\pi \end{align} Using Euler's Reflection Formula proven in this answer.

Defining the integrand analytically on $\mathbb{C}\setminus[-1,1]$ allows us to compute two integrals which are equal by Cauchy's Integral Theorem; one close to $[-1,1]$ in $(5)$, and the other around a large circle in $(6)$.

For $z\in\mathbb{C}\setminus[-1,1]$, we can define $$\log\left(\frac{1+z}{1-z}\right)=\frac\pi2i+\int_i^z\left(\frac1{w+1}-\frac1{w-1}\right)\,\mathrm{d}w\tag{1}$$ where the contour of integration avoids the real interval $[-1,1]$. This is well-defined since the difference of any two such contours circles both singularities equally and so their residues cancel.

Along the {top,bottom} of $[-1,1]$, $\log\left(\frac{1+z}{1-z}\right)=\log\left(\frac{1+x}{1-x}\right)+\{0,2\pi i\}$

We can then set $$\frac{z^2}{\sqrt{(1-z)(1+z)^2}}=\frac{z^2}{1+z}\exp\left(\frac13\log\left(\frac{1+z}{1-z}\right)\right)\tag{2}$$ Along the {top,bottom} of $[-1,1]$, $$\frac{z^2}{\sqrt{(1-z)(1+z)^2}}=\frac{x^2}{\sqrt{(1-x)(1+x)^2}}\left\{1,e^{2\pi i/3}\right\}\tag{3}$$ As $|z|\to\infty$, \begin{align} \frac{z^2}{\sqrt{(1-z)(1+z)^2}} &=\frac{z}{\sqrt{\left(1-\frac1z\right)\left(1+\frac1z\right)^2}}e^{\pi i/3}\\ &=e^{\pi i/3}\left(z-\frac13+\frac5{9z}-\frac{23}{81z^2}+\dots\right)\tag{4} \end{align} Thus, the residue around $[-1,1]$ is $e^{\pi i/3}\frac59$.

Using $(3)$, the integral counterclockwise around $[-1,1]$ is $$\oint\frac{z^2}{\sqrt{(1-z)(1+z)^2}}\,\mathrm{d}z =\left(e^{2\pi i/3}-1\right)\int_{-1}^1\frac{x^2}{\sqrt{(1-x)(1+x)^2}}\,\mathrm{d}x\tag{5}$$ The integral along the circles around the singularities vanishes since the integrand has order $-\frac13$ and $-\frac23$ near the singularities.

Using $(4)$, the integral around a large counterclockwise circle is $$\oint\frac{z^2}{\sqrt{(1-z)(1+z)^2}}\,\mathrm{d}z =2\pi i\,e^{\pi i/3}\frac59\tag{6}$$ Comparing $(5)$ and $(6)$ yields \begin{align} \int_{-1}^1\frac{x^2}{\sqrt{(1-x)(1+x)^2}}\,\mathrm{d}x &=\frac{2\pi i\,e^{\pi i/3}\frac59}{e^{2\pi i/3}-1}\\ &=\frac{5\pi}{9\sin\left(\frac\pi3\right)}\\ &=\frac{10\sqrt3}{27}\pi\tag{7} \end{align}