Evaluate $\int_0^\infty \log\left(x^2+t^2\right)e^{-x^2/(2t)}\,dx$? Does anyone know how to integrate and evaluate this? 
\begin{eqnarray}
\int_0^\infty \log\left(x^2+t^2\right)e^{-x^2/(2t)}\,dx
\end{eqnarray}
I have tried through integration by parts, but it diverges when evaluating the integral. I'm trying to get a divergence measure for a stochastic process, where this integral pops up.
Thanks for your time.
 A: A little late to the party here, but I finally managed to get a solution.
From the answer here, and using a trivial rescaling of the integration variable, we can see that:
$$f(a,t)=\int_{0}^{\infty}\frac{dx}{x^2+a}e^{-\frac{x^2}{2t}}=\frac{\pi}{2\sqrt{a}}\text{erfc}\Big(\sqrt{\frac{a}{2t}}\Big)\exp\Big(\frac{a}{2t}\Big)$$
As a function of $a$, the above has an integrable singularity at $a=0$ and is continuous, and therefore the quantity $\int_{0}^{b}f(a,t)da$ converges for any $b \geq 0$ in the generalized integral sense. Also, we observe that the integral $$I(a,t)=\int_{0}^{\infty}dx\ln(x^2+a)e^{-\frac{x^2}{2t}}$$ converges for all $a\geq 0$ as well. Hence we can safely write that:
$$I(a,t)-I(0,t)=\int_{0}^{\infty}dx ~e^{-x^2/2t}\int_{0}^{a}\frac{da'}{x^2+a'}\Rightarrow \\I(a,t)=2\int_{0}^{\infty}dx\ln x ~e^{-x^2/2t}+\pi\int_{0}^{a}\frac{d\alpha}{2\sqrt{\alpha}}\text{erfc}\Big(\sqrt{\frac{\alpha}{2t}}\Big)\exp\Big(\frac{\alpha}{2t}\Big)=I_1+I_2$$
For the first integral we set $u=\frac{x^2}{2t}$ and we obtain
$$I_1(t)=\frac{\sqrt{2t}}{2}\Big[\int_0^{\infty}du \ln u~u^{-1/2}e^{-u}-\ln (1/2t)\int_0^{\infty}du\frac{e^{-u}}{\sqrt{u}}\Big]=\frac{1}{2}\sqrt{2\pi t}(\psi^{(0)}(1/2)+\ln(2t))=\sqrt{\frac{\pi t}{2}}(\ln(2t)-2\ln2-\gamma)$$
For the second we set $u=\sqrt{\frac{\alpha}{2t}}$ instead and we obtain that:
$$I_2=\pi \sqrt{2t}\int_{0}^{\sqrt{\frac{a}{2t}}}du ~e^{u^2}\text{erfc}(u)$$
and using $\text{erfc}(x)=1-\text{erf}(x)$ and the fact that $(\text{erfi})'(x)=\frac{2}{\sqrt{\pi}}e^{x^2}$ we obtain the following handsome looking final expression, after a few simplifications:
$$I=\sqrt{\frac{\pi t}{2}}\Big[\ln(t/2)-\gamma+\pi~\text{erfi}(\sqrt{\frac{a}{2t}})-2\sqrt{\pi}\int_{0}^{\sqrt{\frac{a}{2t}}}e^{u^2}\text{erf}(u)du\Big]$$
This is where things actually get interesting. Consider the function $f(x)=e^{x^2}\int_{0}^{x}e^{-u^2}du$, and perform $M$ integration by parts on it:
$$f(x)=\sum_{n=0}^M \frac{2^n x^{2n+1}}{1\cdot 3\cdot 5...(2n+1)}-e^{x^2}\frac{2^{M+1}}{1\cdot 3\cdot 5...(2M+1)}\int_{0}^x{t^{2M+2}e^{-t^2}dt}$$
Taking $M\to\infty$, which we can do for any $x$, by a simple estimate of the remainder above, we recover the Taylor series:
$$f(x)=\sum_{n=0}^{\infty}\frac{2^n x^{2n+1}}{1\cdot 3\cdot 5...(2n+1)}$$
Now by integrating and using the definition of hypergeometric functions we find:
$$\int_{0}^t f(x)dx=\sum_{n=0}^{\infty}\frac{2^n t^{2n+2}}{1\cdot 3\cdot 5...(2n+1)(2n+2)}=t^2 ~_2F_2(1,1;\frac{3}{2},2|t^2)$$
for the coveted result:
$$I(a,t)=\sqrt{\frac{\pi t}{2}}\Big[\ln(t/2)-\gamma+\pi~\text{erfi}(\sqrt{\frac{a}{2t}})-\frac{a}{t} ~_2F_2(1,1;\frac{3}{2},2|\frac{a}{2t})\Big]$$
which confirms the Mathematica evaluation of $I(t^2,t)$, which is the desired integral, from the comments above.
