MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Incorrect symbolic improper integral

  • To: mathgroup at smc.vnet.net
  • Subject: [mg103628] Re: [mg103586] Incorrect symbolic improper integral
  • From: DrMajorBob <btreat1 at austin.rr.com>
  • Date: Wed, 30 Sep 2009 05:03:29 -0400 (EDT)
  • References: <200909291138.HAA25632@smc.vnet.net>
  • Reply-to: drmajorbob at yahoo.com

No, the first result is right, the second is wrong... and you must be  
using an older version of Mathematica.

Here are M7's answers for both:

Integrate[Cos[x]/(1 + x^2), {x, -\[Infinity], \[Infinity]}]
N@%

\[Pi]/E

1.15573

Integrate[Cos[a x]/(1 + x^2), {x, -\[Infinity], \[Infinity]},
  Assumptions -> a \[Element] Reals]
% /. a -> 1

E^-Abs[a] \[Pi]

\[Pi]/E

Here's a check with NIntegrate:

2 NIntegrate[Cos[x]/(1 + x^2), {x, 0, 100}]

1.15562

and here's a brute force check:

Clear[f, x]
upper = 100;
n = 100000;
f[x_] = Cos[x]/(1. + x^2);
2 Sum[f[k upper/n] upper/n, {k, 0, n}]

1.15662

Bobby

On Tue, 29 Sep 2009 06:38:28 -0500, jwmerrill at gmail.com  
<jwmerrill at 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
>


-- 
DrMajorBob at yahoo.com


  • Prev by Date: Re: Re: White Noise in Simulation
  • Next by Date: Re: Incorrect symbolic improper integral
  • Previous by thread: Re: Incorrect symbolic improper integral
  • Next by thread: Re: Incorrect symbolic improper integral