Message Boards Message Boards

Calculate the following integral and generate a plot?

Posted 5 years ago

Hi guys. I wrote a program to draw a plot. My program works for l=1 quickly. but for l>1 ( 2,3,...) it's so slow. I even wait a hour for ( l=3) but after that time it was still working! :( Please help me what can I do?

Attachments:
POSTED BY: reza hamzeh

The problem is that the integral b does not converge for $l \ge 2$. Or converges very slowly, so you need to apply special calculation methods.

\[Gamma] = 1; \[Theta] = \[Pi]/2; \[Phi] = 0; l = 2; r0 = 6; w0 = 5;
Subscript[R, l] = 
  2/w0 (1/Sqrt[Factorial[Abs[l]]])^2*
    Power[Sqrt[2] r/w0, Abs[l]]*(2*r^2/w0)*Exp[-r^2/w0^2] // Simplify;
Subscript[f, l] = Subscript[R, l]^2;

a = (1/2*Pi)*
  NIntegrate[
   r*Subscript[f, l]*
    Exp[-344/100*Power[r/r0, 5/3]*2*r*
      Abs[Sin[\[Upsilon]/2]]], {\[Upsilon], 0, 2 Pi}, {r, 0, 
    Infinity}]
15.6693
    b = (1/2*Pi)*
      NIntegrate[
       r*Subscript[f, l]*
        Exp[-344/100*Power[r/r0, 5/3]*2*r*Abs[Sin[\[Upsilon]/2]]]*
        Exp[-2*I*l*\[Upsilon]], {\[Upsilon], 0, 2 Pi}, {r, 0, Infinity}]
    NIntegrate::errprec: Catastrophic loss of precision in the global error estimate due to insufficient WorkingPrecision or divergent integral.
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract