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?

$\endgroup$
  • 6
    $\begingroup$ $(2)$ cannot be right. The integral of a positive function over $\mathbb{R}^+$ cannot be negative. $\endgroup$ – Jack D'Aurizio Feb 21 '17 at 20:31
  • 3
    $\begingroup$ This looks like one of the usual bugs in programs like Mathematica or whatever is used by Wolfram Alpha, say... $\endgroup$ – DonAntonio Feb 21 '17 at 20:33
  • $\begingroup$ I check and check on wolfram integrator many times $\endgroup$ – gymbvghjkgkjkhgfkl Feb 21 '17 at 20:34
  • 2
    $\begingroup$ It looks like Houston has a problem the old Houston did not have :D $\endgroup$ – Jack D'Aurizio Feb 21 '17 at 20:40
  • 1
    $\begingroup$ @JackD'Aurizio That just made my day XD Odd that Mathematica would just drop that $+1$ part... $\endgroup$ – Brevan Ellefsen Feb 21 '17 at 21:02
5
$\begingroup$

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}]
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.