# How to speed up this integration?

I try to evaluate this integral:

eq[k_, q_, b_, f_] = (1/Sqrt[h^2 - k^2])* Sinh[Sqrt[h^2 - k^2]*(q - b)]*(1/(h*b))*(m^2*y[b]^2 - (1/(h*b))* D[y[b], b]^2) + (1/Sqrt[h^2 - k^2])*Sinh[Sqrt[h^2 - k^2]*(q - f)]*(1/(h*b))*(m^2*y[f]^2 - (1/(h*f))* D[y[f], f]^2);


Where $$m= h = 10^{14}$$ GeV, and the initial integration limit $$a= -10^{14}$$ GeV.

  y[b_]:= b^(1/2 + Sqrt[1 + m^2/h^2]) + b^(1/2 - Sqrt[1 + m^2/h^2]);

y[f_]:= f^(1/2 + Sqrt[1 + m^2/h^2]) +  f^(1/2 - Sqrt[1 + m^2/h^2]);


To double integrate eq once with respect for b and once with respect for f, I use a symbolic integration

i1[k_, f_,q_]=Map[Integrate[#, {b, a, q}] &, eq[k, q, b, f] // FullSimplify // Expand]

i2[k_,q_]=Map[Integrate[#, {f, a, q}] &, i1[k,f,q] // FullSimplify // Expand]


Then I want to plot i2[k,q] in the limit where $$q\to 0$$, so I use:

i3[k_]:= Limit[i2[k,q],q \to 0]


The problem is that this integration takes so much time, especially i2 it has not even been evaluated. So is there a way to speed up this integration and make its evaluation easier?

Hint

I'm using MA12.0. And in a previous thread

How to make NIntegrate with large integration limit?

I tried NIntegrate but it doesn’t run with large initial integration limit $$a$$ and I could not take the limit of q.

Edit

Here are my trials to do i1 and i2 in one step based on the answer Of Ulrich Neumann and to avoid the non covergence error message:

Map[Integrate[#, {b, a, q}, {f, a, q}, Assumptions -> {a < 0}] &, expr]

This gives a Condtitional expression: Re[q] $$\leq$$ a || a Re $$\frac{1}{-a+q}) \leq -1$$ || q is not [Element] R

So I think this is the problem a should be ( > 0 ), so that q is an integer. So I try:

Limit[Map[Integrate[#, {b, a, q}, {f, a, q}, Assumptions -> { q \[Element] Integers && a > 0}] &, expr],q->0]

Since I initially want to determine the integral at the  q->0 Limit, but this gives Indeterminate

• What is the point of defining the same function twice? Once as y[b_] and then as y[f_]? In your previous question you had $h=m=10^{14} GeV$ now you have $h=m=14 GeV$. Do you even know what you want to compute? Commented Oct 27, 2023 at 20:56
• What is the purpose of the function y?
– jmm
Commented Oct 27, 2023 at 21:03
• Hi @azerbajdzan. Thanks for correction, it’s $m= h = 10^{14}$ GeV and $a=-h= -10^{14}$ GeV. y[b] and y[f] , because the function y is double integratted once for b and once for f. Also in the previous question I tried NIntegrate but it doesn’t run with large $a$ and I can’t take the limit of q Commented Oct 27, 2023 at 21:08
• @Dr. phy: The definition of a function does not care what is the name of a variable. You could just as well define it as y[x_] and then use it like D[y[b], b] or D[y[f], f]. No need to define it twice. $h=m=10^{14} GeV$ so then what is the actual value of h? 10^14*10^9 or 10^14? Commented Oct 27, 2023 at 21:20
• @azerbajdzan. Well! $h=10^{14}$ GeV and $m=10^{14}$ GeV Commented Oct 27, 2023 at 21:40

Assuming m==h and a<0<q Mathematica 12.2 states non-convergent integral:

m=h
y[b_] := b^(1/2 + Sqrt[1 + m^2/h^2]) + b^(1/2 - Sqrt[1 + m^2/h^2]);
expr = (1/Sqrt[h^2 - k^2])*Sinh[Sqrt[h^2 - k^2]*(q - b)]*(1/(h*b))*(m^2*y[b]^2 - (1/(h*b))*D[y[b], b]^2)
+ (1/Sqrt[h^2 - k^2])*Sinh[Sqrt[h^2 - k^2]*(q - f)]*(1/(h*b))*(m^2*y[f]^2
- (1/(h*f))*D[y[f], f]^2);  // Expand
expr[[0]] = List (* list the parts of expr


Integration

Map[Integrate[#, {b, a, q}, {f, a, q}, Assumptions -> {a < 0 < q}] &, expr]


doesn't converge, gives error message

Integrate::idiv: Integral of (1/(4 m^2 Sqrt[-k^2+m^2]))b^(-3-2 Sqrt[2]) (9-4 Sqrt[2]-14 b^(2 Sqrt[2])+(9+4 Sqrt[2]) b^(4 Sqrt[2])-4 b^3 (1+b^(2<<1>><<5>><<1>><<1>>]))^2 m^3) (a-q) Sinh[Sqrt[-k^2+m^2] (-b+q)] does not converge on {a,q}.

• Hi@Ulrich Neumann. Thanks a lot for your reply. In the code : m==h, but still in the expr m and h appear independently. I thought one variable should appear m or h . So why m==h ? Commented Oct 30, 2023 at 8:18
• Sorry , my fault , it must be m=h Commented Oct 30, 2023 at 8:54
• Hello @Ulrich Neumann. Please may you see the edit of the question. I tried to vary the Assumptions  to get a definite integral. Also I try to get the Limit of the integral at  q\to0 but MA gives indeterminate. Commented Oct 30, 2023 at 9:51
• @Dr.phy I think these assumptions are all included in my answer, especially Limit q->0 Commented Oct 30, 2023 at 10:00