MathGroup Archive 2012

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

Search the Archive

Re: Integration result depends on variable name / problem with BesselJ Integral representation

  • To: mathgroup at smc.vnet.net
  • Subject: [mg127209] Re: Integration result depends on variable name / problem with BesselJ Integral representation
  • From: JUN <noeckel at gmail.com>
  • Date: Sun, 8 Jul 2012 19:05:08 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: mathgroup-newout@smc.vnet.net
  • Delivered-to: mathgroup-newsend@smc.vnet.net

On Saturday, July 7, 2012 2:30:49 AM UTC-7, Kevin J. McCann wrote:
> This is a real issue. I tried the integrals as you suggested below, and 
> indeed, I get the same results.
> 
> If, however, I change psi to the Greek letter psi in the first version, 
> I get zero. Not sure what is going on, but it is a bug.
> 
> Kevin
> 
> On 7/2/2012 10:24 PM, richard wrote:
> > Dear all,
> >
> > the following integral is the integral representation of the bessel function of first kind, second order. But mathematica (8.0.4.0) gives me wrong results, depending on the variable name, it seems:
> > first with x:
> > Integrate[Sin[2 x] Exp[I t Cos[x - psi]], {x, 0, 2 \[Pi]}]
> > (8 I (-t Cos[t] + Sin[t]))/t^2
> >
> > then x substituted with p:
> > Integrate[Sin[2 p] Exp[I t Cos[p - psi]], {p, 0, 2 \[Pi]}]
> > 0
> >
> > How can the result depend on the variable name? There are no values assigned to x or p. The analytically obtained solution should be
> > 2 \[Pi] I^2 BesselJ[2, t] Sin [2 psi]
> >
> > Regards,
> > Richard
> >

Regarding Kevin's observations -- this is consistent with the lexicographical ordering of the variable names:

Sort[{psi, x, \[Psi]}]

Apparently the result is zero whenever the integration variable comes before the "shift" variable in the exponential -- e.g., Cos[x - psi] gets transformed to Cos[psi - x]. 

Anyway, this is a long-standing bug that inexplicably has been patched up only incorrectly so far. See the discussion under this post:

http://mathematica.stackexchange.com/a/2743/245

where I also link to the earlier MathGroup post acknowledging the bug. 

One work-around for it is to replace the original integral by 

Integrate[Sin[2 (x + psi)] Exp[I t Cos[x]], {x, 0, 2 \[Pi]}]

where I have made a substitution of variables to x - psi -> x.

Jens



  • Prev by Date: Re: polarplot with arrow bearing tickmarks
  • Next by Date: Find and Replace
  • Previous by thread: Re: Integration result depends on variable name / problem with BesselJ Integral representation
  • Next by thread: Why Export drops namespace prefixes in the exported XML?