Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Incorrect symbolic improper integral
Replies: 11   Last Post: Oct 5, 2009 7:53 AM

 Search Thread: Advanced Search

 Messages: [ Previous | Next ]
 jwmerrill@gmail.com Posts: 28 Registered: 2/13/08
Re: Incorrect symbolic improper integral
Posted: Sep 30, 2009 5:05 AM
 Plain Text Reply

On Tue, Sep 29, 2009 at 8:37 AM, Andrzej Kozlowski <akoz@mimuw.edu.pl> wrote:
> The answer returned by Integrate agrees with the one given by NIntegrate,
> which uses very different methods:
>
> Integrate[
> Cos[x]/(1 + x^2), {x, -\[Infinity], \[Infinity]}] // N
>
> 1.15573
>
> NIntegrate[
> Cos[x]/(1 + x^2), {x, -\[Infinity], \[Infinity]}] // N
>
> 1.15573

Yes, you are right. I tried this immediately after posting, and feel a
little silly now. I had convinced myself with an argument about
contour integration that doesn't work because Cos blows up in both the
upper and lower half plane. It is actually the more general answer
that appears to be wrong.

I should have been more careful before saying which was wrong, but it
was plain that the two answers disagree.

> Simple numerical checks show that your proposed answer is far too large and
> can't be right. And what is even more curious is that my Mathemaica 7.01
> returns:
>
> Integrate[Cos[a*x]/(1 + x^2), {x, -Infinity, Infinity},
> Assumptions -> Element[a, Reals]]
>
> Pi/E^Abs[a]
>
> Exactly the same answer is returned by all versions of Mathematica from 5.2.
> and 6.03 (the only ones I have tested). So which version gave your answer?

That's good to see. I'm using 7.0.0, so it looks like the bug in the
more general answer has been fixed.

JM

> Andrzej Kozlowski
>
>
>
>
> On 29 Sep 2009, at 20:38, jwmerrill@gmail.com wrote:
>

>> Below is a definite integral that Mathematica does incorrectly.
>> Thought someone might like to know:
>>
>> In[62]:= Integrate[Cos[x]/(1 + x^2), {x, -\[Infinity], \[Infinity]}]
>>
>> Out[62]= \[Pi]/E
>>
>> What a pretty result--if it were true. The correct answer is \[Pi]*Cosh
>> [1], which can be checked by adding a new parameter inside the
>> argument of Cos and setting it to 1 at the end:
>>
>> In[61]:= Integrate[Cos[a x]/(1 + x^2), {x, -\[Infinity], \[Infinity]},
>> Assumptions -> a \[Element] Reals]
>>
>> Out[61]= \[Pi] Cosh[a]
>>
>> Regards,
>>
>> Jason Merrill
>>

>
>

Date Subject Author
9/30/09 Mark McClure
9/30/09 Andrzej Kozlowski
9/30/09 DrMajorBob
9/30/09 lshifr@gmail.com
9/30/09 jwmerrill@gmail.com
9/30/09 Daniel Lichtblau
10/3/09 Mariano
10/4/09 Daniel Lichtblau
10/5/09 Mariano
9/30/09 Bayard Webb
9/30/09 lshifr@gmail.com

© The Math Forum at NCTM 1994-2018. All Rights Reserved.