MathGroup Archive 2007

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

Search the Archive

Re: bug in Integrate

  • To: mathgroup at smc.vnet.net
  • Subject: [mg74842] Re: bug in Integrate
  • From: "dimitris" <dimmechan at yahoo.com>
  • Date: Sat, 7 Apr 2007 04:08:22 -0400 (EDT)
  • References: <ev2b70$kh1$1@smc.vnet.net>

As another way

In[1]:=
hh=Integrate[Exp[(-s)*x]*x*BesselJ[0, x]*{Sin[x], Cos[x]}, {x, 0,
Infinity}, Assumptions -> s > 0]
Out[1]=
{(2*((4 + s^2)/(4 + s^2 + s*Sqrt[4 + s^2]))^(3/2)*(-2*Sqrt[2] -
3*Sqrt[2 + 8/s^2] +
     (Sqrt[4 + s^2]*(4 + s^2 + s*Sqrt[4 +
s^2])^(3/2)*Sin[(1/2)*ArcTan[2/s]])/s))/((1 + 4/s^2)^(9/4)*s^5),
  (Sqrt[4 + s^2]*Cos[(1/2)*ArcTan[2/s]] - Sin[(3/2)*ArcTan[2/s]])/
(s^(3/2)*(4 + s^2)^(3/4))}

In[2]:=
Limit[hh, s -> 0]
Out[2]=
{Infinity, Infinity}

As a confirmation of the results

In[8]:=
N[(hh /. s -> #1 & ) /@ Range[10]]

Out[8]=
{{0.32471944675364234, 0.2710031717526413}, {0.10889239789833705,
0=2E12555398966201653},
  {0.04723705733906774, 0.07530187654292698}, {0.02372791375802883,
0=2E049058779961475334},
  {0.013311535465032668, 0.03398068316587049}, {0.008123089772996252,
0=2E024720911721638525},
  {0.005288413183016432, 0.018703817682003413},
{0.0036221101290556963, 0.014604184230987695},
  {0.002583487202588775, 0.011698744981742358},
{0.0019045195998024938, 0.009570907718712243}}

In[13]:=
(NIntegrate[Evaluate[Exp[(-#1)*x]*x*BesselJ[0, x]*{Sin[x], Cos[x]}],
{x, 0, Infinity}] & ) /@ Range[10]

Out[13]=
{{0.32471946120480705, 0.2710031717512259}, {0.10889239874531485,
0=2E12555398989365918},
  {0.04723705733892178, 0.0753018765429565}, {0.023727913758051007,
0=2E04905877992943386},
  {0.013311535464778371, 0.033980683166515285}, {0.00812308977302087,
0=2E024720911721629768},
  {0.0052884131830155095, 0.018703817682001973},
{0.0036221101290554517, 0.014604184230987848},
  {0.0025834872025888352, 0.011698744981742434},
{0.0019045195998025199, 0.009570907718712215}}


Dimitris

=CF/=C7 Bhuvanesh =DD=E3=F1=E1=F8=E5:
> Thanks for the report. This has already been fixed in the development ver=
sion for quite a while. In this case, you can get the expected divergence u=
sing GenerateConditions->True, which does more extensive checking:
>
> In[1]:= $Version
>
> Out[1]= 5.2 for Microsoft Windows (June 10, 2005)
>
> In[2]:= Integrate[x*BesselJ[0, x]*Cos[x], {x, 0, Infinity}, GenerateCon=
ditions->True]
>
> Integrate::idiv: Integral of x BesselJ[0, x] Cos[x] does not converge on =
{0, Infinity}.
>
> Out[2]= Integrate[x BesselJ[0, x] Cos[x], {x, 0, Infinity}, GenerateCon=
ditions -> True]
>
> In[3]:= Integrate[x*BesselJ[0, x]*Sin[x], {x, 0, Infinity}, GenerateCon=
ditions->True]
>
> Integrate::gener: Unable to check convergence.
>
> Integrate::idiv: Integral of x BesselJ[0, x] Sin[x] does not converge on =
{0, Infinity}.
>
> Out[3]= Integrate[x BesselJ[0, x] Sin[x], {x, 0, Infinity}, GenerateCon=
ditions -> True]
>
> Bhuvanesh,
> Wolfram Research.



  • Prev by Date: Re: integration for CDF[NoncentralChiSquareDistribution] failing
  • Next by Date: GenerateConditions setting
  • Previous by thread: Re: bug in Integrate
  • Next by thread: Performance--OSX universal binary