MathGroup Archive 2007

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

Search the Archive

Re: BesselK problems at large argument?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg78988] Re: BesselK problems at large argument?
  • From: antononcube <antononcube at gmail.com>
  • Date: Sat, 14 Jul 2007 02:48:41 -0400 (EDT)
  • References: <f74t6o$941$1@smc.vnet.net>

These integrals are not problematic for 5.2's NIntegrate and 6.0's
NIntegrate:

In[1]:= $Version
Out[1]= 5.2 for Linux

In[2]:= Clear[expr];
expr[n_, a_, w_] := NIntegrate[r^n*BesselK[0, w*r]^2, {r, a,
Infinity}]
Table[expr[1, a, w], {a, .5, 1.5, .25}, {w, .5, 1.5, .25}]
Table[expr[3, a, w], {a, .5, 1.5, .25}, {w, .5, 1.5, .25}]


Out[4]= {{1.458, 0.524409, 0.236156, 0.120212, 0.0661115},
>    {1.17992, 0.374665, 0.148751, 0.0667275, 0.0323353},
>    {0.944623, 0.264446, 0.0925154, 0.0365681, 0.0156156},
>    {0.751327, 0.185354, 0.0571376, 0.0199026, 0.00749098},
>    {0.595004, 0.129341, 0.0351351, 0.010787, 0.00357918}}


Out[5]= {{5.28291, 1.022, 0.312131, 0.121608, 0.0550112},
>    {5.17388, 0.963846, 0.278494, 0.101208, 0.0422406},
>    {4.9941, 0.880179, 0.236075, 0.0785991, 0.0297837},
>    {4.75032, 0.780923, 0.191892, 0.0578847, 0.0197326},
>    {4.45591, 0.67585, 0.15078, 0.0409175, 0.0124792}}


Anton Antonov
Wolfram Research, Inc.



On Jul 12, 4:44 am, Bob Hanlon <hanl... at cox.net> wrote:
> If I understand your integrals, they can be done symbolically.
>
> $Version
>
> 5.2 for Mac OS X (June 20, 2005)
>
> Clear[expr];
>
> expr[n_,a_, w_]=Integrate[r^n * BesselK[0, w * r]^2,
>     {r, a, Infinity}, Assumptions->{w>0, a>0}]
>
> (1/4)*Sqrt[Pi]*w^(-n - 1)*MeijerG[{{}, {1, (n + 2)/2}},
>    {{0, (n + 1)/2, (n + 1)/2, (n + 1)/2}, {}}, a^2*w^2]
>
> Table[expr[1,a,w],{a,.5,1.5,.25},
>   {w,.5,1.5,.25}]
>
> Table[expr[3, a, w], {a, .5, 1.5, .25},
>   {w, .5, 1.5, .25}]
>
> Bob Hanlon
>
> ---- AES <sieg... at stanford.edu> wrote:
> > Optical fiber mode calculations, at least if done programmed
> > straightforwardly, require evaluating integrals of r BesselK[0, w r]^2
> > and r^3 BesselK[0, w r]^2 from a finite value r = a out to r = infinity,
> > for smallish (order unity) values of w and a , usingNIntegrateand with
> > all quantities real.  
>
> > Trying to do this for different parameter values, however, I keep
> > running into messages saying things like "Integral failed to converge to
> > desired precision," or at other times
>
> >    BesselK[0, r] is not numerical at {r}  =  {5.`*^8}
>
> > I don't think there's a programming error involved, because for some
> > values of the parameters everything comes out just fine.
>
> > I'm aware that BesselK[ ] has a simple asymptotic form at large r , and
> > I suppose I could mess around trying to switch to it at large r , or
> > figure out some way to truncate the integral at some large outer limit.
>
> > But, hey, BesselK is a nice smooth, non-oscillatory (and long known)
> > function, which decreases very rapidly at large r.  Shouldn't these
> > integrals work OK -- or more important, is there an option I can set to
> > make them go OK?
>
> > [This is still 5.2 on Mac OS 10.3.9.]





  • Prev by Date: Re: annoying documentation in 6 (rant)
  • Next by Date: Re: RotationTransform Neat Example Strange Result
  • Previous by thread: Re: BesselK problems at large argument?
  • Next by thread: Re: BesselK problems at large argument?