Re: Incorrect symbolic improper integral
- To: mathgroup at smc.vnet.net
- Subject: [mg103633] Re: [mg103586] Incorrect symbolic improper integral
- From: Leonid Shifrin <lshifr at gmail.com>
- Date: Wed, 30 Sep 2009 05:04:28 -0400 (EDT)
- References: <200909291138.HAA25632@smc.vnet.net>
Hi Jason
Before claiming that the first result is wrong you could try some numerics
and see that it is correct. What is wrong is the second result, and the
right answer is
Pi*(HeavisideTheta[a]*Exp[-a] + HeavisideTheta[-a]*Exp[a])
You can see that the \[Pi] Cosh[a] result is wrong, just by noticing that
for a->Infinity, the integral must go to zero since the integrand becomes
highly oscillatory, whereas it goes to infinity for \[Pi] Cosh[a].
Alternatively,
doing the integral with residues, you can see that you close the contour in
upper or lower semi-plane depending on the sign of <a>, which leads to the
result above - for a fixed value of <a>, you never get a contribution from
both poles.
Actually, it is the second result (\[Pi] Cosh[a]) that looks like a bug to
me.
Regards,
Leonid
On Tue, Sep 29, 2009 at 3:38 PM, 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
>
>
- References:
- Incorrect symbolic improper integral
- From: "jwmerrill@gmail.com" <jwmerrill@gmail.com>
- Incorrect symbolic improper integral