3
$\begingroup$

Consider

$$\int_{0}^{\infty}{e^{-x}\over 1+x}\mathrm dx=-eE_i(-1)=0.596347...\tag1$$

$$\int_{0}^{\infty}\left({1\over 1+x}-e^{-x}\right)\cdot{\mathrm dx\over 1+x}=eE_i(-1)=-0.596347...\tag2$$

$$\int_{0}^{\infty}{\mathrm dx\over (1+x)^2}=1\tag3$$

$E_i(x)$;Exponential integral

Here is the problem I am so confused with

$(1)+(2)$

$$\int_{0}^{\infty}{e^{-x}\over 1+x}\mathrm dx+ \int_{0}^{\infty}\left({1\over 1+x}-e^{-x}\right)\cdot{\mathrm dx\over 1+x}=0\tag4$$

Simplify $(4)$

$$\int_{0}^{\infty}{\mathrm dx\over (1+x)^2}=0\tag5$$

$(5)$ supposed to $\color{red}1$.

Why did I went wrong?

  • 6
    $(2)$ cannot be right. The integral of a positive function over $\mathbb{R}^+$ cannot be negative.2017-02-21
  • 3
    This looks like one of the usual bugs in programs like Mathematica or whatever is used by Wolfram Alpha, say...2017-02-21
  • 0
    I check and check on wolfram integrator many times2017-02-21
  • 0
    You probably right @Don2017-02-21
  • 0
    Extneding @Don 's thoughts, I would recommend submitting a bug report.2017-02-21
  • 0
    @Bui Almost undoubtedly: the integrand in integral (2) is non-negative, so if it converges it can't possibly equal a negative number, as already commented and answered.2017-02-21
  • 0
    Mathematica $8$ returns $1+e\,\text{Ei}(-1)$ as a value of $(2)$, that is correct.2017-02-21
  • 0
    This is the link http://www.wolframalpha.com/input/?i=integrate+(1%2F(1%2Bx)-e%5E(-x))(1%2F(1%2Bx))dx,x%3D0+to+infty2017-02-21
  • 2
    It looks like Houston has a problem the old Houston did not have :D2017-02-21
  • 1
    @JackD'Aurizio That just made my day XD Odd that Mathematica would just drop that $+1$ part...2017-02-21

1 Answers 1

5

The value for integral (2) you wrote is not correct. On $[0,\infty)$, we must have $(1+x)^{-1} \ge e^{-x}$, because $$e^x = \sum_{k=0}^\infty \frac{x^k}{k!} \ge 1 + x.$$ Thus, the integrand is strictly nonnegative for all $x \ge 0$.


In Mathematica (Version 10.4 on my system), the command

Integrate[(1/(1 + x) - Exp[-x])/(1 + x), {x, 0, Infinity}]

returns E ExpIntegralEi[-1] which then evaluated numerically gives a negative real number. However,

NIntegrate[(1/(1 + x) - Exp[-x])/(1 + x), {x, 0, Infinity}]

gives 0.403653 which is correct. I suspect the issue has to do with branch cut evaluation. It may have been fixed in subsequent versions. Note that the correct value can be evaluated symbolically with the command

Integrate[1/(1 + x)^2, {x, 0, Infinity}] - Integrate[Exp[-x]/(1 + x), {x, 0, Infinity}]