# How to integrate $\int_n^{+\infty} x \exp\{-ax^2+bx+c\}dx$?

How can I integrate,

$$\int_n^{+\infty} x \exp\{-ax^2+bx+c\}dx$$

and what's the result w.r.t the Gaussian function's p.d.f $p(x)$ and c.d.f $\phi(x)$?

Thanks!

-
@DilipSarwate c.d.f of course. Thanks for pointing out. Edited. –  shuaiyuancn Apr 17 '12 at 20:56

Completing the square in the quadratic: \eqalign{ \int_n^\infty x \exp(-ax^2+bx+c)\,dx &= \int_n^\infty\kern-5pt x \exp( -a(x-{\textstyle{b\over 2a})^2 +c+{b^2\over 4a} } )\,dx\cr &= \alpha \int_n^\infty\kern-5pt x \exp( \textstyle {-(x-{\textstyle{b\over 2a})^2 }\over 1/a } )\,dx\cr &= \alpha \int_n^\infty\kern-5pt (x+{\textstyle{b\over 2a}-{b\over2a}}) \exp( \textstyle {-(x-{\textstyle{b\over 2a})^2 }\over 1/a } )\,dx\cr &=\alpha \int_n^\infty\kern-5pt (x { -{\textstyle{b\over2a}}}) \exp( {\textstyle {-(x-{\textstyle{b\over 2a})^2 }\over 1/a }} )\,dx + \alpha\int_n^\infty\kern-5pt \textstyle{b\over2a} \exp( \textstyle {-(x-{\textstyle{b\over 2a})^2 }\over 1/a } )\,dx,\cr } where $\alpha=\exp(c+{b^2\over4a})$.
On the right hand side of the last equality above, the first integral can be evaluated using the substitution $u=x-{b\over 2a}$ and the second integral can be expressed in terms of the cumulative distribution function of an appropriate normal random variable.
Hint: Since $\frac{\mathrm d}{\mathrm dx}\exp(-ax^2+bx+c) = (-2ax+b)\exp(-ax^2+bx+c)$, you can massage the given integrand to something of the form $$\frac{-1}{2a}\int (-2ax+b)\exp(-ax^2+bx+c)\ \mathrm dx + \int \frac{b}{2a}\exp(-ax^2+bx+c)\ \mathrm dx$$ where the first integral now has a perfect integrand and the second, after further massaging will give you something involving $\Phi(\cdot)$, the cdf of the standard normal (Gaussian) random variable. Note that @Wonder's answer does not get the second term.