Not an answer, extended comment...
First some redefinitions:
Clear[cosϕSol, θhSol, A, integral1]
cosϕSol[θS_, sinθh_, cosθh_, a_] :=
cosϕ /.
Solve[cosϕ*Sin[θS] sinθh +
Cos[θS]*cosθh == a, cosϕ][[1]];
θhSol[θS_,
a_] := θh /.
Solve[cosϕSol[θS, Sin[θh], Cos[θh], a] ==
1, θh] /. {C[1] -> 0}
A[ES_, mS_] := Sqrt[4*ES^2 - 125^2]/Sqrt[4*ES^2 - 4*mS^2];
Because of the complicated symbolic computations for the integration ranges, I first switched off the symbolic preprocessing. I got the following output:
integral1[ES_, θS_, mS_] :=
NIntegrate[1,
{θh,
Max[Min[θhSol[θS,
A[ES, mS]][[1]], θhSol[θS, A[ES, mS]][[2]]], 0],
Min[Max[θhSol[θS,
A[ES, mS]][[2]], θhSol[θS, A[ES, mS]][[1]]], Pi]},
{ϕh, 0,
Min[Pi, ArcCos[
cosϕSol[θS, Sin[θh], Cos[θh],
A[ES, mS]]]]},
Method -> {"GlobalAdaptive", "SymbolicProcessing" -> 0}]
integral1[1500, 0.01, 40]
(* During evaluation of In[132]:= Solve::ifun: Inverse functions are being used by Solve, so some solutions may not be found; use Reduce for complete solution information.
During evaluation of In[132]:= Solve::ifun: Inverse functions are being used by Solve, so some solutions may not be found; use Reduce for complete solution information.
During evaluation of In[132]:= Solve::ifun: Inverse functions are being used by Solve, so some solutions may not be found; use Reduce for complete solution information.
During evaluation of In[132]:= General::stop: Further output of Solve::ifun will be suppressed during this calculation.
During evaluation of In[132]:= NIntegrate::nlim: ϕh = Min[3.14159,3.14159 -0.545349 I] is not a valid limit of integration. *)
(* NIntegrate[1, {θh,
Max[Min[θhSol[0.01, A[1500, 40]][[
1]], θhSol[0.01, A[1500, 40]][[2]]], 0],
Min[Max[θhSol[0.01, A[1500, 40]][[
2]], θhSol[0.01, A[1500, 40]][[1]]], π]}, {ϕh, 0,
Min[π,
ArcCos[cosϕSol[0.01, Sin[θh], Cos[θh],
A[1500, 40]]]]},
Method -> {"GlobalAdaptive", "SymbolicProcessing" -> 0}] *)
Using Re
in the second integration range produces a numerical result:
integral1[ES_, θS_, mS_] :=
NIntegrate[1,
{θh,
Max[Min[θhSol[θS,
A[ES, mS]][[1]], θhSol[θS, A[ES, mS]][[2]]], 0],
Min[Max[θhSol[θS,
A[ES, mS]][[2]], θhSol[θS, A[ES, mS]][[1]]], Pi]},
{ϕh, 0,
Min[Pi, Re@
ArcCos[cosϕSol[θS, Sin[θh], Cos[θh],
A[ES, mS]]]]},
Method -> {"GlobalAdaptive", "SymbolicProcessing" -> 0}]
integral1[1500, 0.01, 40]
(* During evaluation of In[134]:= Solve::ifun: Inverse functions are being used by Solve, so some solutions may not be found; use Reduce for complete solution information.
During evaluation of In[134]:= Solve::ifun: Inverse functions are being used by Solve, so some solutions may not be found; use Reduce for complete solution information.
During evaluation of In[134]:= Solve::ifun: Inverse functions are being used by Solve, so some solutions may not be found; use Reduce for complete solution information.
During evaluation of In[134]:= General::stop: Further output of Solve::ifun will be suppressed during this calculation. *)
(* 0.0981353 *)
\[Theta]h]
! $\endgroup$NIntegrate
statesNIntegrate[f[x, y], {x, a, b}, {y, c, d}]
$\int_a^b \int _c^df(x,y)\,dy\,dx$, and in normal math notation, $c$ and $d$ may depend on $x$. Aside from that, I don't know of a dedicated discussion. It comes up in some of the singularities handling and preprocessors, for instance "UnitCubeRescaling"`. $\endgroup$