0

For my research, I've been modelling some experimental results and I stumbled upon this integral: $$\int_{x_0}^{x_1}\frac{1}{x}\frac{1}{1+e^{ax-b}}dx$$ where $x_0$, $x_1$, $a$ and $b$ $\in\mathbb{R}^+$. I've been trying to solve it analytically for a while but it seems there no solution in terms of ordinary functions. Is there any way to solve the following integral analytically?

2 Answers2

1

At least maxima version 5.43.0 on Fedora 31 doesn't know how to integrate this. In general, computer algebra systems include algorithms that are able to integrate anything that has an antiderivative. Perhaps for specific values of $a, b, x_0, x_1$ you can get a formula, or you'll have to resort to numerical integration (try e.g. SciPy or SymPy for such manipulations).

vonbrand
  • 27,812
1

Assuming $0 < x_0 < x_1$, $a>0$ and $e^{ax_0-b} \gg1$, we could probably write $$\frac{1}{1+e^{a x-b}}=\sum_{n=1}^\infty (-1)^{n+1} e^{-(ax-b)n}$$ making $$I=\int\frac{1}{x}\frac{1}{1+e^{ax-b}}dx=\int\sum_{n=1}^\infty (-1)^{n+1} \frac{e^{-(ax-b)n}}x\,dx$$ that is to say $$I=\sum_{n=1}^\infty (-1)^{n+1} e^{bn}\,\text{Ei}(-a n x)$$

Trying, just as an example, with $a=1$, $b=2$, $x_0=2$ and varying $x_1$,we should obtain $$\left( \begin{array}{ccc} x_1 & \text{approximation} & \text{exact} \\ 3 & 0.1572187183 & 0.1572187192 \\ 4 & 0.2118594679 & 0.2118594691 \\ 5 & 0.2296373488 & 0.2296373497 \\ 6 & 0.2352676157 & 0.2352676169 \\ 7 & 0.2370523888 & 0.2370523897 \\ 8 & 0.2376247135 & 0.2376247144 \\ 9 & 0.2378107346 & 0.2378107355 \\ 10 & 0.2378719542 & 0.2378719553 \end{array} \right)$$

For sure, $b>0$ makes the convergence not fast. With $b \leq 0$, it is just a dream.