如何在 Mathematica 中用傅立叶变换绘制黎曼 zeta 零谱?
在 J. Brian Conrey 的论文“黎曼猜想”中,图 6 给出了素数定理中误差项的傅立叶变换图。请参阅下图中左侧的图:
在名为 素数稀薄Air 由 Chris King 编写,有一个绘制频谱的 Matlab 程序。请参阅帖子开头右侧的情节。可以翻译成 Mathematica:
Mathematica:
scale = 10^6;
start = 1;
fin = 50;
its = 490;
xres = 600;
y = N[Accumulate[Table[MangoldtLambda[i], {i, 1, scale}]], 10];
x = scale;
a = 1;
myspan = 800;
xres = 4000;
xx = N[Range[a, myspan, (myspan - a)/(xres - 1)]];
stpval = 10^4;
F = Range[1, xres]*0;
For[t = 1, t <= xres, t++,
For[yy=0, yy<=Log[x], yy+=1/stpval,
F[[t]] =
F[[t]] +
Sin[t*myspan/xres*yy]*(y[[Floor[Exp[yy]]]] - Exp[yy])/Exp[yy/2];
]
]
F = F/Log[x];
ListLinePlot[F]
然而,据我所知,这是傅立叶正弦变换的矩阵公式,因此计算成本非常高。我不建议运行它,因为它已经使我的计算机崩溃过一次。
Mathematica 中有没有办法利用快速傅里叶变换来绘制 x 值处的尖峰等于黎曼 zeta 零点虚部的频谱?
我尝试了命令 FourierDST
和 Fourier
但没有成功。问题似乎是代码中的变量 yy 包含在 Sin[t*myspan/xres*yy] 和 (y[[Floor[ Exp[yy]]]] - Exp[yy])/Exp[yy/2]。
编辑:2012 年 1 月 20 日,我将行:
For[yy = 0, yy <= Log[x], 1/stpval++,
更改为以下内容:
For[yy = 0, yy/stpval <= Log[x], yy++,
编辑:2012 年 1 月 22 日,来自 Heike 的评论,更改:
For[yy = 0, yy/stpval <= Log[x], yy++,
为:
For[yy=0, yy<=Log[x], yy+=1/stpval ,
In the paper "The Riemann Hypothesis" by J. Brian Conrey in figure 6 there is a plot of the Fourier transform of the error term in the prime number theorem. See the plot to the left in the image below:
In a blog post called Primes out of Thin Air written by Chris King there is a Matlab program that plots the spectrum. See the plot to the right at the beginning of the post. A translation into Mathematica is possible:
Mathematica:
scale = 10^6;
start = 1;
fin = 50;
its = 490;
xres = 600;
y = N[Accumulate[Table[MangoldtLambda[i], {i, 1, scale}]], 10];
x = scale;
a = 1;
myspan = 800;
xres = 4000;
xx = N[Range[a, myspan, (myspan - a)/(xres - 1)]];
stpval = 10^4;
F = Range[1, xres]*0;
For[t = 1, t <= xres, t++,
For[yy=0, yy<=Log[x], yy+=1/stpval,
F[[t]] =
F[[t]] +
Sin[t*myspan/xres*yy]*(y[[Floor[Exp[yy]]]] - Exp[yy])/Exp[yy/2];
]
]
F = F/Log[x];
ListLinePlot[F]
However, this is as I understand it the matrix formulation of the Fourier sine transform and it is therefore very costly to compute. I do NOT recommend running it because it already crashed my computer once.
Is there a way in Mathematica utilising the Fast Fourier Transform, to plot the spectrum with spikes at x-values equal to imaginary part of Riemann zeta zeros?
I have tried the commands FourierDST
and Fourier
without success. The problem seems to be that the variable yy
in the code is included in both Sin[t*myspan/xres*yy]
and (y[[Floor[Exp[yy]]]] - Exp[yy])/Exp[yy/2]
.
EDIT: 20.1.2012, I changed the line:
For[yy = 0, yy <= Log[x], 1/stpval++,
into the following:
For[yy = 0, yy/stpval <= Log[x], yy++,
EDIT: 22.1.2012, From Heike's comment, changed:
For[yy = 0, yy/stpval <= Log[x], yy++,
into:
For[yy=0, yy<=Log[x], yy+=1/stpval,
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这又如何呢?我使用恒等式
Exp[a Log[x]]==x^a
稍微重写了正弦变换,它产生
What about this? I've rewritten the sine transform slightly using the identity
Exp[a Log[x]]==x^a
which produces