Group Abstract Group Abstract

Message Boards Message Boards

0
|
2.3K Views
|
0 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Why MaxRecurson can significantly change the value of the integration?

Posted 6 years ago

G is a numerical integration, it is dependent on afa and d, the codes are as following. I found that if I set d1=d2=1.34times10^(-9) and try to get a set of G with {afa,0,Pi/6,0.005}, the curve of the output is not smooth and seems like noise. I also found that if I set MaxRecursion->30, the values of the numerical integration will significantly change. Why? How to solve this problem? Many thanks!

Clear["`*"]
vh = 1;
d1 = 1.34*10^(-9);
d2 = 1.34*10^(-9);
mu = 5.5;
HBAR = 1.05457266*10^(-34);
ME = 9.1093897*10^(-31);
ELEC = 1.60217733*10^(-19);
Kh = 2.95*10^(10);
kc = Sqrt[2*ME*ELEC/HBAR^2];
k := kc*Sqrt[mu]
kh := Sqrt[k^2 - (Kh - k Sin[x] Cos[y])^2 - k^2 Sin[x]^2 Sin[y]^2]
khg := Sqrt[
  k^2 - (2*Kh*Sin[afa/2]*Sin[afa/2] - 
      k Sin[x] Cos[y])^2 - (2*Kh*Sin[afa/2]*Cos[afa/2] + 
      k Sin[x] Sin[y])^2]
khpl := Sqrt[
  k^2 - (Kh - k Sin[x] Cos[y])^2 - k^2 Sin[x]^2 Sin[y]^2 + kc^2 vh]
khplpl := 
 Sqrt[k^2 - (Kh - k Sin[x] Cos[y])^2 - k^2 Sin[x]^2 Sin[y]^2 + 
   2*kc^2 vh]
khgplpl := 
 Sqrt[k^2 - (2*Kh*Sin[afa/2]*Sin[afa/2] - 
      k Sin[x] Cos[y])^2 - (2*Kh*Sin[afa/2]*Cos[afa/2] + 
      k Sin[x] Sin[y])^2 + 2*kc^2 vh]
A2 := Exp[
   I*khpl*d1]/(Exp[I*(kh + khgplpl - khg)*d1] + Exp[I*khplpl*d1])
G := Re[NIntegrate[
    k Sin[x] Abs[A2]^2, {x, 0, Pi/2}, {y, -Pi/6, Pi/6}]];
tmr := {afa, G};
Export["D://1.34.txt", Table[tmr, {afa, 0, Pi/6, 0.005}], "Table"];
POSTED BY: Henan Fang
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard