# Convergence of integral [closed]

I'm trying to calculate analytically the integral below

$$I = \int_{-\infty}^{+\infty} -\frac{2 \mathrm{e}^{k^2/2 + 5} k^2 (k^2 + 10)}{(\mathrm{e}^{k^2/2 + 5} - 1)^2} \mathrm{d}k$$

I've already plotted it and I'm pretty sure this integral converges. However, it seems Mathematica doesn't give me an expression for it.

Any clues? Thanks!

• You haven't given an integral. You've only given a function. Apr 25, 2020 at 2:45
• There is no analytical antiderivative. Try numerical integration. There is no analytical antiderivative even for $\frac{1}{e^{k^2}-1}$ never mind the much more complicated integrand you show. Apr 25, 2020 at 3:03
• Thanks @Nasser! Apr 25, 2020 at 3:11
• It converges. NIntegrate[f[k], {k, -\[Infinity], \[Infinity]}] gives 0.440988. Apr 25, 2020 at 4:39
• I modified the expression to an integral by guessing. Please check whether it expresses what you originally meant. Apr 25, 2020 at 7:36

So the function is cannot be analytically integrated, but it converges when you do numerical integration:

f[k_] := ((2 Exp[k^2/2 + 5] k^2  (k^2 + 10))/(Exp[k^2/2 + 5] - 1)^2)

NIntegrate[f[k], {k, -∞, ∞}]


which gives 0.440988.

It is worth noticing that the (numerical) integral up to an unknown value $$k_{max}$$ can actually be well approximated (for $$k>1$$) by a sigmoid fit:

where the points are the result from the numerical integral, and the solid line is this fit: $$\frac{1}{2.26922 + \mathrm{e}^{2.36821(2.03168-x)}}.$$

• Thank you for the detailed explanation. Now the integral converged for a range of parameters. However, for some parameters I obtain the following message: NIntegrate::ncvb: NIntegrate failed to converge to prescribed accuracy after 9 recursive bisections in k near {k} = {5.31442*10^7}. NIntegrate obtained -4.89281*10^40+3.28288*10^28 I and 2.2012203052999983*^40 for the integral and error estimates. Do you know how could I fix it? Apr 27, 2020 at 22:15
• See this question: mathematica.stackexchange.com/questions/109772/… Apr 27, 2020 at 22:16
• Dear @SuperCiocia, I've read this question already. However, for my case, I can use WorkingPrecision->100 and AccuracyGoal-> Infinity that the problem still remains: Apr 27, 2020 at 22:36
• Then they might be as big numbers that Mathematica can store and handle. Apr 27, 2020 at 22:39
• It could be. But notice that I've renormalized the parameters of my integral and I'm still getting this error: NIntegrate::ncvb: NIntegrate failed to converge to prescribed accuracy after 9 recursive bisections in k near {k} = {1.1053624000288337238*10^10}. NIntegrate obtained -11.988785460816550537 and 0.003740155639586722254920. for the integral and error estimates. Apr 27, 2020 at 23:10