2

This is my first question on MSE, so please overlook any mistakes I may have unknowingly committed.

I was attempting to find the value of this integral

$$ \int_0^\infty e^{-x^2} (\mathrm{ln}x)^2 dx$$

So I tried using Feynman's trick to solve this problem by defining a function

$$I(a) = \int_0^\infty e^{-x^2} (\mathrm{ln}(ax))^2\mathrm{d}x$$

Then

$$I'(a) = \int_0^\infty e^{-x^2} 2(\mathrm{ln}(ax))\cdot \frac{1}{ax} \cdot x \mathrm{d}x = \frac{2}{a}\cdot \int_0^\infty e^{-x^2}\mathrm{ln}(ax) \mathrm{d}x $$

$$I''(a) = \frac{2}{a^2}\cdot \int_0^\infty e^{-x^2}dx -\frac{2}{a^2}\cdot \int_0^{\infty}e^{-x^2} (\mathrm{ln}(ax))\mathrm{d}x$$

Observing that $$\int_0^\infty e^{-x^2} \mathrm{d}x = \frac{\sqrt{\pi}}{2}$$

We can rewrite $I''(a)$ as $$I''(a) = \frac{\sqrt{\pi}}{a^2} - \frac{I'(a)}{a}$$

Or, $$I''(a) + \frac{I'(a)}{a} = \frac{\sqrt{\pi}}{a^2}$$

Solving this differential equation, I got:

$$I(a) = \frac{\sqrt{\pi}}{2} (\ln(a))^2 + c_1\ln(a) + c_2$$

But I am unable to determine what $c_1$ and $c_2$ should be, since we don't know the values of the initial parameters.

Please help me determine the exact values of $c_1$ and $c_2$ specifically.

I would greatly appreciate your help in this regard. Thank you very much.

  • 2
    Review https://math.stackexchange.com/questions/1448258/integrating-int-limits-0-inftye-x2-lnxdx and https://math.stackexchange.com/questions/2471418/integral-int-0-infty-logx2-e-x-mathrmdx?rq=1 – Axion004 Jan 05 '24 at 17:58
  • 1
    As this integral is extremely well known, there are many Youtube videos: https://www.youtube.com/watch?v=lNTpB5OvsHY – Axion004 Jan 05 '24 at 18:00
  • 5
    $$ \int_0^\infty e^{-x^2} \ln^2 x\ dx = \frac{\pi^{5/2}}{16}+ \frac{\pi^{1/2}}8(\gamma+2\ln2)^2 $$ – Quanto Jan 05 '24 at 18:14
  • 2
    @Quanto Seems to match with my answer, thanks for confirming. –  Jan 05 '24 at 18:16
  • https://math.stackexchange.com/q/2471418/121671 – Mittens Jan 05 '24 at 21:28
  • 1
    For general n and $n>0$: $\int_0^{\infty } \exp \left(-x^2\right) \log ^n(a x) , dx=\underset{s\to 0}{\text{lim}}\frac{\partial ^n}{\partial s^n}\left(\frac{1}{2} a^{-1-2 \left(-\frac{1}{2}-\frac{s}{2}\right)} \Gamma \left(\frac{1+s}{2}\right)\right)$ – Mariusz Iwaniuk Jan 06 '24 at 11:43

1 Answers1

6

Consider the integral

$$I(t) = \int_0^{\infty} e^{-u^2}\cdot u^t\cdot \mathrm{d}u$$

Substituting $x=u^2$, we get:

$$I(t) = \int_0^{\infty} e^{-x}\cdot x^{\frac{t}{2}} \cdot \frac{1}{2\sqrt{x}} dx$$

$$I(t) = \frac{1}{2}\cdot \int_0^{\infty} e^{-x}\cdot x^{\frac{t-1}{2}} \cdot dx$$

$$I(t) = \frac{1}{2}\cdot \Gamma \left(\frac{t+1}{2}\right)$$

Note that

$$I'(t) = \int_0^{\infty} e^{-u^2}\cdot u^t \cdot \mathrm{ln}u \mathrm{d}u = \frac{1}{2}\cdot \frac{d}{dt} \Gamma \left(\frac{t+1}{2}\right) = \frac{1}{2} \cdot \frac{1}{2} \cdot \Gamma\left(\frac{t+1}{2}\right) \psi^0 \left(\frac{t+1}{2}\right)$$

Where $\psi(x)$ is the polylogarithm function.

It follows that

$$I''(t) = \int_0^{\infty} e^{-u^2}\cdot u^t \cdot (\mathrm{ln}u)^2 du = \frac{1}{8} \cdot \Gamma \left(\frac{t+1}{2}\right)\cdot \left[\left(\psi^0 \left(\frac{t+1}{2}\right)\right)^2 + \left(\psi^1 \left(\frac{t+1}{2}\right)\right)\right]$$

Plugging $t=0$, we get the required integral

$$I''(0) = \frac{1}{8} \cdot \Gamma \left(\frac{1}{2}\right)\cdot \left[\left(\psi^0 \left(\frac{1}{2}\right)\right)^2 + \left(\psi^1 \left(\frac{1}{2}\right)\right)\right]$$

Where

$$\Gamma(\frac{1}{2}) = \sqrt{\pi}$$

$$\psi^1\left(\frac{1}{2}\right) = \frac{\pi^2}{2}$$

Which can be derived from the reflection formula, and

$$\psi^0 \left(\frac{1}{2}\right) = -\gamma - 2\ln2$$

Which follows from the half-integer definition of the Polygamma function.

Thus the integral can be written as

$$I = \int_0^{\infty} e^{-x^2} (\mathrm{ln}x)^2 dx = \frac{\sqrt{\pi}}{8} \cdot \left[(\gamma + 2\ln2)^2 + \frac{\pi^2}{2}\right]$$

Addendum:

This value of the integral can maybe help you evaluate a general expression for $I(a)$. Setting $a=1$, we get:

$$ \frac{\pi^2 \sqrt{\pi}}{16} + \frac{\sqrt{\pi}}{8}(\gamma + 2\ln2)^2 = c_2$$

As for $c_1$, we shall differentiate both sides with $a$ and obtain an expression. We obtain:

$$\frac{2}{a} \cdot \int_0^{\infty} e^{-x^2} \ln(ax) dx = \frac{\sqrt{\pi} \mathrm{ln}a}{a} + c_1$$

Putting $a=1$, we get:

$$2 \cdot \int_0^{\infty} e^{-x^2} \ln(x) dx = c_1$$

From this answer, we know that

$$\int_0^{\infty} e^{-x^2} \ln(x) dx = -\frac{1}{4}(\gamma +2\ln(2))\sqrt{\pi} $$

Thus,

$$c_1 = -\frac{1}{2}(\gamma +2\ln(2))\sqrt{\pi} $$

And we have succeeded in obtaining an expression for $I(a)$.