Closed form of Gaussian integral Let $X$ be normal $(0,t)$. I am trying to find the following expectation for $m>0$ and $t>0$
$$\mathbb E 2m e^{-m^2t/2}e^{-m X} |X|$$
we have ofc
$$2m e^{-m^2 t/2} \int_{\mathbb R} e^{-mx} |x| e^{-\frac{x^2}{2t}} \frac{1}{\sqrt{2\pi t}}  dx$$
we can ignore the constant $ \frac{2m}{\sqrt{2\pi t}}$ for now. Split the integral to get rid of the aboslute value
$$\int_{-\infty}^0 -xe^{-mx}  e^{-\frac{x^2}{2t}}e^{-m^2 t/2} dx +\int_{0}^\infty xe^{-mx}  e^{-\frac{x^2}{2t}}e^{-m^2 t/2} dx$$
I completed the square and was able to get
$$2m\int _0^{\infty } \frac{x }{\sqrt{2\pi t }}\:e^{-\frac{\left(x+mt\right)^2}{2t}}\:dx$$
for the right integral
which wolfram solves as

 A: \begin{equation}
I=\sqrt{\frac{2}{\pi t}}m \int\limits_{0}^{+\infty} x e^{-\frac{(x+mt)^{2}}{2t}} \,dx
\end{equation}
Let $z=\frac{(x+mt)^{2}}{2t} \Leftrightarrow 2tz=(x+mt)^{2} \Leftrightarrow \sqrt{2tz}=x+mt \Leftrightarrow \sqrt{2tz}-mt=x$. Differentiating both sides yields that: $dx=\sqrt{\frac{t}{2}}z^{-\frac{1}{2}}\,dz$. In relation to the limits of integration: $z(x=0)=\frac{m^{2}t}{2}$, and in regard to the upper one, we can see that $z(x\rightarrow+\infty)\rightarrow+\infty$, given that $t>0$. For simplification, let $\frac{m^{2}t}{2}=k$. Now, plugging everything in gives us that:
\begin{equation}
I=\sqrt{\frac{2}{\pi t}}m \int\limits_{k}^{+\infty} (\sqrt{2tz}-mt)e^{-z} \sqrt{\frac{t}{2}}z^{-\frac{1}{2}}\,dz
\end{equation}
\begin{equation}
\Leftrightarrow \hspace{.2cm}I=\frac{m}{\sqrt{\pi}} \int\limits_{k}^{+\infty} (\sqrt{2tz}-mt)e^{-z} z^{-\frac{1}{2}}\,dz
\end{equation}
After distribution, we obtain the following:
\begin{equation}
I=m\sqrt{\frac{2t}{\pi}} \int\limits_{k}^{+\infty} z^{\frac{1}{2}}e^{-z} z^{-\frac{1}{2}}\,dz-\frac{m^{2}t}{\sqrt{\pi}}\int\limits_{k}^{+\infty} e^{-z} z^{-\frac{1}{2}}\,dz
\end{equation}
\begin{equation}
\Leftrightarrow \hspace{.2cm}I=m\sqrt{\frac{2t}{\pi}} \int\limits_{k}^{+\infty} e^{-z} \,dz-\frac{m^{2}t}{\sqrt{\pi}}\int\limits_{k}^{+\infty} e^{-z} z^{-\frac{1}{2}}\,dz
\end{equation}
\begin{equation}
\Leftrightarrow \hspace{.2cm}I=m\sqrt{\frac{2t}{\pi}}\times(-e^{-z})\Big|_{k}^{+\infty}-\frac{m^{2}t}{\sqrt{\pi}}\int\limits_{k}^{+\infty} e^{-z} z^{-\frac{1}{2}}\,dz
\end{equation}
\begin{equation}
\Leftrightarrow \hspace{.2cm}I=m\sqrt{\frac{2t}{\pi}} e^{-k}-\frac{m^{2}t}{\sqrt{\pi}}\int\limits_{k}^{+\infty} e^{-z} z^{-\frac{1}{2}}\,dz
\end{equation}
The second integral can computed through the complementary error function (or imcomplete gamma function), which is defined as follows:
\begin{equation}
\mathrm{erfc}(x)=1-\mathrm{erf}(x)=\frac{2}{\sqrt{\pi}}\int\limits_{x}^{+\infty} e^{-t^{2}} \,dt
\end{equation}
Let $t^{2}=z$, which implies that: $dt=\frac{1}{2}z^{-\frac{1}{2}}\,dz$. The upper bound stays the same. The new lower bound is $x^{2}$. Then:
\begin{equation}
\mathrm{erfc}(x)=\frac{2}{\sqrt{\pi}}\int\limits_{x^{2}}^{+\infty} e^{-z} \frac{1}{2}z^{-\frac{1}{2}}\,dz
\end{equation}
\begin{equation}
\Leftrightarrow \hspace{.2cm}\mathrm{erfc}(x)=\frac{1}{\sqrt{\pi}}\int\limits_{x^{2}}^{+\infty} e^{-z} z^{-\frac{1}{2}}\,dz=\frac{1}{\sqrt{\pi}}\Gamma\left(\frac{1}{2},x^{2}\right)
\end{equation}
Now, this integral has the same form as the one we want to evaluate, with $k=x^{2}$. Then, our integral is nothing but $\mathrm{erfc}(\sqrt{k})$. Thus, we now know that:
\begin{equation}
I=m\sqrt{\frac{2t}{\pi}} e^{-k}-m^{2}t\,\mathrm{erfc}(\sqrt{k})
\end{equation}
Recall that $k=\frac{m^{2}t}{2}$, then we conclude that:
\begin{equation}
\boxed{I=m\sqrt{\frac{2t}{\pi}} e^{-\frac{m^{2}t}{2}}-m^{2}t\,\mathrm{erfc}\left(m\sqrt{\frac{t}{2}}\right)=m\sqrt{\frac{2t}{\pi}} e^{-\frac{m^{2}t}{2}}-m^{2}t\,\Gamma\left(\frac{1}{2},\frac{m^{2}t}{2}\right)}
\end{equation}
