Re: Problem with evaluation of Besel Functions

*To*: mathgroup at smc.vnet.net*Subject*: [mg56064] Re: Problem with evaluation of Besel Functions*From*: "adamizer" <adam.smith at hillsdale.edu>*Date*: Thu, 14 Apr 2005 08:56:18 -0400 (EDT)*References*: <d3g8kd$smh$1@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

Many have noted the difference between using 3/2 vs 1.5 However there is another aspect to your post that I noticed. The result depends on exactly how you do the substitution. Reversing the order avoids the complex infinity, indeterminate problem. Look at: (BesselJ[xx, yyy] /. xx -> 1.5) /. yyy -> 0 Returns ComplexInfinity (or Inderterminate for xx->3/2) versus doing it in the other order: (BesselJ[xx, yyy] /. yyy -> 0) /. xx -> 1.5 Returns 0. (or 0 for xx->3/2) A technique that I often employ is to substitute all variables at the same time by enclosing all the replacements inside curly brackets. BesselJ[xx, yyy]/.{xx->1.5,yyy->0.} This may help with your "problems with Bessel and Legendre" function evaluating differently. Adam Smith Ariel sumeruk wrote: > Hello > I am having a problem evaluating various functions, One example is the following > > BesselJ[1.5, 0] evaluates to 0 but > (BesselJ[xx, yyy] /. xx -> 1.5) /. yyy -> 0 evaluates to complex infinity > > I seem to encounter many of these problems with Bessel and Legendre > functions where I get actual diffrent numerical results depending on > How I set the parameters. > Thanks for anyone who might help > Ariel