Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2003

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

Search the Archive

NIntegrate singularity problem v4.0 vs v5.0

  • To: mathgroup at
  • Subject: [mg44412] NIntegrate singularity problem v4.0 vs v5.0
  • From: soummer at (Remi Soummer)
  • Date: Sat, 8 Nov 2003 04:50:54 -0500 (EST)
  • Sender: owner-wri-mathgroup at

the following code runs on v4.0.1 but not on v5.0, because of the
changes in NIntegrate function. It seems that v5.0 cannot handle the
conditional definition of the function K[].

There is a singularity for r=xi and I tried to use the new option in
v5.0, removing the conditional definition of K[] and giving the
singularity point r=x directly to NIntegrate :
\!\(Terme[x_, \[Alpha]_, \[Lambda]_] := \(\((2  \[Pi])\)\^2\)
      NIntegrate[r\ \ K[r, x, \[Alpha], \[Lambda]], {r, 0, x, 1\/2}]\)
it works fine for this function, but produces an other error in the
following integrals.
If someone has ideas about this problem or could help me, I will
greatly appreciate !

here is the code:

\!\(K[r_, \[Xi]_, \[Alpha]_, \[Lambda]_] := \(1\/\(2\ \[Pi]\
\[Lambda]\ \
\((r\^2 - \[Xi]\^2)\)\)\) \((r\ \[Alpha]\ BesselJ[
                0, \(2\ \[Pi]\ \[Alpha]\ \[Xi]\)\/\[Lambda]]\ BesselJ[
                1, \(2\ \[Pi]\ r\ \[Alpha]\)\/\[Lambda]] - \[Alpha]\
\[Xi]\ \
BesselJ[0, \(2\ \[Pi]\ r\ \[Alpha]\)\/\[Lambda]]\ BesselJ[
                1, \(2\ \[Pi]\ \[Alpha]\ \[Xi]\)\/\[Lambda]])\) /;
      UnsameQ[r, \[Xi]]\n
  K[r_, \[Xi]_, \[Alpha]_, \[Lambda]_] := \(\[Alpha]\^2\ \((BesselJ[0,
\(2\ \
\[Pi]\ \[Alpha]\ r\)\/\[Lambda]]\^2 + BesselJ[1, \(2\ \[Pi]\ \[Alpha]\
\[Lambda]]\^2)\)\)\/\(2\ \[Lambda]\^2\) /; SameQ[r, \[Xi]]\n
  Terme[x_, \[Alpha]_, \[Lambda]_] := \(\((2  \[Pi])\)\^2\)
      NIntegrate[r\ \ K[r, x, \[Alpha], \[Lambda]], {r, 0, 1\/2}]\n
  \(PsiC[x_, r1_, r2_, z1_, z2_, \[Lambda]_] :=
      1 + Terme[x,
            r2, \[Lambda]] \((\[ExponentialE]\^\(\[ImaginaryI]\ \ 2 
\[Pi]\ 2\
\ z2/\[Lambda]\) - 1)\) +
            r1, \[Lambda]] \((\[ExponentialE]\^\(\[ImaginaryI]\ \ 2 
\[Pi]\ 2\
\ z1/\[Lambda]\) - \[ExponentialE]\^\(\[ImaginaryI]\ \ 2  \[Pi]\ 2\
  \(Cr[r1_, r2_, z1_, z2_] :=
          2  \[Pi]\ x\ Abs[PsiC[x, r1, r2, z1, z2, \[Lambda]]]\^2, {x,
            0,  .5}], {\[Lambda],  .8, 1.2}];\)\n
  Cr[ .3,  .5, 2.1, 1.5]\)

  • Prev by Date: Re: Re: Re: Re: Integration
  • Next by Date: Re: Re: Re: FourierTransform of Sinc Function
  • Previous by thread: Re: differences in Solve with -1/2 and -0.5Re:
  • Next by thread: Re: NIntegrate singularity problem v4.0 vs v5.0