Evaluate $$\int_{0}^{\infty}\frac{\log^2 x}{e^{x^2}}\mathrm{d}x$$.


Thank you for putting the question on hold and leaving me without any idea. Now that I have solved it I think it's a quite nice integral and so I'm glad I managed to do it on my own. Here is my solution.

Exponent with negative argument in integral from $0$ to $\infty$ reminds us of the gamma function. Recall the definition: $\Gamma(s)=\int_{0}^{\infty}e^{-x}x^{s-1}\mathrm{d}x$. In this way the logarithm comes quite naturally as we take derivative of $\Gamma$ using diferentiation under the integral sign. Second power of the $\log$ comes from second derivative of $\Gamma$. The situation is a bit more complicated here, since we have $e$ to the power $x^2$. However this is not a great obstacle - just make the change $x\to\sqrt{x}$. Thus $\int_{0}^{\infty}e^{-x^2}x^{s-1}\mathrm{d}x=\int_{0}^{\infty}e^{-x}x^{\frac{s-1}{2}}\frac{1}{2\sqrt{x}}\mathrm{d}x=\frac{1}{2}\Gamma(\frac{s}{2})$. Hence $$\int_{0}^{\infty}e^{-x^2}\log^2 x =\frac{\mathrm{d}^2}{\mathrm{d}s^2}\Big|_{s=1}\int_{0}^{\infty}e^{-x^2}x^{s-1}\mathrm{d}x=\frac{1}{8}\Gamma''\left(\frac{1}{2}\right).$$ The problem now reduces to finding second derivative of gamma at $\frac{1}{2}$. To find derivatives of $\Gamma$ it is helpful to find derivatives of $\log\Gamma$ - the so-called polygamma function. Representing $\Gamma$ as its Weierstrass factorization and taking $\log$ leads to series which are simple to differentiate and calculate. Recall that $$\Gamma(s)=\frac{e^{-\gamma s}}{s}\prod_{n\ge 1}^{\infty}\left(\left(1+\frac{s}{n}\right)^{-1} e^{s/n}\right).$$ Thus $$\frac{\mathrm{d}}{\mathrm{d}s}\Big|_{s=\frac{1}{2}}\log\Gamma(s)=\frac{\mathrm{d}}{\mathrm{d}s}\Big|_{s=\frac{1}{2}}\left(-\gamma s-\log s+\sum_{n\ge 1}^{\infty}\left(-\log\left(1+\frac{s}{n}\right)+\frac{s}{n}\right)\right)=-\gamma-\frac{1}{s}+\sum_{n\ge 1}^{\infty}\left(-\frac{1}{n+s}+\frac{1}{n}\right)\Big|_{s=\frac{1}{2}}=-\gamma-2+2\sum_{n=1}^{\infty}\frac{1}{2n(2n+1)}=-\gamma+\log 4.$$ Now rewrite $\frac{\mathrm{d}}{\mathrm{d}s}\Big|_{s=\frac{1}{2}}\log\Gamma(s)=\frac{\Gamma'\left(\frac{1}{2}\right)}{\Gamma\left(\frac{1}{2}\right) }$. So we have $$\Gamma'\left(\frac{1}{2}\right)=\Gamma\left(\frac{1}{2}\right)(-\gamma+\log 4)\ (1).$$ In the same manner we find second derivative of $\log\Gamma$ $$\frac{\mathrm{d}^2}{\mathrm{d}s^2}\Big|_{s=\frac{1}{2}}\log\Gamma(s)=\frac{1}{s^2}+\sum_{n\ge 1}^{\infty}\frac{1}{(n+s)^2}\Big|_{s=\frac{1}{2}}=4+4\sum_{n=1}^{\infty}\frac{1}{(2n+1)^2}=\frac{\pi^2}{2}.$$ Again we rewrite the derivative as differentiation of composite function - $\frac{\mathrm{d}^2}{\mathrm{d}s^2}\Big|_{s=\frac{1}{2}}\log\Gamma(s)=-\frac{\Gamma'\left(\frac{1}{2}\right)}{\Gamma\left(\frac{1}{2}\right)^2}+\frac{\Gamma''\left(\frac{1}{2}\right)}{\Gamma\left(\frac{1}{2}\right)}$. Now, taking into consideration what we previously obtained about the second derivative, the result about the first derivative and the fact $\Gamma\left(\frac{1}{2}\right)=\sqrt{\pi}$ we come to equation for the second derivative at $\frac{1}{2}$ which gives us $$\Gamma''\left(\frac{1}{2}\right)=\frac{\sqrt{\pi}}{2}\left(2\gamma^2+\pi^2+4\gamma \log 4+2\log^2 4\right).$$ Now mupltiply by $8$ and get the final result.

  • 2
    $\begingroup$ i know the answer but won't tell it to you until you have shown some own efforts...:p $\endgroup$ – tired Jan 7 '17 at 13:42
  • $\begingroup$ See here. $\endgroup$ – Rohan Jan 7 '17 at 13:45
  • $\begingroup$ Now, now, @tired, one can ask for effort shown without having to be a tease... :) $\endgroup$ – J. M. is a poor mathematician Jan 7 '17 at 13:46
  • 1
    $\begingroup$ @J.M.isn'tamathematician Teasing is fun from time to time ^^ $\endgroup$ – tired Jan 7 '17 at 13:47
  • 2
    $\begingroup$ (+1) Don't get sad, :) this happens a lot that some good questions get closed. As an advice always try to put some motivation for the question or mention some of your thoughts for solving it. Good Luck. :) $\endgroup$ – H. R. Jan 7 '17 at 19:28


$$I(a) = \int_0^{\infty} dx \, x^a\, e^{-x^2} = \frac12 \int_0^{\infty} dy \, y^{(a-1)/2} \, e^{-y} = \frac12 \Gamma \left ( \frac{a+1}{2} \right )$$

The sought-after integral is $I''(0)$, where

$$\begin{align}I''(a) &= \frac14 \frac{d}{da} \left [ \Gamma \left ( \frac{a+1}{2} \right ) \psi \left ( \frac{a+1}{2} \right ) \right ] \\ &= \frac18 \left [ \Gamma \left ( \frac{a+1}{2} \right )^2 \psi \left ( \frac{a+1}{2} \right ) + \Gamma \left ( \frac{a+1}{2} \right ) \psi_1 \left ( \frac{a+1}{2} \right )\right ]\\ I''(0) &= -\frac{\pi}{8} (2 \log{2} + \gamma) + \frac{\pi^{5/2}}{16}\end{align}$$


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.