I have a complicated function as follows:
f[rp_] := (E^(-2 rp^2 \[Gamma]) M^2 norm^2 \[Pi]^( 3/2) (E^((M \[Alpha] - 2 me rp \[Gamma])^2/( 2 (M^2 \[Beta] + me^2 \[Gamma]))) ((-1 + E^((4 M me rp \[Alpha] \[Gamma])/( M^2 \[Beta] + me^2 \[Gamma]))) M \[Alpha] + 2 (1 + E^((4 M me rp \[Alpha] \[Gamma])/( M^2 \[Beta] + me^2 \[Gamma]))) me rp \[Gamma]) + E^((M \[Alpha] - 2 me rp \[Gamma])^2/( 2 (M^2 \[Beta] + me^2 \[Gamma]))) (M \[Alpha] - 2 me rp \[Gamma]) Erf[(M \[Alpha] - 2 me rp \[Gamma])/( Sqrt[2] M Sqrt[\[Beta] + (me^2 \[Gamma])/M^2])] - E^((M \[Alpha] + 2 me rp \[Gamma])^2/( 2 (M^2 \[Beta] + me^2 \[Gamma]))) (M \[Alpha] + 2 me rp \[Gamma]) Erf[(M \[Alpha] + 2 me rp \[Gamma])/( Sqrt[2] M Sqrt[\[Beta] + (me^2 \[Gamma])/M^2])]))/(8 Sqrt[2] me rp \[Gamma] (M^2 \[Beta] + me^2 \[Gamma]) Sqrt[\[Beta] + ( me^2 \[Gamma])/M^2]); I want to do some calculations on f function to obtain my desire final number. In this vein I need to integrate over rp as follows $$ \int_{|re-r|}^{re+r} f(r_p) dr_p \tag{1} $$ As Mathematica can't solve (1) analytically, I have to use NIntegrate, but when I try (1) numerically
NIntegrate[f[rp], {rp, Abs[re - r], r + re}, {re, 0, \[Infinity]}, {r, 0, \[Infinity]}] where the numerical values of constants are
me = 1; mp = 1; M = mp + me; \[Omega] = 100; \[Gamma] = SetPrecision[0.5*M*\[Omega], 50]; {\[Alpha], \[Beta]} = \ {0.407310205953620829699701744175399653613567352294921875`50., 24.586618270213069337160050054080784320831298828125`50.}; norm = 189.2253326188998254888908479720045476056553654261503687655661`\ 49.454966552225144; I get this error:
NIntegrate::nlim: rp = Abs[-1. r+re] is not a valid limit of integration. So how can I solve my integral?! Any idea?


NIntegrate: Perhapsre,risn't defined yet? You should also provide numerical values for all the parameters! $\endgroup$NIntegrateis a numerical function and needs numerical parameter values! $\endgroup$reandr. Please see the update again $\endgroup$M,norm, andme? You haven't provided them in the code above, andNIntegratedefinitely won't work if you don't. $\endgroup$