To respond to the comment-question of sebhofer:
The internal integral is calculated analytically to the end:
Integrate[Exp[-(y - μ)^2/(2*σ^2)], {y, x, ∞},
Assumptions -> {σ > 0, μ > 0}]
(* Sqrt[π/2] σ Erfc[(x - μ)/(Sqrt[2] σ)] *)
Introducing the new variables: x=sigmaksi and mu=sigmam one transforms the main expression into the following:
$\int_{-\infty }^{\infty }
e^{\frac{\xi ^2}{2}}
\text{erfc}\left(\frac{\xi
-m}{\sqrt{2}}\right)^n \,
d\xi$
This integral seems not to converge. So the problem is solved. I guess, however, that the sign in front of x^2/2sigma^2 in the original integral should be minus.
In the latter case one can try to do something with this integral.
The original question does not specify, if n is any, or only integer, only positive, only negative or both. Assuming that it is integer, and assuming for a moment that m=0, one finds exact values of the integral:
Table[Integrate[
Exp[-ξ^2/2] Erfc[ξ/Sqrt[2]]^n, {ξ, -∞, ∞}], {n, 0, 5}]
(* {Sqrt[2 π], Sqrt[2 π], (4 Sqrt[2 π])/3, 2 Sqrt[2 π], (
16 Sqrt[2 π])/5, (16 Sqrt[2 π])/3} *)
It fails, however, to return an analytic solution in the simpliest case n=1, and a non-zero m. In this case one might find it useful to make a quasi-analytic solution. That is, one finds a numeric solution in a number of points of a certain interval of interest, say, for m between 0 and 1, and then approximates the result by a reasonable analytical function as follows:
This makes a table of the integral values with n=1:
lst = Table[{m,
NIntegrate[
Exp[-ξ^2/2] Erfc[(ξ - m)/Sqrt[
2]], {ξ, -∞, ∞}]}, {m, 0, 1, 0.1}];
This fits it to a polynomial:
ft = Fit[lst, {1, m, m^2}, m]
(* 2.50308 + 1.47271 m - 0.161187 m^2 *)
And this provides a visual control of the fitting quality:
Show[{
ListPlot[lst],
Plot[ft, {m, 0, 1}, PlotStyle -> Red]
}]
That's what should be obtained:
It is clear that the obtained polynomial represents an approximation for the integral accurate in the indicated interval of m. It can, therefore, be used for further analytical calculations.
Further, the same type of approximations one can find for any n. In principle, with luck one can then try to approximate also the dependence of the integral upon n. My experience tells, however, that approximation over two parameters is typically not too accurate. It depends upon the problem being solved, personal luck and on how desperate one needs to get the analytic expression.
NIntegrate[... NIntegrate[...]^n, ...]
. And actually the inner one is an erf function, which can be analyticlly integrated. $\endgroup$