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! :)