I'm trying to compute the following integral:
$$ I = \int_{-\infty}^\infty x^2 \Phi(a+bx)\phi(x)dx $$
Where $\Phi(\cdot)$ and $\phi(\cdot)$ are the cdf and pdf respectively of the standard normal.
Wikipedia has a list of related integrals (https://en.wikipedia.org/wiki/List_of_integrals_of_Gaussian_functions) but not the one I want to compute. I've tried decomposing $I$ into functions from this list, but without success.
There are also some related MathSE/Mathoverflow posts (e.g. Definite integral of a product of normal pdf and cdf), but they only integrate the cdf/pdf product, and not the second moment.
Does anyone have a way to solve this integral analytically? Thanks!
Another approach could be combining methods outlined here integration-of-the-product-of-pdf-cdf-of-normal-distribution and redefining the integral with a more general definition $\int_{-\infty}^{\infty}\phi(cx)\Phi(a+bx)dx$ and differentating with respect to auxillary parameter $c$, evaluating at $c=1$ we obtain the same integral in the question $\int_{-\infty}^{\infty}\phi(x)\Phi(a+bx)x^2dx$. Then final result becomes, \begin{equation}\int_{-\infty}^{\infty}\phi(x)\Phi(a+bx)x^2dx=\phi\left(\frac{a}{\sqrt{1+b^2}}\right)-\frac{ab^2}{(a+b^2)^{3/2}}\phi\left(\frac{a}{\sqrt{1+b^2}}\right) \end{equation} The derivation is below,
\begin{eqnarray} I=\int_{-\infty}^{\infty}\phi(x)\Phi(a+bx)x^2dx\\ =\frac{\partial\left(\int_{-\infty}^{\infty}\phi(cx)\Phi(a+bx)\right)}{\partial c}|_{c=1}\\ =\frac{\partial\left(\int_{-\infty}^{\infty}\phi(y)\Phi(a+\frac{by}{c})\right)}{\partial c}|_{c=1}\\ =\frac{\partial\left(\frac{\Phi\left(\frac{a}{\sqrt{1+\frac{b^2}{c^2}}}\right)}{c}\right)}{\partial c}|_{c=1}\\ =\phi\left(\frac{a}{\sqrt{1+b^2}}\right)-\frac{ab^2}{(a+b^2)^{3/2}}\phi\left(\frac{a}{\sqrt{1+b^2}}\right) \end{eqnarray}
A quick R implementation shows that the numerical and analytical formula coincides for $a=1,b=2,c=1$