# How to numerically integrate this function near x = 0?

I'm trying to NIntegrate[] the following integration: Let's define a function

$$F_\delta(x) = 1 - \Phi[\Phi^{-1}[1 - x] - \delta], \ \ x \in (0, 1)$$

where $$\delta > 0, \Phi(x)$$ is the cdf of the standard normal distribution.

The integration I would like to get is:

$$\int_0^1 F_{\delta_1}(0.05 + 0.95x) d F_{\delta_2}(x)$$

NIntegrate[] works well when $$\delta_1, \delta_2$$ is not large. However, when $$\delta_1, \delta_2$$ is large, for example, $$\delta_1 = 5, \delta_2 = 10$$, the integration would overflow near $$x = 0$$ as $$f_{\delta}(0) \rightarrow \infty$$ as $$\delta$$ increases.

I know the limit of the integration should be 1 as $$\delta_1, \delta_2$$ increases, but my task is to give a plot of the integration value as $$\delta$$ increases, so I need to seek a way to evaluate the value or at least some kind of approximation even when $$\delta_1, \delta_2$$ is rather large.

Here are the code I used for Mathematica:

f[x_, d_] := Exp[-(d^2/2) + d*InverseCDF[NormalDistribution[0, 1], 1 - x]]
F[x_, c_] := 1 - CDF[NormalDistribution[0, 1], InverseCDF[NormalDistribution[0, 1], 1 - x] - c]
NIntegrate[F[0.05 + 0.95 x, 5] * f[x, 10], {x, 0, 1}]


Thanks!!

• please post Mathematica code you used. Aug 30, 2022 at 8:33
• Sure! Let me post the Mathematica code. Aug 30, 2022 at 8:50
• Rationalize function and play with MaxRecursion, WorkingPrecision, AccuracyGoal ... NIntegrate[F[5/100 + 95/100 x, 5]*f[x, 10], {x, 0, 1}, MaxRecursion -> 50, WorkingPrecision -> 30] yields 0.999603384995483853038609328216 Aug 30, 2022 at 11:57
• MaxRecursion works well for a single point, but when I tried List contour plot for (\delta_1, \delta_2) taking value in unit square, even MaxRecursion -> 15 is very slow. Is there any faster way for List contour plot? Sep 4, 2022 at 1:09

Clear["Global*"]

f[x_, d_] :=
Exp[-(d^2/2) + d*InverseCDF[NormalDistribution[0, 1], 1 - x]]
F[x_, c_] :=
1 - CDF[NormalDistribution[0, 1],
InverseCDF[NormalDistribution[0, 1], 1 - x] - c]

NIntegrate[F[1/20 + 19/20 x, 5]*f[x, 10], {x, 0, 1},
WorkingPrecision -> 15]

(* 0.999603384995484 *)

int[δ_?NumericQ] := NIntegrate[
F[1/20 + 19/20 x, δ]*f[x, 10], {x, 0, 1},
WorkingPrecision -> 15]

AbsoluteTiming@ListLinePlot[
Table[{δ, int[δ]}, {δ, 2, 10, 1/4}],
PlotRange -> All]


Using Plot is much slower

AbsoluteTiming@Plot[int[δ], {δ, 2, 10},
PlotRange -> All,
WorkingPrecision -> 15]
`