# 2.7 Eigenvalue Stability of Finite Difference Methods

## Exercise 1

Download the MATLAB® code in Section 2.7.2. Modify this code to compute the eigenvalues of the FTBS method with periodic boundary conditions. For CFL=1, where are there eigenvalues of $$A$$?

Exercise 1

To implement a backward spatial discretization, we modify the matrix A:

for i = 2:Nx-1 A(i,i) = u/dx; A(i,i-1) = -u/dx; end

## Exercise 2

Compute analytically the eigenvalues for the FTBS method with periodic boundary conditions. The eigenvalues are

Exercise 2

Answer: We use the formula for the eigenvalues of a circulant matrix with $$a_1= -u/\Delta x$$ and $$a_ N = u/ \Delta x$$.