I encountered a problem with Mathematica. The simple command is:
Integrate[
q^2/(q^2 + ks^2) (1 - (1/τ^2 - c^2 q^2) τ^2)/
(1 + 2 (ω^2 - (1/τ^2 - c^2 q^2)) τ^2 +
(ω^2 + (1/τ^2 - c^2 q^2))^2 τ^4),
{q, 0, Infinity},
Assumptions -> {ks > 0, ω > 0, τ > 0, c > 0}]
When I launch this, Mathematica shows "running" for a few seconds and then it produces "beep" sound. No result is shown and all variables are cleared (i.e. the kernel crashed). The funny thing is, when I choose a finite upper limit (I started with 1/c tau instead of infinity), it produces an answer. However, when I rewrite the upper limit to infinity, it crashes the kernel (although the infinity poses no problem for the convergence, as the function falls quickly enough, moreover, the result of integration is usually much simpler with infinite limit than with a finite one).
I run Mathematica 11.1 under Windows 10. I have intel 4790K, nvidia geforce 970 gtx and 16GB of RAM. Isn't that enough to keep kernel from crashing? What should I do to obtain the result (apart from doing it myself via contour integration which I wanted to avoid)? Thank you.
P.S.: I tried that even right after fresh restart of my PC, closing/reopening Mathematica etc. Always the same behaviour.
P.S.2: just for the fun, I usually calculate definite integrals with infinite bounds via contour integration and find out that the actual result is much much simpler than what Mathematica shows (which can be simplified after all). Could the reason be that Mathematica runs out of memory while thinking about showing me that output that takes (for example) 10^5 rows? I'm just speculating.
I run the integrate with semicolon, still crashing.
EDIT: I managed to get it running by substituting alpha = ctau and beta = omegatau. However, this yields an answer with a lot of i's in it a indeed, once I plug in some numerical values, the result has a nonzero imaginary part, which is just wrong - no complex numbers should be involved at all.