Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2002
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2002

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

Search the Archive

a numerical integration

  • To: mathgroup at smc.vnet.net
  • Subject: [mg36795] a numerical integration
  • From: bagarell at unipa.it (fabio bagarello)
  • Date: Thu, 26 Sep 2002 04:56:47 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Well,
I have written the following notebook with Mathematica

In[78]:=
a=Sqrt[4*Pi/Sqrt[3]]
In[79]:=
fcom[k_,mu_]:=((
            1+Exp[-I*mu*2*Pi/a]+Exp[-I*mu*4*Pi/a])*(1-Exp[-I*k*(a-mu)])/(I*k)+
        Exp[-I*mu*2*
              Pi/a]*((1-Exp[-I*(k+2*Pi/a)*(a-mu)])/(I*(k+2*Pi/a))+(
                  1-Exp[-I*(k-2*Pi/a)*(a-mu)])/(I*(k-2*Pi/a)))+
        Exp[-I*mu*4*
              Pi/a]*((1-Exp[-I*(k+4*Pi/a)*(a-mu)])/(I*(k+4*Pi/a))+(
                  1-Exp[-I*(k+2*Pi/a)*(a-mu)])/(I*(k+2*Pi/a)))+(
            1-Exp[-I*(k-2*Pi/a)*(a-mu)])/(I*(k-2*Pi/a))+(
            1-Exp[-I*(k-4*Pi/a)*(a-mu)])/(I*(k-4*Pi/a)))/(3*a)
In[80]:=
f0[k_,mu_]:=((1+Exp[-I*mu*2*Pi/a]+Exp[-I*mu*4*Pi/a])*(a-mu)+
        Exp[-I*mu*2*
              Pi/a]*((1-Exp[-I*2*Pi/a*(a-mu)])/(I*(2*Pi/a))+(
                  1-Exp[-I*(-2*Pi/a)*(a-mu)])/(I*(-2*Pi/a)))+
        Exp[-I*mu*4*
              Pi/a]*((1-Exp[-I*(4*Pi/a)*(a-mu)])/(I*(4*Pi/a))+(
                  1-Exp[-I*(2*Pi/a)*(a-mu)])/(I*(2*Pi/a)))+(
            1-Exp[-I*(-2*Pi/a)*(a-mu)])/(I*(-2*Pi/a))+(
            1-Exp[-I*(-4*Pi/a)*(a-mu)])/(I*(-4*Pi/a)))/(3*a)
In[81]:=
fp1[k_,mu_]:=((
            1+Exp[-I*mu*2*Pi/a]+Exp[-I*mu*4*Pi/a])*(1-Exp[-I*2*Pi/a*(a-mu)])/(
              I*2*Pi/a)+
        Exp[-I*mu*2*Pi/a]*((1-Exp[-I*(4*Pi/a)*(a-mu)])/(I*(4*Pi/a))+(a-mu))+
        Exp[-I*mu*4*
              Pi/a]*((1-Exp[-I*(6*Pi/a)*(a-mu)])/(I*(6*Pi/a))+(
                  1-Exp[-I*(4*Pi/a)*(a-mu)])/(I*(4*Pi/a)))+(
          a-mu)+(1-Exp[-I*(-2*Pi/a)*(a-mu)])/(I*(-2*Pi/a)))/(3*a)
In[82]:=
fm1[k_,mu_]:=((
            1+Exp[-I*mu*2*Pi/a]+Exp[-I*mu*4*Pi/a])*(
              1-Exp[I*2*Pi/a*(a-mu)])/(-I*2*Pi/a)+
        Exp[-I*mu*2*Pi/a]*((a-mu)+(1-Exp[-I*(-4*Pi/a)*(a-mu)])/(I*(-4*Pi/a)))+
        Exp[-I*mu*4*Pi/a]*((1-Exp[-I*(2*Pi/a)*(a-mu)])/(I*(2*Pi/a))+(a-mu))+(
            1-Exp[-I*(-4*Pi/a)*(a-mu)])/(I*(-4*Pi/a))+(
            1-Exp[-I*(-6*Pi/a)*(a-mu)])/(I*(-6*Pi/a)))/(3*a)
In[83]:=
fp2[k_,mu_]:=((
            1+Exp[-I*mu*2*Pi/a]+Exp[-I*mu*4*Pi/a])*(1-Exp[-I*4*Pi/a*(a-mu)])/(
              I*4*Pi/a)+
        Exp[-I*mu*2*
              Pi/a]*((1-Exp[-I*(6*Pi/a)*(a-mu)])/(I*(6*Pi/a))+(1-Exp[-I*(
											2*Pi/a)*(a-mu)])/(I*(2*Pi/a)))+
        Exp[-I*mu*4*
              Pi/a]*((1-Exp[-I*(8*Pi/a)*(a-mu)])/(I*(8*Pi/a))+(
                  1-Exp[-I*(6*Pi/a)*(a-mu)])/(I*(6*Pi/a)))+(
            1-Exp[-I*(2*Pi/a)*(a-mu)])/(I*(2*Pi/a))+(a-mu))/(3*a)
In[84]:=
fm2[k_,mu_]:=((
            1+Exp[-I*mu*2*Pi/a]+Exp[-I*mu*4*Pi/a])*(
              1-Exp[I*4*Pi/a*(a-mu)])/(-I*4*Pi/a)+
        Exp[-I*mu*2*
              Pi/a]*((1-Exp[-I*(-2*Pi/a)*(a-mu)])/(I*(-2*Pi/a))+(
                  1-Exp[-I*(-6*Pi/a)*(a-mu)])/(I*(-6*Pi/a)))+
        Exp[-I*mu*4*
              Pi/a]*((a-mu)+(1-Exp[-I*(-2*Pi/a)*(a-mu)])/(I*(-2*Pi/a)))+(
            1-Exp[-I*(-6*Pi/a)*(a-mu)])/(I*(-6*Pi/a))+(
            1-Exp[-I*(-8*Pi/a)*(a-mu)])/(I*(-8*Pi/a)))/(3*a)
In[85]:=
Lp[0|N[0],mu_]:=f0[0,mu]
In[86]:=
Lp[2*Pi/a|N[2*Pi/a],mu_]:=fp1[2*Pi/a,mu]
In[87]:=
Lp[-2*Pi/a|-N[2*Pi/a],mu_]:=fm1[2*Pi/a,mu]
In[88]:=
Lp[4*Pi/a|N[4*Pi/a],mu_]:=fp2[4*Pi/a,mu]
In[89]:=
Lp[-4*Pi/a|-N[4*Pi/a],mu_]:=fm2[-4*Pi/a,mu]
In[90]:=
Lp[k_,mu_]:=fcom[k,mu]
In[91]:=
Ll[k_,mu_]:=0/;mu>=a
In[92]:=
Ll[k_,mu_]:=0/;mu<=-a
In[93]:=
Ll[k_,mu_]:=Lp[k,mu]/;0<=mu<a
In[94]:=
Ll[k_,mu_]:=Exp[I*k*mu]*Conjugate[Lp[k,mu]]/;-a<mu<0
In[95]:=
Ft[k_,mu_]:=(Exp[-2*k^2/3-mu^2/2+k*mu/Sqrt[3]]*Abs[Ll[k,mu]]^2-1)/(
      2*Pi*Sqrt[4*k^2/3+mu^2-2*k*mu/Sqrt[3]])
At this point I need to compute the (numerical) integration of both Ll and, 
more important, 
Ft in all the real plane ({k,-Infinity,Infinity},{mu,-Infinity,Infinity}).As 
  a first attempt I am trying with the following statement:
NIntegrate[
  Abs[Ll[k,mu]],{k,-10,-4*Pi/a,-2*Pi/a,0,2*Pi/a,4*Pi/a,10},{mu,-10,-a,0,a,10},
  Method->MonteCarlo,MaxPoints->100000000,Compiled->False]
but this is not enough to ensure convergence of the integration. Notice that 
  I have inserted some points in the integration path in order  to avoid 
  problems with numerical divergences which Mathematica detects in 
  fcom[k,mu] (but these divergences do not really exist, analitically) Does 
  somebody has a smart suggestion to perform this computation?


Thank you everybody,
Fabio


  • Prev by Date: Re: Miscellaneous questions
  • Next by Date: Re: Simplifying inequalities
  • Previous by thread: Re: Mathematica 4.1 and MacOSX 10.2
  • Next by thread: Posting Mathematica Input to MathGroup