Eigenvalues of Chebyshev differentiation matrix

Eigenvalues of Chebyshev differentiation matrix#

Apply Dirichlet bc at \(x=1\), then we remove last column and last row of differentiation matrix.

%config InlineBackend.figure_format='svg'
from pylab import *
from chebPy import *
figure(figsize=(8,8))
Nvalues = array([32,64,128,256])
lmax = []
for i in range(4):
    N = Nvalues[i]
    D, x = cheb(N)
    D = D[0:-1,0:-1]
    
    lam,_ = eig(D)
    lmax.append(abs(lam).max())
    subplot(2,2,i+1)
    plot(real(lam),imag(lam),".")
    grid(True),axis("equal"),title("N = "+str(N))
_images/db26d52c0ca177a66b1c86d2638151f102c6d9d053540d6b7b490b3fc9fbc034.svg

All the eigenvalues have non-positive real parts.

NOTE: Compare to Fig. 4.4-1 in Fornberg; the plot looks bit different for \(N=64\) case.

loglog(Nvalues,lmax,"o-",label="$max|\\lambda|$")
loglog(Nvalues,0.09*Nvalues**2,'--',label="$0.09 N^2$")
legend(), xlabel("N");
_images/6141eae7d9df865f4adb4e0f14665fff3de1798432ad78b00247aa7fa37c898b.svg

This shows that

\[ \max_i |\lambda_i| = 0.09 N^2 \]

3rd order Adams-Bashforth method#

N = 50
D, x = cheb(N)
D = D[0:-1,0:-1]
lam,_ = eig(D)

dt = 7/N**2
plot(real(lam*dt),imag(lam*dt),"o",label="$dt=7/N^2$")

dt = 8/N**2
plot(real(lam*dt),imag(lam*dt),"*",label="$dt=8/N^2$")

# Adams-Bashforth
z = exp(1j*pi*arange(0,201)/100); r = z - 1
s = (23 - 16/z + 5/z**2)/12; rr = r/s; plot(real(rr),imag(rr))
axis('equal'); grid('on'); xlabel('$real(\\lambda\Delta t)$')
ylabel('$imag(\\lambda\Delta t)$')
title('Adams-Bashforth, N ='+str(N)), legend();
_images/e3c88ccf7cb4d35b8865165b698af1e0370f71a3ec8efa10c49fb3424c4178e4.svg

For \(\Delta t = 7/N^2\), all the values \(\lambda\Delta t\) lie inside the stability domain of this Adams method. For \(\Delta t = 8/N^2\), some values are outside the stable region.