Message Boards Message Boards

1
|
7878 Views
|
6 Replies
|
2 Total Likes
View groups...
Share
Share this post:

Integral. Wrong answer.

Posted 10 years ago

Let's consider the integral: $\int_0^\infty \frac{1-e^{-x}}{x} \cos{x} \ \mathrm{d}x$

If you use Mathematica 7, you will get the right answer $\frac{1}{2} \log{2}$. You can check convergence by Dirichlet's test: S. C. Malik, Savita Arora "Mathematical analysys" (second edition). 5.2 Tests for Convergence, page 391. "Dirichlet's test."

But the last version returns "integral does not converge". On the other hand, the last version calculates:

$\int_0^1 \frac{1-e^{-x}}{x} \cos{x} \ \mathrm{d}x + \int_1^\infty \frac{1-e^{-x}}{x} \cos{x} \ \mathrm{d}x$

and $\int_0^{-\infty} \frac{1-e^{x}}{x} \cos{x} \ \mathrm{d}x$.

The current version also knows answer to NIntegrate of the function.

Hence, we see the BUG (obviously, the result is not correct). But Wolfram|Alpha support team answered, "After review, our internal development group believes the output given is correct." ([W|A #487459])

Does Wolfram Mathematica use general mathematics rules or special branch only, e.g. "Wolfram branch of maths"?

POSTED BY: Iurii Popov
6 Replies

Yeah, looks like a bug (analyzing for convergence is a difficult area to automate). Will investigate further.

POSTED BY: Daniel Lichtblau

You can obtain the result using the PrincipalValue -> True option. This setting tell Integrate to handle simple poles.

$Version
Integrate[(1 - Exp[-x])/x Cos[x], {x, 0, Infinity}, PrincipalValue -> True]

enter image description here

Btw, Version 9 also handles it the same way (gives same error without the PrincipalValue -> True setting) so this might not be a bug, but I am not an expert on this.

POSTED BY: Nasser M. Abbasi

In[10]:= Integrate[(1 - Exp[-x])/x Cos[x], {x, 0, ul}, Assumptions -> {ul > 0}]

Out[10]= 1/2 (2 CosIntegral[ul] - ExpIntegralEi[(-1 - I) ul] - ExpIntegralEi[(-1 + I) ul] + Log[2])

In[11]:= Limit[%, ul -> [Infinity]]

Out[11]= 1/4 (Log[-2 - 2 I] - Log[-1 - I] - Log[-1 + I] + Log[-(1/2) + I/2] - Log[1/2 - I/2] - Log[1/2 + I/2] + Log[1 - I] + Log[1 + I])

In[12]:= FullSimplify[%]

Out[12]= Log[2]/2

POSTED BY: Frank Kampas
Posted 10 years ago

As I can see the bug has not been fixed yet. Do you know the class of functions that we can believe the result of integration? I am afraid to use Mathematica because of uncertain results.

POSTED BY: Iurii Popov

There's no 100% guaranteed source for integrals. I remember in grad school wasting a lot of time once due to an incorrect integral in Gradshteyn and Ryzhik, the "Bible" of integrals.

POSTED BY: Frank Kampas

It was fixed in the internal version under development. It was not back-ported to 10.0.1. It is not considered to be a show-stopper level of bug and, to my mind, the risks of doing so outweigh the benefits. Risks include both delays in shipping, and the possibility of introducing subtle new bugs.

POSTED BY: Daniel Lichtblau
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract