ラゲルの多項式

 ラゲルの多項式$L_{n,l} (x)$は, $$ L_{n,l} (x) = \sum _{i=0}^n {n+l \choose n-i} \frac{(-x)^i}{i!} \ \ \ \ \ (l > -1) $$ ここで, $$ {n+l \choose n-i} = _{n+l} C_{n-i} = \frac{(n+l) !}{(n-i) ! \{ (n+l)-(n-i)\} ! } = \frac{(n+l) !}{(n-i) ! (l+i) ! } $$ https://docs.scipy.org/doc/scipy/reference/generated/scipy.special.genlaguerre.html

 ビームモード展開で用いるラゲルの多項式$L_{n,l} (x)$の正規直交系は, $$ F_{\bar{m},n}(t) = \sqrt{ \frac{n!}{ (n+\bar{m})!} } \sqrt{2^{\bar{m}}} t^{\bar{m}} L_{n,\bar{m}} ( 2 t^2 ) e^{-t^2} $$

モジュールのインポート

import numpy as np  
from scipy.special import genlaguerre
import matplotlib.pyplot as plt
import scienceplots
#Warning : As of version 2.0.0, you need to add import scienceplots before setting the style (plt.style.use('science')).
plt.style.use(['science', 'notebook'])

関数 genlaguerre

# m, n: ビームモードの次数
# t: 変数
def bmf(m, n, t): # ビームモード展開で用いるラゲルの多項式の正規直交系
    if m==0 and n==0:
       f = 1.0
    else:
       x = 2.0*t*t
       f = 1.0/dfactorial2(n+m,n)
       f = np.sqrt(f)*(np.sqrt(2.0)*t)**m
       f = f*genlaguerre(n,m)(x)
    f = f*np.exp(-t*t)
    return f
ここで,階乗 $n!$ の関数は,
def dfactorial(n): # n!(再帰関数による階乗)
    if n == 0:
        k = 1
    else:
        k = n*dfactorial(n-1)
    return k
例えば,$5!$ では,
dfactorial(5)
120
また,$n!/m! \ (n>m)$ は,
def dfactorial2(n,m): # n!/m! (n>m)
    if n==0 or n==m:
       k = 1
    else:
       k = n*dfactorial2(n-1,m)
    return k
例えば,$5!/2! $ では,
dfactorial2(5,2)
60
ラゲルの多項式 $L_{0,0}(x)$,$L_{0,1}(x)$,$L_{0,2}(x)$ を求めると,
x_min, x_max, n_x = 0.0, 4.0, 91
xx = np.linspace(x_min, x_max, n_x)
print(f"{'x':>8s} {'L0,0':>8s} {'L0,1':>8s} {'L0,2':>8s}")
for x in xx:
    print(f"{x:8.3f} {genlaguerre(0,0)(x):8.3f} {genlaguerre(0,1)(x):8.3f} {genlaguerre(0,2)(x):8.3f}")
    x     L0,0     L0,1     L0,2
0.000    1.000    1.000    1.000
0.044    1.000    1.000    1.000
0.089    1.000    1.000    1.000
0.133    1.000    1.000    1.000
0.178    1.000    1.000    1.000
0.222    1.000    1.000    1.000
0.267    1.000    1.000    1.000
0.311    1.000    1.000    1.000
0.356    1.000    1.000    1.000
0.400    1.000    1.000    1.000
0.444    1.000    1.000    1.000
0.489    1.000    1.000    1.000
0.533    1.000    1.000    1.000
0.578    1.000    1.000    1.000
0.622    1.000    1.000    1.000
0.667    1.000    1.000    1.000
0.711    1.000    1.000    1.000
0.756    1.000    1.000    1.000
0.800    1.000    1.000    1.000
0.844    1.000    1.000    1.000
0.889    1.000    1.000    1.000
0.933    1.000    1.000    1.000
0.978    1.000    1.000    1.000
1.022    1.000    1.000    1.000
1.067    1.000    1.000    1.000
1.111    1.000    1.000    1.000
1.156    1.000    1.000    1.000
1.200    1.000    1.000    1.000
1.244    1.000    1.000    1.000
1.289    1.000    1.000    1.000
1.333    1.000    1.000    1.000
1.378    1.000    1.000    1.000
1.422    1.000    1.000    1.000
1.467    1.000    1.000    1.000
1.511    1.000    1.000    1.000
1.556    1.000    1.000    1.000
1.600    1.000    1.000    1.000
1.644    1.000    1.000    1.000
1.689    1.000    1.000    1.000
1.733    1.000    1.000    1.000
1.778    1.000    1.000    1.000
1.822    1.000    1.000    1.000
1.867    1.000    1.000    1.000
1.911    1.000    1.000    1.000
1.956    1.000    1.000    1.000
2.000    1.000    1.000    1.000
2.044    1.000    1.000    1.000
2.089    1.000    1.000    1.000
2.133    1.000    1.000    1.000
2.178    1.000    1.000    1.000
2.222    1.000    1.000    1.000
2.267    1.000    1.000    1.000
2.311    1.000    1.000    1.000
2.356    1.000    1.000    1.000
2.400    1.000    1.000    1.000
2.444    1.000    1.000    1.000
2.489    1.000    1.000    1.000
2.533    1.000    1.000    1.000
2.578    1.000    1.000    1.000
2.622    1.000    1.000    1.000
2.667    1.000    1.000    1.000
2.711    1.000    1.000    1.000
2.756    1.000    1.000    1.000
2.800    1.000    1.000    1.000
2.844    1.000    1.000    1.000
2.889    1.000    1.000    1.000
2.933    1.000    1.000    1.000
2.978    1.000    1.000    1.000
3.022    1.000    1.000    1.000
3.067    1.000    1.000    1.000
3.111    1.000    1.000    1.000
3.156    1.000    1.000    1.000
3.200    1.000    1.000    1.000
3.244    1.000    1.000    1.000
3.289    1.000    1.000    1.000
3.333    1.000    1.000    1.000
3.378    1.000    1.000    1.000
3.422    1.000    1.000    1.000
3.467    1.000    1.000    1.000
3.511    1.000    1.000    1.000
3.556    1.000    1.000    1.000
3.600    1.000    1.000    1.000
3.644    1.000    1.000    1.000
3.689    1.000    1.000    1.000
3.733    1.000    1.000    1.000
3.778    1.000    1.000    1.000
3.822    1.000    1.000    1.000
3.867    1.000    1.000    1.000
3.911    1.000    1.000    1.000
3.956    1.000    1.000    1.000
4.000    1.000    1.000    1.000
ラゲルの多項式 $L_{1,0}(x)$,$L_{1,1}(x)$,$L_{1,2}(x)$ は,
print(f"{'x':>8s} {'L1,0':>8s} {'L1,1':>8s} {'L1,2':>8s}")
for x in xx:
    print(f"{x:8.3f} {genlaguerre(1,0)(x):8.3f} {genlaguerre(1,1)(x):8.3f} {genlaguerre(1,2)(x):8.3f}")
    x     L1,0     L1,1     L1,2
0.000    1.000    2.000    3.000
0.044    0.956    1.956    2.956
0.089    0.911    1.911    2.911
0.133    0.867    1.867    2.867
0.178    0.822    1.822    2.822
0.222    0.778    1.778    2.778
0.267    0.733    1.733    2.733
0.311    0.689    1.689    2.689
0.356    0.644    1.644    2.644
0.400    0.600    1.600    2.600
0.444    0.556    1.556    2.556
0.489    0.511    1.511    2.511
0.533    0.467    1.467    2.467
0.578    0.422    1.422    2.422
0.622    0.378    1.378    2.378
0.667    0.333    1.333    2.333
0.711    0.289    1.289    2.289
0.756    0.244    1.244    2.244
0.800    0.200    1.200    2.200
0.844    0.156    1.156    2.156
0.889    0.111    1.111    2.111
0.933    0.067    1.067    2.067
0.978    0.022    1.022    2.022
1.022   -0.022    0.978    1.978
1.067   -0.067    0.933    1.933
1.111   -0.111    0.889    1.889
1.156   -0.156    0.844    1.844
1.200   -0.200    0.800    1.800
1.244   -0.244    0.756    1.756
1.289   -0.289    0.711    1.711
1.333   -0.333    0.667    1.667
1.378   -0.378    0.622    1.622
1.422   -0.422    0.578    1.578
1.467   -0.467    0.533    1.533
1.511   -0.511    0.489    1.489
1.556   -0.556    0.444    1.444
1.600   -0.600    0.400    1.400
1.644   -0.644    0.356    1.356
1.689   -0.689    0.311    1.311
1.733   -0.733    0.267    1.267
1.778   -0.778    0.222    1.222
1.822   -0.822    0.178    1.178
1.867   -0.867    0.133    1.133
1.911   -0.911    0.089    1.089
1.956   -0.956    0.044    1.044
2.000   -1.000    0.000    1.000
2.044   -1.044   -0.044    0.956
2.089   -1.089   -0.089    0.911
2.133   -1.133   -0.133    0.867
2.178   -1.178   -0.178    0.822
2.222   -1.222   -0.222    0.778
2.267   -1.267   -0.267    0.733
2.311   -1.311   -0.311    0.689
2.356   -1.356   -0.356    0.644
2.400   -1.400   -0.400    0.600
2.444   -1.444   -0.444    0.556
2.489   -1.489   -0.489    0.511
2.533   -1.533   -0.533    0.467
2.578   -1.578   -0.578    0.422
2.622   -1.622   -0.622    0.378
2.667   -1.667   -0.667    0.333
2.711   -1.711   -0.711    0.289
2.756   -1.756   -0.756    0.244
2.800   -1.800   -0.800    0.200
2.844   -1.844   -0.844    0.156
2.889   -1.889   -0.889    0.111
2.933   -1.933   -0.933    0.067
2.978   -1.978   -0.978    0.022
3.022   -2.022   -1.022   -0.022
3.067   -2.067   -1.067   -0.067
3.111   -2.111   -1.111   -0.111
3.156   -2.156   -1.156   -0.156
3.200   -2.200   -1.200   -0.200
3.244   -2.244   -1.244   -0.244
3.289   -2.289   -1.289   -0.289
3.333   -2.333   -1.333   -0.333
3.378   -2.378   -1.378   -0.378
3.422   -2.422   -1.422   -0.422
3.467   -2.467   -1.467   -0.467
3.511   -2.511   -1.511   -0.511
3.556   -2.556   -1.556   -0.556
3.600   -2.600   -1.600   -0.600
3.644   -2.644   -1.644   -0.644
3.689   -2.689   -1.689   -0.689
3.733   -2.733   -1.733   -0.733
3.778   -2.778   -1.778   -0.778
3.822   -2.822   -1.822   -0.822
3.867   -2.867   -1.867   -0.867
3.911   -2.911   -1.911   -0.911
3.956   -2.956   -1.956   -0.956
4.000   -3.000   -2.000   -1.000
$L_{2,0}(x)$,$L_{2,1}(x)$,$L_{2,2}(x)$ は,
print(f"{'x':>8s} {'L2,0':>8s} {'L2,1':>8s} {'L2,2':>8s}")
for x in xx:
    print(f"{x:8.3f} {genlaguerre(2,0)(x):8.3f} {genlaguerre(2,1)(x):8.3f} {genlaguerre(2,2)(x):8.3f}")
    x     L2,0     L2,1     L2,2
0.000    1.000    3.000    6.000
0.044    0.912    2.868    5.823
0.089    0.826    2.737    5.648
0.133    0.742    2.609    5.476
0.178    0.660    2.482    5.305
0.222    0.580    2.358    5.136
0.267    0.502    2.236    4.969
0.311    0.426    2.115    4.804
0.356    0.352    1.997    4.641
0.400    0.280    1.880    4.480
0.444    0.210    1.765    4.321
0.489    0.142    1.653    4.164
0.533    0.076    1.542    4.009
0.578    0.011    1.434    3.856
0.622   -0.051    1.327    3.705
0.667   -0.111    1.222    3.556
0.711   -0.169    1.120    3.408
0.756   -0.226    1.019    3.263
0.800   -0.280    0.920    3.120
0.844   -0.332    0.823    2.979
0.889   -0.383    0.728    2.840
0.933   -0.431    0.636    2.702
0.978   -0.478    0.545    2.567
1.022   -0.522    0.456    2.434
1.067   -0.564    0.369    2.302
1.111   -0.605    0.284    2.173
1.156   -0.643    0.201    2.045
1.200   -0.680    0.120    1.920
1.244   -0.715    0.041    1.797
1.289   -0.747   -0.036    1.675
1.333   -0.778   -0.111    1.556
1.378   -0.806   -0.184    1.438
1.422   -0.833   -0.255    1.322
1.467   -0.858   -0.324    1.209
1.511   -0.880   -0.392    1.097
1.556   -0.901   -0.457    0.988
1.600   -0.920   -0.520    0.880
1.644   -0.937   -0.581    0.774
1.689   -0.952   -0.640    0.671
1.733   -0.964   -0.698    0.569
1.778   -0.975   -0.753    0.469
1.822   -0.984   -0.806    0.371
1.867   -0.991   -0.858    0.276
1.911   -0.996   -0.907    0.182
1.956   -0.999   -0.955    0.090
2.000   -1.000   -1.000    0.000
2.044   -0.999   -1.043   -0.088
2.089   -0.996   -1.085   -0.174
2.133   -0.991   -1.124   -0.258
2.178   -0.984   -1.162   -0.340
2.222   -0.975   -1.198   -0.420
2.267   -0.964   -1.231   -0.498
2.311   -0.952   -1.263   -0.574
2.356   -0.937   -1.292   -0.648
2.400   -0.920   -1.320   -0.720
2.444   -0.901   -1.346   -0.790
2.489   -0.880   -1.369   -0.858
2.533   -0.858   -1.391   -0.924
2.578   -0.833   -1.411   -0.989
2.622   -0.806   -1.429   -1.051
2.667   -0.778   -1.444   -1.111
2.711   -0.747   -1.458   -1.169
2.756   -0.715   -1.470   -1.226
2.800   -0.680   -1.480   -1.280
2.844   -0.643   -1.488   -1.332
2.889   -0.605   -1.494   -1.383
2.933   -0.564   -1.498   -1.431
2.978   -0.522   -1.500   -1.478
3.022   -0.478   -1.500   -1.522
3.067   -0.431   -1.498   -1.564
3.111   -0.383   -1.494   -1.605
3.156   -0.332   -1.488   -1.643
3.200   -0.280   -1.480   -1.680
3.244   -0.226   -1.470   -1.715
3.289   -0.169   -1.458   -1.747
3.333   -0.111   -1.444   -1.778
3.378   -0.051   -1.429   -1.806
3.422    0.011   -1.411   -1.833
3.467    0.076   -1.391   -1.858
3.511    0.142   -1.369   -1.880
3.556    0.210   -1.346   -1.901
3.600    0.280   -1.320   -1.920
3.644    0.352   -1.292   -1.937
3.689    0.426   -1.263   -1.952
3.733    0.502   -1.231   -1.964
3.778    0.580   -1.198   -1.975
3.822    0.660   -1.162   -1.984
3.867    0.742   -1.124   -1.991
3.911    0.826   -1.085   -1.996
3.956    0.912   -1.043   -1.999
4.000    1.000   -1.000   -2.000
ビームモード関数 $F_{0,0}$,$F_{0,1}$,$F_{0,2}$,$F_{0,3}$,$F_{0,4}$ は
print(f"{'x':>8s} {'F0,0':>8s} {'F0,1':>8s} {'F0,2':>8s} {'F0,3':>8s} {'F0,4':>8s}")
mm = 5
f0 = np.empty((mm,n_x))
f1 = np.empty((mm,n_x))
f2 = np.empty((mm,n_x))
f3 = np.empty((mm,n_x))
for j in range(n_x):
    for i in range(mm):
        f0[i,j] = bmf(0,i,xx[j])
        f1[i,j] = bmf(1,i,xx[j])
        f2[i,j] = bmf(2,i,xx[j])
        f3[i,j] = bmf(3,i,xx[j])
    print(f"{xx[j]:8.3f} {f0[0,j]:8.3f} {f0[1,j]:8.3f} {f0[2,j]:8.3f} {f0[3,j]:8.3f} {f0[4,j]:8.3f}")
    x     F0,0     F0,1     F0,2     F0,3     F0,4
0.000    1.000    1.000    1.000    1.000    1.000
0.044    0.998    0.994    0.990    0.986    0.982
0.089    0.992    0.976    0.961    0.945    0.930
0.133    0.982    0.947    0.913    0.879    0.846
0.178    0.969    0.908    0.848    0.791    0.735
0.222    0.952    0.858    0.768    0.684    0.603
0.267    0.931    0.799    0.676    0.562    0.456
0.311    0.908    0.732    0.573    0.431    0.303
0.356    0.881    0.658    0.464    0.295    0.150
0.400    0.852    0.579    0.350    0.160    0.005
0.444    0.821    0.497    0.236    0.032   -0.125
0.489    0.787    0.411    0.125   -0.086   -0.234
0.533    0.752    0.324    0.018   -0.190   -0.318
0.578    0.716    0.238   -0.081   -0.275   -0.375
0.622    0.679    0.153   -0.169   -0.340   -0.403
0.667    0.641    0.071   -0.245   -0.384   -0.402
0.711    0.603   -0.007   -0.308   -0.405   -0.376
0.756    0.565   -0.080   -0.357   -0.406   -0.326
0.800    0.527   -0.148   -0.391   -0.386   -0.259
0.844    0.490   -0.209   -0.409   -0.348   -0.179
0.889    0.454   -0.263   -0.414   -0.296   -0.091
0.933    0.418   -0.311   -0.405   -0.232   -0.002
0.978    0.384   -0.351   -0.383   -0.160    0.083
1.022    0.352   -0.383   -0.350   -0.084    0.159
1.067    0.321   -0.409   -0.308   -0.007    0.222
1.111    0.291   -0.427   -0.259    0.067    0.270
1.156    0.263   -0.440   -0.204    0.135    0.299
1.200    0.237   -0.445   -0.145    0.194    0.309
1.244    0.213   -0.446   -0.085    0.244    0.301
1.289    0.190   -0.441   -0.024    0.281    0.276
1.333    0.169   -0.432    0.035    0.305    0.236
1.378    0.150   -0.419    0.092    0.316    0.184
1.422    0.132   -0.403    0.144    0.315    0.124
1.467    0.116   -0.384    0.192    0.301    0.059
1.511    0.102   -0.364    0.234    0.276   -0.007
1.556    0.089   -0.341    0.270    0.242   -0.071
1.600    0.077   -0.318    0.299    0.200   -0.130
1.644    0.067   -0.295    0.322    0.153   -0.181
1.689    0.058   -0.272    0.338    0.102   -0.221
1.733    0.050   -0.248    0.349    0.048   -0.250
1.778    0.042   -0.226    0.353   -0.005   -0.266
1.822    0.036   -0.204    0.353   -0.057   -0.270
1.867    0.031   -0.183    0.348   -0.106   -0.262
1.911    0.026   -0.163    0.339   -0.151   -0.243
1.956    0.022   -0.145    0.326   -0.191   -0.214
2.000    0.018   -0.128    0.311   -0.226   -0.177
2.044    0.015   -0.113    0.294   -0.254   -0.134
2.089    0.013   -0.098    0.275   -0.277   -0.087
2.133    0.011   -0.086    0.256   -0.293   -0.038
2.178    0.009   -0.074    0.235   -0.303    0.012
2.222    0.007   -0.064    0.215   -0.307    0.060
2.267    0.006   -0.054    0.195   -0.307    0.105
2.311    0.005   -0.046    0.176   -0.302    0.146
2.356    0.004   -0.039    0.157   -0.293    0.183
2.400    0.003   -0.033    0.140   -0.281    0.213
2.444    0.003   -0.028    0.123   -0.267    0.238
2.489    0.002   -0.023    0.108   -0.251    0.257
2.533    0.002   -0.019    0.094   -0.233    0.269
2.578    0.001   -0.016    0.082   -0.215    0.277
2.622    0.001   -0.013    0.070   -0.196    0.278
2.667    0.001   -0.011    0.060   -0.178    0.276
2.711    0.001   -0.009    0.051   -0.160    0.269
2.756    0.001   -0.007    0.043   -0.142    0.259
2.800    0.000   -0.006    0.036   -0.126    0.246
2.844    0.000   -0.005    0.030   -0.111    0.231
2.889    0.000   -0.004    0.025   -0.096    0.215
2.933    0.000   -0.003    0.021   -0.084    0.197
2.978    0.000   -0.002    0.017   -0.072    0.180
3.022    0.000   -0.002    0.014   -0.061    0.162
3.067    0.000   -0.001    0.012   -0.052    0.145
3.111    0.000   -0.001    0.009   -0.044    0.129
3.156    0.000   -0.001    0.008   -0.037    0.114
3.200    0.000   -0.001    0.006   -0.031    0.099
3.244    0.000   -0.001    0.005   -0.026    0.086
3.289    0.000   -0.000    0.004   -0.021    0.074
3.333    0.000   -0.000    0.003   -0.017    0.063
3.378    0.000   -0.000    0.002   -0.014    0.054
3.422    0.000   -0.000    0.002   -0.011    0.045
3.467    0.000   -0.000    0.001   -0.009    0.038
3.511    0.000   -0.000    0.001   -0.007    0.032
3.556    0.000   -0.000    0.001   -0.006    0.026
3.600    0.000   -0.000    0.001   -0.005    0.021
3.644    0.000   -0.000    0.001   -0.004    0.017
3.689    0.000   -0.000    0.000   -0.003    0.014
3.733    0.000   -0.000    0.000   -0.002    0.011
3.778    0.000   -0.000    0.000   -0.002    0.009
3.822    0.000   -0.000    0.000   -0.001    0.007
3.867    0.000   -0.000    0.000   -0.001    0.006
3.911    0.000   -0.000    0.000   -0.001    0.005
3.956    0.000   -0.000    0.000   -0.001    0.004
4.000    0.000   -0.000    0.000   -0.000    0.003
ビームモード関数をまとめてプロットすると,
fig1 = plt.figure(figsize=(8, 6)) # グラフ領域の作成
plt.subplot(2, 2, 1) # 左上側の図
plt.grid(color = "gray", linestyle="--")
plt.minorticks_on() # #補助目盛りをつける
plt.xlim(0.0, 4.0) # x軸範囲の設定
plt.xticks(fontsize=8)
plt.xlabel(r"$t$", fontsize=8) # x軸のラベル設定
plt.ylim(-0.5, 1.0) # y軸範囲の設定
plt.yticks(fontsize=8)
plt.ylabel(r"$F_{0,n}(t)$", fontsize=8) # y軸のラベル設定
plt.plot(xx, f0[0,:], label=r"$F_{0,0}$")
plt.plot(xx, f0[1,:], label=r"$F_{0,1}$")
plt.plot(xx, f0[2,:], label=r"$F_{0,2}$")
plt.plot(xx, f0[3,:], label=r"$F_{0,3}$")
plt.legend(ncol=1, loc='upper right', fancybox=False, frameon = True, fontsize=8)

plt.subplot(2, 2, 2)
plt.grid(color = "gray", linestyle="--")
plt.grid(color = "gray", linestyle="--")
plt.minorticks_on() # #補助目盛りをつける
plt.xlim(0.0, 4.0) # x軸範囲の設定
plt.xticks(fontsize=8)
plt.xlabel(r"$t$", fontsize=8) # x軸のラベル設定
plt.ylim(-0.5, 1.0) # y軸範囲の設定
plt.yticks(fontsize=8)
plt.ylabel(r"$F_{1,n}(t)$", fontsize=8) # y軸のラベル設定
plt.plot(xx, f1[0,:], label=r"$F_{1,0}$")
plt.plot(xx, f1[1,:], label=r"$F_{1,1}$")
plt.plot(xx, f1[2,:], label=r"$F_{1,2}$")
plt.plot(xx, f1[3,:], label=r"$F_{1,3}$")
plt.legend(ncol=1, loc='upper right', fancybox=False, frameon = True, fontsize=8)

plt.subplot(2, 2, 3)
plt.grid(color = "gray", linestyle="--")
plt.minorticks_on() # #補助目盛りをつける
plt.xlim(0.0, 4.0) # x軸範囲の設定
plt.xticks(fontsize=8)
plt.xlabel(r"$t$", fontsize=8) # x軸のラベル設定
plt.ylim(-0.5, 1.0) # y軸範囲の設定
plt.yticks(fontsize=8)
plt.ylabel(r"$F_{2,n}(t)$", fontsize=8) # y軸のラベル設定
plt.plot(xx, f2[0,:], label=r"$F_{2,0}$")
plt.plot(xx, f2[1,:], label=r"$F_{2,1}$")
plt.plot(xx, f2[2,:], label=r"$F_{2,2}$")
plt.plot(xx, f2[3,:], label=r"$F_{2,3}$")
plt.legend(ncol=1, loc='upper right', fancybox=False, frameon = True, fontsize=8)

plt.subplot(2, 2, 4)
plt.grid(color = "gray", linestyle="--")
plt.minorticks_on() # #補助目盛りをつける
plt.xlim(0.0, 4.0) # x軸範囲の設定
plt.xticks(fontsize=8)
plt.xlabel(r"$t$", fontsize=8) # x軸のラベル設定
plt.ylim(-0.5, 1.0) # y軸範囲の設定
plt.yticks(fontsize=8)
plt.ylabel(r"$F_{3,n}(t)$", fontsize=8) # y軸のラベル設定
plt.plot(xx, f3[0,:], label=r"$F_{3,0}$")
plt.plot(xx, f3[1,:], label=r"$F_{3,1}$")
plt.plot(xx, f3[2,:], label=r"$F_{3,2}$")
plt.plot(xx, f3[3,:], label=r"$F_{3,3}$")
plt.legend(ncol=1, loc='upper right', fancybox=False, frameon = True, fontsize=8)

plt.tight_layout()
fig1.savefig('p1_ex09_1.pdf')
plt.show()