Fermi-Dirac like Integral

91 Views Asked by At

I've been trying to decipher some old (undocumented, poorly written) code and have reached a sticking point. It boils down to evaluating an integral of the form $$I = \int_{0}^{\infty}L(x)\cdot\frac{1}{1+\exp(a+bx)}dx$$ where $L(x) = \frac{1}{1+(x-c)^2}$.

The original writers then (I think) split the integral at $x_*=-\frac{b}{a}$ and apply a binomial expansion (ensuring the exponent in the denominator is less than 1) to $(1+\exp(a+bx))^{-1}$ yielding: $$I = \int_{0}^{x_*}L(x)dx +\sum_{k=1}^{\infty}(-1)^k\Big[\int_{0}^{x_*}L(x)e^{k(a+bx)}dx + \int_{x_*}^{\infty}L(x)e^{-k(a+bx)}dx\Big]$$

The bit I am stuck at is what they do next with $L(x)$. The result has some fixed constants which I can only assume are constants of integration. Taking the first part of the above expansion where $k=0$, the code seems to be doing something like the following:

$$\int_0^{x_*}L(x)dx = \sum_j\alpha_j\int_0^{x_*}\frac{e^{-\beta_j(x-c)}}{x}dx$$ for some pre-defined/computed j-dependent $\alpha, \beta$ which are a bit of a mystery to me. It looks like a bit like a series expansion making some use of the exponential integral $Ei(x)$ ?! I think this part of the integral is only not performed analytically so it's in the same format as the $k\neq0$ parts of the expansion.

My questions are:

(1) Where might these constants have come from and/or what would the next step be to compute this integral? Any theories are welcome!

(2) Could I simply abandon all these expansions and compute the integral analytically using a Laplace transform, particularly making use of the property $\int_0^{\infty}f(x)g(x)dx = \int_0^{\infty}\mathcal{L}\{f(x)\}(s)\cdot \mathcal{L}^{-1}\{g(x)\}(s)ds$ (ref: https://en.wikipedia.org/wiki/Laplace_transform#Evaluating_integrals_over_the_positive_real_axis) ?

Ideally I'd like to extend whatever evaluation method I settle on to use some different forms of $L(x)$.

Thanks in advance! :)

1

There are 1 best solutions below

0
On BEST ANSWER

It seems that the approach uses the fact that

$$L(x)=\frac{1}{2i} \left ( \frac{1}{x-(c+i)}-\frac{1}{x-(c-i)} \right ).$$

Next the point is that you can do a geometric series expansion of the other term, but which one is appropriate depends on which side of $x_*$ you're on:

  • When $a+bx>0$, the exponential is bigger, and so you multiply top and bottom by $\exp(-a-bx)$ to get $\frac{\exp(-a-bx)}{1+\exp(-a-bx)}$ leaving you with $\sum_{n=1}^\infty (-1)^{n-1} \exp(-n(a+bx))$
  • When $a+bx<0$, the exponential is smaller, so you just have $\sum_{n=0}^\infty (-1)^n \exp(n(a+bx))$.

Which way is on which side of $x_*$ depends on the sign of $b$, contrary to what you wrote which requires $b>0$. And of course this only even matters if $a$ and $b$ have different signs. If they have the same sign then $x_*$ is out of the domain of integration and you just do the first thing throughout.

So overall you have some case work.

If $a$ and $b$ are both positive, then

$$f(x)=\sum_{n=1}^\infty (-1)^{n-1}\frac{1}{2i} \left ( \frac{1}{x-(c+i)}-\frac{1}{x-(c-i)} \right ) \exp(-n(a+bx)).$$

If $a$ and $b$ are both negative, then

$$f(x)=\sum_{n=0}^\infty (-1)^n \frac{1}{2i} \left ( \frac{1}{x-(c+i)}-\frac{1}{x-(c-i)} \right ) \exp(n(a+bx)).$$

Otherwise:

$$f(x)=\begin{cases} \sum_{n=1}^\infty (-1)^{n-1}\frac{1}{2i} \left ( \frac{1}{x-(c+i)}-\frac{1}{x-(c-i)} \right ) \exp(-n(a+bx)) & a+bx>0 \\ \sum_{n=0}^\infty (-1)^n \frac{1}{2i} \left ( \frac{1}{x-(c+i)}-\frac{1}{x-(c-i)} \right ) \exp(n(a+bx)) & a+bx<0 \end{cases}.$$

In any case the last step to get these into the form you had up there is to simply change variables to $x-(c\pm i)$ depending on which term we're talking about.