Forgot password?
 Create new account
View 122|Reply 0

[gnuplot] 作Landau Kernel的图像

[Copy link]

3147

Threads

8493

Posts

610K

Credits

Credits
66163
QQ

Show all posts

hbghlyj Posted at 2022-12-22 20:38:39 |Read mode
$$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))
Copy the Code

用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)
Copy the Code

因为$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];
Copy the Code

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";
Copy the Code
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";
Copy the Code

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

手机版Mobile version|Leisure Math Forum

2025-4-20 22:14 GMT+8

Powered by Discuz!

× Quick Reply To Top Return to the list