找回密码
 快速注册
搜索
查看: 40|回复: 0

[gnuplot] 作Landau Kernel的图像

[复制链接]

3149

主题

8386

回帖

6万

积分

$\style{scale:11;fill:#eff}꩜$

积分
65391
QQ

显示全部楼层

hbghlyj 发表于 2022-12-22 20:38 |阅读模式
$$c_{n}=\int_{-1}^{1}\left(1-t^{2}\right)^{n} d t$$
分部积分得(参见Courant and Hilbert, Methods of Mathematical Physics, Vol. I, p. 84.)$$b_n=\frac1{c_n}\qquad b_n=b_{n-1}\left(1+\frac1{2n}\right)$$
参考User-defined variables and functionsPlotting factorial of x function in gnuplot?可以用上式在gnuplot中自定义函数:
  1. b(n)=(n==0)?0.5:b(n-1)*(1+1./(2*n))
复制代码

用1, 2, 200测试一下:
gnuplot> print b(1)                        
0.75
gnuplot> print b(2)  
0.9375
gnuplot> print b(200)  
7.99379504374047

现在就能定义Landau Kernel
\[L_{n}(t)=\begin{cases}{\frac {(1-t^{2})^{n}}{c_{n}}}&{\text{if }}-1\leq t\leq 1\\0&{\text{otherwise}}\end{cases}\]
  1. f(x,n)=(1-x**2)**n*b(n)
复制代码

因为$L_n$的上述定义需要$-1\leq t\leq 1$, 所以$x$坐标范围选取从-1到1.
刚才我们算了$f(0,200)=b_{200}≈8$, 所以$y$坐标范围选取从0到8.
  1. set xrange [-1:1]; set yrange [0:8];
复制代码

plot作出图像
  1. plot f(x,10) title "n=10", f(x,50) title "n=50", f(x,100) title "n=100", f(x,200) title "n=200";
复制代码
1.png

完整的代码
  1. b(n)=(n==0)?0.5:b(n-1)*(1+1./(2*n));
  2. f(x,n)=(1-x**2)**n*b(n);
  3. set xrange [-1:1]; set yrange [0:8];
  4. plot f(x,10) title "n=10", f(x,50) title "n=50", f(x,100) title "n=100", f(x,200) title "n=200";
复制代码

关于gnuplot参见
官网
手册
not so Frequently Asked Questions
关于Landau Kernel参见
en.wikipedia.org/wiki/Landau_kernel
mathweb.ucsd.edu/~aterras/ma142blecture8.pdf
The Weierstrass approximation theorem

手机版|悠闲数学娱乐论坛(第3版)

GMT+8, 2025-3-4 15:27

Powered by Discuz!

× 快速回复 返回顶部 返回列表