| Author |
Comment/Response |
Bill Simpson
|
10/08/12 8:36pm
You might try this. It seems to complete in a reasonable amount of time, despite throwing warnings about the integration converging too slowly because of oscillations
In[1]:= Nmax = 10;
B = Table[NIntegrate[ArcTan[x, y]*Sin[(2n - 1)*ArcTan[x, y]], {x, 0.001, 1}, {y, 0.001, 1}], {n, 1, Nmax}]*Sin[(2n - 1)*ArcTan[x, y]]/Pi;
ContourPlot[Sum[B[[n]], {n, 1, Nmax}], {x, 0.001, 1}, {y, 0.001, 1}, PlotRange -> All,ColorFunction->"Rainbow"]
Out[3]= <graph snipped>
The lower bound of 0.001 is to keep zeros out of ArcTan[x,y].
With care I believe one or two more layers of simplification might be possible, to merge the Table and the Sum which appear to be repeating very similar things, and which might make your code more compact and understandable.
Please check all this carefully to make certain that I have not made any scrape-n-paste errors.
URL: , |
|