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.
nand $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