# A definite integral involving a Gaussian and shifted error functions.

Let $$d\ge 1$$ be an integer and let $$\vec{a} \in {\mathbb R}^d$$ and $$\vec{b} \in {\mathbb R}^d$$. We consider a following integral: $$\begin{eqnarray} {\mathfrak J}^{(d)}(\vec{a},\vec{b}):=\int\limits_{\mathbb R} \frac{e^{-\frac{1}{2} \xi^2}}{\sqrt{2\pi}} \cdot \prod\limits_{j=1}^d erf\left(\frac{a_j \xi+b_j}{\sqrt{2}}\right) \cdot d\xi \end{eqnarray}$$ Now, by differentiating with respect to the parameter $$b_d$$ then computing the integral on the right hand side and having done that integrating the result over $$b_d$$ from infinity to $$b_d$$ we obtained the following results: $$\begin{eqnarray} {\mathfrak J}^{(1)}(\vec{a},\vec{b})&=& \frac{1}{2} erf\left(\frac{b}{\sqrt{2(1+a^2)}}\right)\\ {\mathfrak J}^{(2)}(\vec{a},\vec{b})&=&\frac{1}{4 \pi }\left(\right.\\ &&\left. 4 \pi T\left(\frac{\sqrt{a_2^2+1} b_1}{\sqrt{a_2^2 a_1^2+a_1^2+a_2^2+1}},\frac{a_1^2 (-b_2)+a_2 a_1 b_1-b_2}{\sqrt{a_1^2+a_2^2+1} b_1}\right)+4 \pi T\left(\frac{b_2}{\sqrt{a_2^2+1}},\frac{\left(-a_2^2-1\right) b_1+a_1 a_2 b_2}{\sqrt{a_1^2+a_2^2+1} b_2}\right)+\right.\\ &&\left.\pi \text{erf}\left(\frac{b_1}{\sqrt{2} \sqrt{a_1^2+1}}\right)-\pi \text{erf}\left(\frac{\sqrt{a_2^2+1} b_1}{\sqrt{2} \sqrt{a_2^2 a_1^2+a_1^2+a_2^2+1}}\right)+\right.\\ &&\left.-2 \arctan\left(\frac{a_1^2 (-b_2)+a_2 a_1 b_1-b_2}{\sqrt{a_1^2+a_2^2+1} b_1}\right)-2 \arctan\left(\frac{\left(-a_2^2-1\right) b_1+a_1 a_2 b_2}{\sqrt{a_1^2+a_2^2+1} b_2}\right)+\right.\\ &&\left.2 \arctan\left(\frac{a_1 a_2}{\sqrt{a_1^2+a_2^2+1}}\right)\right.\\ &&\left.\right) \end{eqnarray}$$

where $$T(\cdot,\cdot)$$ is the Owen's T function.

For[count = 1, count <= 500, count++,
A = RandomReal[{-3, 3}, 2, WorkingPrecision -> 50];
B = RandomReal[{-3, 3}, 2, WorkingPrecision -> 50];

x1 = NIntegrate[
phi[xi] Product[
1/2 Erf[(A[[i]] xi + B[[i]])/Sqrt[2]], {i, 1,
2}], {xi, -Infinity, Infinity}];
x2 = 1/(
4 \[Pi]) (2 ArcTan[(A[[1]] A[[2]])/Sqrt[
1 + A[[1]]^2 + A[[2]]^2]] -
2 ArcTan[(A[[1]] A[[2]] B[[1]] - B[[2]] - A[[1]]^2 B[[2]])/(
Sqrt[1 + A[[1]]^2 + A[[2]]^2] B[[1]])] -
2 ArcTan[(-(1 + A[[2]]^2) B[[1]] + A[[1]] A[[2]] B[[2]])/(
Sqrt[1 + A[[1]]^2 + A[[2]]^2] B[[2]])] + \[Pi] Erf[B[[1]]/(
Sqrt[2] Sqrt[1 + A[[1]]^2])] - \[Pi] Erf[(
Sqrt[1 + A[[2]]^2] B[[1]])/(
Sqrt[2] Sqrt[
1 + A[[1]]^2 + A[[2]]^2 + A[[1]]^2 A[[2]]^2] )] +
4 \[Pi] OwenT[(Sqrt[1 + A[[2]]^2] B[[1]])/Sqrt[
1 + A[[1]]^2 + A[[2]]^2 + A[[1]]^2 A[[2]]^2] , (
A[[1]] A[[2]] B[[1]] - B[[2]] - A[[1]]^2 B[[2]])/(
Sqrt[1 + A[[1]]^2 + A[[2]]^2] B[[1]])] +
4 \[Pi] OwenT[B[[2]]/Sqrt[
1 + A[[2]]^2], (-(1 + A[[2]]^2) B[[1]] +
A[[1]] A[[2]] B[[2]])/(
Sqrt[1 + A[[1]]^2 + A[[2]]^2] B[[2]])]);
If[Abs[x2/x1 - 1] > 10^(-3),
Print["results do not match..", {a, b, {x1, x2}}]; Break[]];
If[Mod[count, 50] == 0, PrintTemporary[count]];
];


Now, my question would be what is the result for $$d> 2$$.

Note: This question is related to the following questions:

An integral involving error functions and a Gaussian

An integral involving a Gaussian and an Owen's T function.

An integral involving a Gaussian, error functions and the Owen's T function.