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


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

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

Started by"Kevin J. McCann" <kjm@KevinMcCann.com>
First post2012-07-07 09:30 +0000
Last post2012-07-08 05:52 +0000
Articles 2 — 2 participants

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


Contents

  Re: Integration result depends on variable name / problem with BesselJ Integral representation "Kevin J. McCann" <kjm@KevinMcCann.com> - 2012-07-07 09:30 +0000
    Re: Integration result depends on variable name / problem with BesselJ Richard Fateman <fateman@cs.berkeley.edu> - 2012-07-08 05:52 +0000

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

From"Kevin J. McCann" <kjm@KevinMcCann.com>
Date2012-07-07 09:30 +0000
SubjectRe: Integration result depends on variable name / problem with BesselJ Integral representation
Message-ID<jt8vk9$k5c$1@smc.vnet.net>
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, richardw@gmx.at 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
>


[toc] | [next] | [standalone]


#10830 — Re: Integration result depends on variable name / problem with BesselJ

FromRichard Fateman <fateman@cs.berkeley.edu>
Date2012-07-08 05:52 +0000
SubjectRe: Integration result depends on variable name / problem with BesselJ
Message-ID<jtb77o$1ce$1@smc.vnet.net>
In reply to#10822
On 7/7/2012 2:30 AM, Kevin J. McCann wrote:
> This is a real issue. I tried the integrals as you suggested below, and
> indeed, I get the same results.

Me too.  I tried this:

Timing[{Integrate[Sin[2 b] Exp[I t Cos[b - c]], {b, 0, 2 \[Pi]}],
   Integrate[Sin[2 d] Exp[I t Cos[d - c]], {d, 0, 2 \[Pi]}]}]

returns

{148.562,{0,(8 I (-t Cos[t]+Sin[t]))/t^2}}

so the issue might be whether the variable of integration comes before 
or after the other item inside the cosine.

Note that Cos[b-c]  simplifies to Cos[b-c]  but
           Cos[d-c]  simplifies to Cos[c-d].

Since the sign of c is irrelevant in whatever Mathematica is doing
(wrong :)  ) and does not appear in the answer at all while it should..

we could just try this

Timing[{Integrate[Sin[2 b] Exp[I t Cos[b + c]], {b, 0, 2 \[Pi]}],
   Integrate[Sin[2 d] Exp[I t Cos[d + c]], {d, 0, 2 \[Pi]}]}]

which returns  {28.453, {0, 0}}.

At least it was faster.

[toc] | [prev] | [standalone]


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


csiph-web