# Solve $\int_0^\infty \frac{\ln x}{x^2+4} \,\mathrm{d}x$

(Stanford Math Tournament 2012 #8)

I tried rewriting the denominator as $4\left(\frac{x}{2}^2 + 1\right)$ and then integrating by parts, but that got me nowhere...

I then tried the substitution $x = 2\tan u$, which resulted in the integral being $$\frac{1}{2} \int_0^\frac{\pi}{2} \ln (2\tan u) \,\mathrm{d}u.$$

And from this point on I got stuck.

I would appreciate any and all advice on how finish the problem.

Thanks

A

• Did you try setting up a contour integral? – Umberto P. Jan 28 '15 at 12:49
• Stanford claims that all of the tournament's problems can be solved with high-school level calculus (I'm a high school student so I have no experience with contour integrals :P) – A is for Ambition Jan 28 '15 at 12:50
• Integrals are evaluated not solved. "Solve" for what? – Arjang Jan 28 '15 at 13:11

\begin{align}\frac{1}{2} \int\limits_0^\frac{\pi}{2} \ln (2\tan u) \,\mathrm{d}u & = \frac{1}{2} \int\limits_0^\frac{\pi}{2} \ln (2) \,\mathrm{d}u + \frac{1}{2} \int\limits_0^\frac{\pi}{2} \ln (\tan u) \,\mathrm{d}u\\~\\&= \dfrac{\pi \ln 2}{4} + \frac{1}{2} \int\limits_0^\frac{\pi}{2} \ln (\tan u) \end{align}

Now notice below to conclude that the remaining integral evaluates to $0$ : $$I = \int\limits_0^\frac{\pi}{2} \ln (\tan u)du = \int\limits_0^\frac{\pi}{2} \ln (\tan(\frac{\pi}{2}- u))du= \int\limits_0^\frac{\pi}{2} \ln (\cot u) du= -I$$

• Thank you!! I was reading the solution provided by Stanford and got confused when I saw how the integral $\int_0^\frac{\pi}{2} \ln (2\tan u)\,\mathrm{d}u$ could be simplified. I can't believe I forgot that $\ln(a \cdot b) = \ln a + \ln b...$ I guess that means no more math at 5 am. – A is for Ambition Jan 28 '15 at 13:02
• @AisforAmbition I think you mean "I can't believe I forgot that $\ln(ab) = \ln(a) + \ln(b)$".. – Mattos Jan 28 '15 at 13:03
• yup, had already edited it before you commented – A is for Ambition Jan 28 '15 at 13:06

I should also add that this integral may be evaluated using the Residue theorem by considering

$$\oint_C dz \frac{\log^2{z}}{z^2+4}$$

where $C$ is a keyhole contour of outer radius $R$ and inner radius $\epsilon$. In the limits as $R \to \infty$ and $\epsilon \to 0$, the contour integral is equal to

$$-i 4 \pi \int_0^{\infty} dx \frac{\log{x}}{x^2+4} + 4 \pi^2 \int_0^{\infty} \frac{dx}{x^2+4}$$

The contour integral is also equal to $i 2 \pi$ times the sum of the residues at the poles $z_+=2 e^{i \pi/2}$ and $z_-=2 e^{i 3 \pi/2}$:

$$i 2 \pi \left [\frac{\left (\log{2}+i \pi/2 \right )^2}{i 4} + \frac{\left (\log{2}+i 3 \pi/2 \right )^2}{-i 4}\right ] = \frac{\pi}{2} \left (2 \pi^2 - i 2 \pi \log{2} \right )$$

Now,

$$\int_0^{\infty} \frac{dx}{x^2+4} = \frac{\pi}{4}$$

Therefore,

$$\int_0^{\infty} dx \frac{\log{x}}{x^2+4} = \frac{\pi}{4} \log{2}$$

• why the $\log ^2$ ? – Spine Feast Jan 28 '15 at 13:45
• @DepeHb: because when you double back along the real axis, $\log{z} = \log{x} + i 2 \pi$, We then evaluate $\log^2{x} - (\log{x}+i 2 \pi)^2$, and the square terms cancel. – Ron Gordon Jan 28 '15 at 13:47

$$A=\int_0^{\infty}\frac{\ln x}{x^2+4}dx\stackrel{x\to 2u}{=}\frac{1}{2}\left (\int_0^{\infty}\frac{\ln 2}{u^2+1}du+\int_0^{\infty}\frac{\ln u}{u^2+1}du\right )$$

the first integral you can use $u=\tan v$

the second one $\int_0^{\infty}=\int_0^{1}+\int_1^{\infty}=I_1+I_2$

for $I_2=\int_1^{\infty}$ use $v\to 1/v$ then you get $I_2=-I_1$

so our integral equal to $$\int_0^{\infty}\frac{\ln x}{x^2+4}dx\stackrel{x\to 2u}{=}\frac{1}{2}\int_0^{\infty}\frac{\ln 2}{u^2+1}du=\frac{\ln 2}{2}\int_0^{\pi/2}dv$$

Hint: If you had $1$ instead of $4$ in the denominator, what would the value be ? You could try a change of variable that's relevant both for $\ln x$ and ${\rm d}x/(1+x^2)$.

• Would you mind working it out? I got "tunnel vision" from this problem and have reached a mathematical block :\ – A is for Ambition Jan 28 '15 at 12:52
• Whenever you have a degree 2 fraction in the denominator, it's a good idea to try $x = 1/y$, because then ${\rm d}x = -{\rm d}y/y^2$.In this case, ${\rm d}x/(1+x^2) = -{\rm d}y / (1+y^2)$. Try and see what happens for $\int_0^\infty (\ln x){\rm d}x/(x^2+1)$. – Sary Jan 28 '15 at 12:55
• Sorry, I tried that substitution and ended up with $\int_0^\infty -\frac{\ln m}{1+4m^2}\,\mathrm{d}m$, where $x = \frac{1}{m},$ and I don't see how that helps. – A is for Ambition Jan 28 '15 at 12:57
• Perhaps try it first for the integral $\int_0^\infty (\ln x){\rm d}x/(1+x^2)$. Then find some way to reduce to that other integral. – Sary Jan 28 '15 at 13:00

$$I(k)~=~\int_0^\infty\frac{x^{k-1}}{x^n+a^n}dx~=~a^{k-n}\cdot\frac\pi n\cdot\csc\bigg(k\cdot\frac\pi n\bigg)$$

The above identity can easily be proven by letting $x=at$ and $u=\dfrac1{1+t^n}$ , then recognizing the expression of the beta function in the new integral, and using Euler's reflection formula to simplify the final result. Now all that's left to do is evaluating $I'(1)$.