Need for Absolute Value in Integrand When Contour Integrating

97 Views Asked by At

Evaluate $$\int_0^{\infty} \frac{(\log x)^2}{1+x^2} dx$$ using contour integration.

First step:

$$\oint \frac{(\log z)^2}{1+z^2} dz$$ the path taken and branch cut are as shown: enter image description here

The residue at $z=i$ is equal to $i\frac{π^2}{8}$, and so

$$\oint \frac{(\log z)^2}{1+z^2} dz = \int_{-R}^{-ε} \frac{(\log x)^2}{1+x^2} dx + \int^0_π\frac{\log εe^{iθ}}{1+ε^2e^{2iθ}}iεe^{iθ}dθ +\int_{ε}^{R} \frac{(\log x)^2}{1+x^2} dx + \int^π_0\frac{\log Re^{iθ}}{1+R^2e^{2iθ}}iRe^{iθ}dθ =-π^3/4 $$ by Cauchy's integral formula.

In the limit $R\rightarrow \infty$ and $ε\rightarrow 0$ the integrals around the large and small semi-circles are supressed as $(\log R)^2/R$ and $ε(\log ε)^2$ respectively, so we are left with:

$$\int_{-R}^{-ε} \frac{(\log x)^2}{1+x^2} dx +\int_{ε}^{R} \frac{(\log x)^2}{1+x^2} dx =-π^3/4 $$

To continue from here, at first I try

$$\int_{-\infty}^{0} \frac{(\log x)^2}{1+x^2} dx +\int_{0}^{\infty} \frac{(\log x)^2}{1+x^2} dx =2\int_{0}^{\infty} \frac{(\log x)^2}{1+x^2} dx =-π^3/4 $$

but it turns out this answer is off by a minus sign.

The correct method (according to my textbook) is instead to do

$$\oint \frac{(\log z)^2}{1+z^2} dz = \int_{-R}^{-ε} \frac{(\log (|x|e^{iπ}))^2}{1+x^2} dx +\int_{ε}^{R} \frac{(\log x)^2}{1+x^2} dx = -π^3/4 $$ and then expand out the$ (\log (|x|e^{iπ}))^2 = (\log |x|)^2+2iπ\log |x|-π^2$ and compare real and imaginary parts to the RHS.

I don't understand why we should have go from $$\int_{-R}^{-ε} \frac{(\log x)^2}{1+x^2} dx $$ to $$\int_{-R}^{-ε} \frac{(\log (|x|e^{iπ}))^2}{1+x^2} dx \left( = \int_{-R}^{-ε} \frac{(\log (-x))^2}{1+x^2} dx (?)\right)$$ to get the integral to work.

I understand vaguely there is some notion of keeping track of the angle θ in contour integration to avoid issues with branch cuts etc., but in this particular case I don't see how its relevant. Also the change that has been made seems to introduce a minus sign in the log where the previously wasn't one (the RHS in curved brackets). Could someone explain why my textbook's method works?

2

There are 2 best solutions below

0
On BEST ANSWER

First, the complex logarithm $\log(z)$ is defined as $\log(z)=\log(|z|)+i\arg(z)$, where $\arg(z)$ is multi-valued. With the branch cut along the non-negative real axis, $\arg(z)\in [0,2\pi)$.

On the negative real axis, $\arg(z)=\pi$ and $\log(z)=\log(|z|)+i\pi=\log(|x|)+i\pi$. Then, we can write

$$\begin{align} \int_{-R}^{-\varepsilon} \frac{\log^2(z)}{z^2+1}\,dz+\int_\varepsilon^R \frac{\log^2(z)}{z^2+1}\,dz&=\int_{-R}^{-\varepsilon} \frac{(\log(|x|)+i\pi)^2}{x^2+1}\,dx+\int_\varepsilon^R \frac{\log^2(x)}{x^2+1}\,dx\\\\ &=\int_\varepsilon^R \frac{2\log^2(x)+i2\pi \log(x)-\pi^2}{x^2+1}\,dx \end{align}$$

Can you finish now?

0
On

If you use the principal branch of Log then the function $(\text{Log}(z))^2/ (z^2+1)$ will not be analytic on your closed contour, lets call it $\alpha$. Therefore, the Residue theorem is not applicable.

To prevent this problem you can choose a different branch of the Log function, for instance take $\text{Log}^*(z):= \log|z| + i\cdot \text{arg}(z)$ for $z \in \mathbf{C}$ with $ -\pi /2 < \text{arg}(z) \leq 3\pi/2$. Note that this branch $\text{Log}^*$ will be analytic on $U = C\backslash \{ z \in \mathbf{C}: \text{Im}(z) \leq 0\, \text{and}\, \text{Re}(z) = 0\}$. Perhaps the notation $\text{Log}^*$ might be a bit confusing, just bear in mind that this corresponds to the Log function. Now you can see that $\text{Log}^*(z)^2 := ( \log|z| + i\cdot \text{arg}(z))^2 = (\log|z|)^2 + 2i\log|z| \cdot \text{arg}(z) - \text{arg}(z)$.

Lets define $f(z):= \frac{\text{Log}^*(z)^2}{z^2+1}$ and $I := \int^{\infty}_0 \frac{\log(x)^2}{x^2+1}dx$. We look at the integral: \begin{align*} \int_{\alpha} f(z) dz \end{align*} Now you can use the Residue-theorem because $f$ is analytic on the contour $\alpha$. You can show again that: \begin{align*} \int_{\alpha} f(z) dz = -\frac{\pi^3}{4}. \end{align*} You can then show (again) that $\int_{C_R} f(z) dz \xrightarrow[R \to \infty]{} 0$ and $\int_{C_\epsilon} f(z) dz \xrightarrow[\epsilon \to 0]{} 0$ (use that $\text{arg}(z)$ is just a constant not greater than $3\pi/2$).

Lets define $\Gamma_1$ to be the line from $\epsilon$ to $R$ and $\Gamma_3$ the line from $-\epsilon$ to $-R$. For $\Gamma_1$ you see that: \begin{align*} \int_{\Gamma_1} f(z) dz \xrightarrow[R \to \infty]{\epsilon \to 0} \int^{\infty}_0 \frac{\text{Log}^*(t)^2}{1+t^2}dt =: I. \end{align*} Where I use in the last equality that $\text{Log}^*|_{\mathbf{R}} = \log$. Furthermore, using that $\text{Log}^*(z) := \log|z| + i \cdot \text{arg}(z)$ you see that: \begin{align*} \int_{\Gamma_3} f(z) dz \xrightarrow[R \to \infty]{\epsilon \to 0} \int^0_{-\infty} \frac{(\log|t| +i\pi)^2}{t^2+1} dt = \int^0_{-\infty} \frac{\log|t|^2}{t^2+1} dt + 2\pi i \int^0_{-\infty} \frac{\log|t|}{t^2+1}dt - \int^{0}_{-\infty} \frac{\pi^2}{t^2+1}dt. \end{align*} And I believe that this clarifies the step you didn't understand. Notice that you still have a minus sign in the $\int_{\alpha} f(z) dz = -\frac{\pi^3}{4}$, so that wasn't a problem.

Continuing the calculation, because the function $\frac{\log|t|^2}{t^2+1}$ is even (symmetric about zero), we see that $$ \int^0_{-\infty} \frac{\log|t|^2}{t^2+1} dt =:I. $$ You can then show using real analyis that: \begin{align*} \int^0_{-\infty} \frac{\log|t|}{t^2+1}dt = 0\, \text{and}\, - \int^{0}_{-\infty} \frac{\pi^2}{t^2+1}dt = -\frac{\pi^3}{2}. \end{align*} Then you can draw your conclusion that $I = \pi^3/8$.