Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #10837 > unrolled thread

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

Started byJUN <noeckel@gmail.com>
First post2012-07-08 22:57 +0000
Last post2012-07-08 22:57 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Re: Integration result depends on variable name / problem with BesselJ Integral representation JUN <noeckel@gmail.com> - 2012-07-08 22:57 +0000

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

FromJUN <noeckel@gmail.com>
Date2012-07-08 22:57 +0000
SubjectRe: Integration result depends on variable name / problem with BesselJ Integral representation
Message-ID<jtd38o$9fc$1@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

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web