I have an integral (where $q$ is a constant and $u\geq1$)

$$\boxed{I = \frac{e^{(-q/4)}}{2\sqrt{2\pi}q^{\frac32}}\int_{1}^{\infty}\bigg(\frac{u-1}{u+1}\bigg)\int_{u}^{\infty}\frac{xe^{-x^2/(4q)}}{\sqrt{\cosh{(x)}-\cosh{(u)}}}dxdu}$$ I'm looking at a paper which claims that this can be reduced to $$\boxed{I=1-\frac{4}{\sqrt{\pi}}e^{-q}\int_{0}^{\infty}\frac{x^2e^{-x^2}}{\cosh{(\sqrt{q}x)}}dx}$$

My first check since this looks unlikely is to use NIntegrate to check.

My code is for the first boxed double integral is

(*Calculate inner integral*)
int1[q_?NumericQ, u_?NumericQ, 
   opts : OptionsPattern[]] := (Exp[-q/4]/(2*Sqrt[2*Pi]*q^1.5))*
   NIntegrate[(x*Exp[-x^2/(4*q)])/Sqrt[(Cosh[x] - Cosh[u])], {x, u, 
     Infinity}, opts];

(*Calculate outer integral*)
int2[q_?NumericQ, opts : OptionsPattern[]] := 
  NIntegrate[((u - 1)/(u + 1))*int1[q, u, opts], {u, 1, Infinity}, 

and the code for the second boxed integral is

P[q_] := 1 - ((4/Sqrt[Pi])*Exp[-q])*
   NIntegrate[(x^2*Exp[-x^2])/(Cosh[Sqrt[q]*x]), {x, 0, Infinity}]

I then want to plot these integrals as $q$ changes. I do this via

Plot[{int2[q], P[q]}, {q, 0.01, 2}, PlotRange -> All, 
 PlotLegends -> {"Boxed 1", "Boxed 2"}]

The plots for $q\in[0.01,2]$ is


So my question is, is this calculation correct so the boxed terms do not equate, or is there a numerical error? It's a highly cited paper so I'm not sure what to believe. I would appreciate any help. Thank you. Related to this question I posted on math stack.

  • $\begingroup$ It is hard to say for sure, because the transition is not that easy and probably involves some additional approximation. However, it seems for $q\rightarrow 0$ the numerical integration of Eq.(1) is not quite correct. The result should be zero because in this limit we get a strongly peaked function around $x\approx 0$ and zero otherwise. Since the integration over $x$ does not include this point, the integral should be zero. This is clearly the case in Eq.(2), but not in (1). $\endgroup$
    – yarchik
    Commented Feb 26, 2020 at 10:28
  • 1
    $\begingroup$ int1 definition seems wrong -- you missed a Pi. $\endgroup$ Commented Feb 26, 2020 at 13:51
  • $\begingroup$ Yes my mistake. I forgot to update the question. $\endgroup$ Commented Feb 26, 2020 at 13:52

1 Answer 1


I will strictly focus on the question of equivalence of the two integrals. They are not equivalent. One hint is the behavior at $q\rightarrow0$. However, even more spectacularly it can be seen in the asymptotic limit $q\rightarrow\infty$.

The first integral asymptotically tends to zero as: $$ I_1\simeq cq^{-3/2}\exp(-q/4), $$ where $c$ is a constant. Constant c can be computed as follows: set q=∞and compute the integrals numerically:

NIntegrate[(u-1)/(u+1) x/Sqrt[Cosh[x]-Cosh[u]],{u,1,∞},{x,u,∞}]

The second integral asymptotically tends to 1. We use a representation of $e^{-x^2}=\int_{-\infty}^\infty e^{-p^2/4+i p x}\,\mathrm{d}p$:

1/(2Sqrt[π]) Integrate[Exp[-p^2/4+I p x],{p,-∞,∞},Assumptions->q>0&&x>0]

We substitute this expression in the second integral, exchange the integration order, and compute the integral over x analytically:

z=Integrate[x^2  Exp[I p x]/Cosh[Sqrt[q]x],{x,0,∞},Assumptions->q>0&&x∈Reals&&p∈Reals]
(*(-PolyGamma[2,1/4-(I p)/(4 Sqrt[q])]+PolyGamma[2,3/4-(I p)/(4 Sqrt[q])])/(32 q^(3/2))*)

Now we do a series expansion at q=∞ and the remaining integration over p

i[2]=1-(4 E^-q)/Sqrt[π] 1/(2Sqrt[π]) Integrate[Exp[-p^2/4](Series[z,{q,∞,1}]//Normal),{p,-∞,∞},Assumptions->q>0]
(*1-(E^-q π^(5/2))/(2 q^(3/2))*)

$$I_2\simeq1-\frac{e^{-q} \pi ^{5/2}}{2 q^{3/2}}$$

Thus, we established that $I_1$ and $I_2$ asymptotically behave very differently.

  • $\begingroup$ Thank you for your insightful answer. May I ask, can you see how the author may have jumped between these integrals? They don't state they approximate anything going between these, and it's clear that they are very different per se, from your answer. $\endgroup$ Commented Feb 26, 2020 at 14:02
  • $\begingroup$ @rami_salazar You probably have to look in Morrison, J. A., G. C. Papanicolaou, and J. B. Keller. "Mean power transmission through a slab of random medium." Communications on Pure and Applied Mathematics 24.4 (1971): 473-489. In particular pp. 485-486, Eqs. (5.14), (5.21). Eq.(5.14) is quite different from your Eq.(1), but Eq. (5.21) is similar to your Eq.(2). $\endgroup$
    – yarchik
    Commented Feb 26, 2020 at 14:09
  • $\begingroup$ Thank you I'll look at this. A side note, I think you missed an $x^2$ term when you calculate the integral over $x$ analytically? $\endgroup$ Commented Feb 26, 2020 at 14:44
  • $\begingroup$ So $I_2\sim 1.$ $\endgroup$ Commented Feb 26, 2020 at 15:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.