Integration of the multiplication of normal cdf and exponential function I have to find the integral of
$$\int_{M_0}^{\infty} q(m, \mu, \sigma) \beta e^{-\beta(m-M_0)}\,\mathrm{d}m,$$
where $q(m, \mu, \sigma)$ is the normal cumulative distribution function,  $M_0$ is a constant, $m$ is the variable, and $\beta$, $\mu$, and $\sigma$ are parameters.  I have done the integration using the error function as follows:
\begin{align}
\int_{M_0}^{\infty} q(m, \mu, \sigma) \beta e^{-\beta(m-M_0)}\,\mathrm{d}m &=\beta e^{\beta M_0} \int_{M_0}^{\infty} \frac{1}{2} \Bigg[ 1+\operatorname{erf}\Bigg (\frac{(m-\mu)}{\sigma \sqrt(2)} \Bigg ) \Bigg] e^{-\beta m }\,\mathrm{d}m \\ 
&=\frac{1}{2} + \frac{1}{2} \beta e^{\beta M_0} \int_{M_0}^{\infty} \operatorname{erf} \Bigg (\frac{(m-\mu)}{\sigma \sqrt(2)} \Bigg)e^{- \beta m}\,\mathrm{d}m
\end{align}
Here I get stuck. Could anyone please help solving this?
 A: I will present to you the solution in a sort of general step-by-step method. I hope you find it useful.
First of all, you have to use Partial Integration to get rid of the normal CDF function in the integral. Can you give it a go? If you have some difficulties, just ask me.
If you have done this correctly, you will end up with an integral of the form
$$ \int_a^b e^{a x^2 + b x + c}\,\mathrm{d} x $$
which you can't solve or can you? It seems difficult but it turns out that this is actually quite easy if you allow the normal CDF in your answer. The main idea in solving this integral is the same as splitting the square. So, this integral can be simplified to
$$ \int_a^b e^{k(x + l)^2 + m}\,\mathrm{d} x $$
and this is then solved as
$$ \int_a^b e^{k(x + l)^2 + m}\,\mathrm{d} x  = e^{m} \int_a^b e^{\frac{(x + l)^2}{2(1/\sqrt{2 k})^2}}\,\mathrm{d} x = e^{m} \cdot \left[\Phi(b) - \Phi(a)\right]\cdot \sqrt{2\pi (1/\sqrt{2k})^2} $$
where $\Phi(z)$ is the CDF of a normal distribution with mean $-l$ and variance $1/(2k)$. This seems a bit random but all we did was actually writing the integrand to something which is similar to a normal pdf. Finally, note that we cannot simplify this any further in general. However, in your case, you have $b=\infty$ and, thus, $\Phi(b)=1$.
A: the integral is: 
$I= \int_{M_0}^{\infty} q(m,\mu,\sigma). \beta e^{-\beta (m-M_0)} dm \\ 
=\frac{1}{2}+\frac{1}{2} \beta e^{\beta M_0} * I_{11}$
where,
$I_{11}= \int_{M_0}^{\infty} erf(\frac{(m-\mu)}{\sigma \sqrt{2}}) e^{- \beta m} dm\\
=erf(\frac{(m-\mu)}{\sigma \sqrt{2}}) \int_{M_0}^{\infty} e^{- \beta m} dm - \int_{M_0}^{\infty} \{ \frac{d}{dm} erf(\frac{(m-\mu)}{\sigma \sqrt{2}})  \int_{M_0}^{\infty} e^{- \beta m} dm \} dm \\
=\frac{1}{\beta} erf(\frac{(m-\mu)}{\sigma \sqrt{2}}) e^{- \beta M_0} + \frac{1}{\beta} \frac{2}{\sqrt{\pi}} \int_{M_0}^{\infty} e^{\frac{(m-\mu)^2}{2 \sigma^2}} e^{- \beta m} dm  \\
=\frac{1}{\beta} erf(\frac{(m-\mu)}{\sigma \sqrt{2}}) e^{- \beta M_0}+ \frac{1}{\beta} \frac{2}{\sqrt{\pi}} I_{22}$
where,
$I_{22}= \int_{M_0}^{\infty} e^{\frac{(m-\mu)^2}{2 \sigma^2 }} e^{- \beta m} dm\\
= \int_{M_0}^{\infty} e^{\frac{\{m-(\mu-\beta \sigma^2) \}^2}{2 \sigma^2}+ \frac{\beta}{2} \{\sigma^2-2\mu \} } dm$
