Message Boards Message Boards

0
|
9389 Views
|
1 Reply
|
1 Total Likes
View groups...
Share
Share this post:

Avoiding integral overflow computation?

Posted 11 years ago
Hello,
I'm trying to calculate an integral with some small parameters, and each time I run the command I get an overflow error. The result of the Integral is physically relevant so I'm unwilling to change the parameters. I've tried several change of variable methods but all result in the computation being terminated due to the overflow errors (but the output returns "Underflow []", why is that?)

Here is the input:
Integrate[ x / ( Exp[ B*(x + MU) ] - 1) , {x, 0, Infinity} ]

Where B takes a value of 2.7*10^30, and MU=10^-15. For those of you with a physics background, I'm doing some calculations with the distribution function of a Bose-Einstein condensate and B corresponds to 1/(Boltzmann constant * Temperature).

If I set MU=0, Mathematica is able to calculate the integral, but I would like to play around with this parameter. Any nonzero value of MU results in this error. Is there any way to work around this? Any help would be appreciated
POSTED BY: D K
You are getting an underflow error because you are doing a floating point computation that leads to underflow. There are a lot of pitfalls in floating point computing. Here's the wikipedia article on underflow specifically: http://en.wikipedia.org/wiki/Underflow


The first thing to do is to try writing them as symbolic values instead of floating point numbers. To do this we get rid of the decimal point.
B = 27*10^29; MU = 10^-15;
And then we run your original Integrate command. Unfortunately, this doesn't work because of memory constraints. So what we would do in this case is first calculate the integral with just abstract symbols. Here I've used val1 and val2 which are not defined:
Integrate[x/(Exp[val1*(x + val2)] - 1), {x, 0, Infinity}]
This gives us this answer:
PolyLog[2, E^(-val1 val2)]/val1^2
And we can substitute B and MU into this formula:
PolyLog[2, E^(-val1 val2)]/val1^2 /. {val1 -> B, val2 -> MU}
There's a number of things you can with this output. Converting to decimal however would require either some manual work or would require arbitrary precision computing.
POSTED BY: Sean Clarke
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract