4

Show that $$\int_{-\infty}^\infty \frac{\log\left(\sqrt{x^2+a^2}\right)}{x^2+b^2}\,dx = \frac{\pi}{b}\log\left(a+b\right)$$

for $a,b>0\in\mathbb{R}$. I stumbled on this answer empirically, but I'm not sure how to solve it directly.

Tom D.
  • 43
  • Hint: Take out the square root to get $$\frac{1}{2}\int_{-\infty}^\infty \frac{\log(x^2+a^2)}{x^2+b^2},dx$$ which should be a little more managable – Brevan Ellefsen Feb 11 '17 at 01:42
  • At this point a simple integration by parts should change your integral into something more manageable if I am not mistaken. Even better perhaps would be differentiating under the integral sign with respect to $b$, along with converting $\arctan(x)$ to it's complex form. – Brevan Ellefsen Feb 11 '17 at 01:46
  • Do you really want to attack this with complex analysis methods? I see now that your tags imply this. – Brevan Ellefsen Feb 11 '17 at 01:46
  • Proper substitutions could also probably attack this, as long as you note that the function is even first and adjust the integration bounds to avoid any bijection issues when substituting. I can attack your problem with whatever method you wish :D – Brevan Ellefsen Feb 11 '17 at 01:50
  • I was attempting to use Cauchy's Residue Theorem with a contour that wraps around the negative imaginary half-plane. The problem is that I'm not sure how to deal with the branch points at $\pm ia$. The residue associated with the singularity at $-ib$ at least gives me something along the lines of $\frac{\pi}{b}\log(a+b)$. – Tom D. Feb 11 '17 at 01:59

3 Answers3

9

It's easy to see that your integral is the same as $$ I(a) = \int_0^{\infty} \frac{\log{(x^2+a^2)}}{x^2+b^2} \, dx $$ Now, we can do the case $a=0$ fairly easily, by setting $x=b^2/y$: $$ \begin{align} I(0) &= 2\int_0^{\infty} \frac{\log{x}}{x^2+b^2} \, dx \\ &= 2\int_0^{\infty} \frac{\log{(b^2/y)}}{b^2/y^2+b^2} \frac{b}{y^2} \, dy \\ &= 2\int_0^{\infty} \frac{2\log{b}-\log{y}}{y^2+b^2} \, dy \\ &= 4\log{b} \int_0^{\infty} \frac{dy}{y^2+b^2} -I(0), \end{align} $$ so $$ I(0) = \frac{\pi}{b}\log{b}. $$ To get from here to nonzero $a$, differentiate under the integral sign: $$ I'(a) = \int_0^{\infty}\frac{\partial}{\partial a} \frac{\log{(x^2+a^2)}}{x^2+b^2} \, dx = \int_0^{\infty} \frac{2a \, dx}{(x^2+a^2)(x^2+b^2)} $$ But this is easy to calculate using partial fractions: we find $$ I'(a) = \frac{2a\pi}{2(b^2-a^2)} \left( \frac{1}{a} - \frac{1}{b} \right) = \frac{\pi}{b(a+b)} $$ Now $$ I(a) = I(0) + \int_0^{a} \frac{\pi}{b(A+b)}\, dA = \frac{\pi}{b}(\log{(b+a)}-\log{b}+\log{b}) = \frac{\pi}{b}\log{(a+b)}, $$ as desired.


A complex analysis method will work in the same way as that given in this answer, although the pole is in a different place from the branch point in your case, rather than coincident.

Chappers
  • 67,606
  • Nice, +1. I might still try some of the ideas I posted in the comments to attack this if I find time later – Brevan Ellefsen Feb 11 '17 at 02:31
  • FWIW, I don't think integrating by parts will help in this case: you just get back the same integral with $a \leftrightarrow b$. But by all means feel free to have a crack yourself: I'm not convinced this is the best way, but having marked people's work on a complex analysis course with a similar question, I can tell you the complex analysis way's very messy if not done carefully. – Chappers Feb 11 '17 at 02:34
  • yeah, I noticed that, which is why I would probably attack other methods. For what's its worth, the symmetry $a \leftrightarrow b$ might be able to be used to solve this. Would be interesting for sure – Brevan Ellefsen Feb 11 '17 at 02:36
  • Always happy to meet another person with good taste in integrals ;). – Chappers Feb 11 '17 at 02:47
  • Oh, and by the way, a trig. substitution turns this into $\int_0^{\pi/2} \log{(a^2+b^2\tan^2{y})} , dy/b$, although I'm not convinced that helps much in this particular case. – Chappers Feb 11 '17 at 02:53
3

Suppose $a \gt b$ for now. Consider the contour integral in the complex plane

$$\oint_C dz \frac{\log{\left ( z^2+a^2 \right )}}{z^2+b^2} $$

where $C$ is a semicircle of radius $R$ in the upper half-plane with a detour down and up the imaginary axis about the branch point $z=i a$. In the limit as $R \to \infty$, the contour integral is equal to

$$\int_{-\infty}^{\infty} dx \frac{\log{\left ( x^2+a^2 \right )}}{x^2+b^2} + i \int_{\infty}^a dy \frac{\log{\left ( y^2-a^2 \right )}+i \pi}{b^2-y^2} + i \int_a^{\infty} dy \frac{\log{\left ( y^2-a^2 \right )}-i \pi}{b^2-y^2}$$

Note that the log terms in the latter two integrals vanish. Now, the contour integral is also equal to the residue of the pole of the integrand at $z=i b$. Thus

$$\int_{-\infty}^{\infty} dx \frac{\log{\left ( x^2+a^2 \right )}}{x^2+b^2} - 2 \pi \int_a^{\infty} \frac{dy}{y^2-b^2} = i 2 \pi \frac{\log{\left ( a^2-b^2 \right )}}{i 2 b} $$

Accordingly, after doing out that second integral and performing a little algebra, we get...

$$\frac12 \int_{-\infty}^{\infty} dx \frac{\log{\left ( x^2+a^2 \right )}}{x^2+b^2} = \frac{\pi}{b} \log{\left ( a+b \right )} $$

ADDENDUM

For $a \lt b$, the answer is the same as above but the contour is altered. This time, the contour $C$ must detour about the pole at $z=i b$ along each side of the branch cut with a semicircle of radius $\epsilon$. The contour integral is this equal to

$$\int_{-\infty}^{\infty} dx \frac{\log{\left ( x^2+a^2 \right )}}{x^2+b^2} + i PV \int_{\infty}^a dy \frac{\log{\left ( y^2-a^2 \right )}+i \pi}{b^2-y^2} + i PV \int_a^{\infty} dy \frac{\log{\left ( y^2-a^2 \right )}-i \pi}{b^2-y^2} \\ + i \epsilon \int_{\pi/2}^{-\pi/2} d\phi \, e^{i \phi} \frac{\log{\left [- \left (i b + \epsilon e^{i \phi} \right )^2-a^2 \right ]}+i \pi}{\left (i b + \epsilon e^{i \phi} \right )^2+b^2}+ i \epsilon \int_{3 \pi/2}^{\pi/2} d\phi \, e^{i \phi} \frac{\log{\left [ -\left (i b + \epsilon e^{i \phi} \right )^2-a^2 \right ]}-i \pi}{\left (i b + \epsilon e^{i \phi} \right )^2+b^2}$$

Note that the sum of the two final integrals - the pieces that go around the pole - is equal to the residue of the pole at $z=i b$ in the limit as $\epsilon \to 0$. The $\pm i \pi$ pieces cancel. Also note that the principal value integrals are the same as the corresponding integrals above for $a \gt b$. Thus, the result for $a \lt b$ is the same as that for $a \gt b$.

Ron Gordon
  • 138,521
  • What if $a < b$? –  Feb 11 '17 at 22:48
  • 1
    Then we have to go around the pole on each side of the branch cut. I will illustrate when I have time later. – Ron Gordon Feb 12 '17 at 00:00
  • +1 For your answer. I never understood how to properly choose a contour, that is why I cannot apply complex integration for improper integrals. Could you tell me why you did include the $bi$ in the contour but not $ai$? Because it is a branch cut for the logarithm? – MrYouMath Feb 12 '17 at 13:09
  • 2
    @MrYouMath: Contours are a lot easier to think about if you treat all singularities the same, whether pole or branch point. That is, all such singularities should remain outside of an integration contour. The residue theorem is true because the integrals about the pieces of the contour that extend out to a pole cancel, but those same pieces that extend out to a branch point do not cancel. (See above.) Thus, we can then "allow" the pole at $z=i b$ to remain "inside" the contour but not the branch point at $z=i a$. – Ron Gordon Feb 12 '17 at 13:17
  • 2
    Thank you a lot for your answer. I should really force myself to do some exercise with contour integrals, this technique is just too powerful to be ignored :D. – MrYouMath Feb 12 '17 at 14:18
1

$\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,} \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace} \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack} \newcommand{\dd}{\mathrm{d}} \newcommand{\ds}[1]{\displaystyle{#1}} \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,} \newcommand{\ic}{\mathrm{i}} \newcommand{\mc}[1]{\mathcal{#1}} \newcommand{\mrm}[1]{\mathrm{#1}} \newcommand{\pars}[1]{\left(\,{#1}\,\right)} \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,} \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}} \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$ enter image description here

\begin{align} &\bbox[15px,#ffd]{\int_{-\infty}^{\infty}{\ln\pars{\root{x^{2} + a^{2}}} \over x^{2} + b^{2}}\,\dd x} = \Re\int_{-\infty}^{\infty}{\ln\pars{a + \ic x} \over x^{2} + b^{2}}\,\dd x \\[5mm] \stackrel{\large x\ =\ \pars{a - s}\ic}{\large\vphantom{A}=}\,\,\,& \Re\int_{\large a - \infty\ic}^{\large a + \infty\ic} {\ln\pars{s} \over \bracks{\pars{a - s}\ic + b\ic}\bracks{\pars{a - s}\ic - b\ic}} \,\pars{-\ic}\,\dd s \\[5mm] = &\ -\Im\int_{\large a - \infty\ic}^{\large a + \infty\ic} {\ln\pars{s} \over \bracks{s - \pars{a + b}}\bracks{s - \pars{a - b}}}\,\dd s \\[5mm] = &\ -\Im\bracks{-2\pi\ic {\ln\pars{a + b} \over \pars{a + b} - \pars{a - b}}} = \bbx{{\pi \over b}\ln\pars{a + b}} \end{align} $\ds{\ln}$ is the logarithm principal branch. The contribution to the integral from the arc vanishes out $\ds{\pars{~\mbox{its magnitude is}\ < {\pi\ln\pars{R} \over R}\ \mbox{as}\ R \to \infty~}}$ as the arc radius $\ds{R \to \infty}$.

Felix Marin
  • 89,464