# 2.7 Eigenvalue Stability of Finite Difference Methods

## 2.7.4 Stability Exercises

Measurable Outcome 2.9, Measurable Outcome 2.10, Measurable Outcome 2.11

## 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
&nbsp; All in the left half plane &nbsp;
&nbsp; Two in the left half plane, the rest in a circle in the right half plane &nbsp;
&nbsp; Two in the right half plane, the rest in a circle in the right half plane &nbsp;
&nbsp; "Along the imaginary axis &nbsp;
Answer:

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
&nbsp; \(-\frac{u}{\Delta x} -\frac{u}{\Delta x}\left[\cos \left(2\pi \frac{n}{N}\right) - i\sin \left(2\pi \frac{n}{N}\right)\right]\) &nbsp;
&nbsp; \(-\frac{u}{\Delta x} +\frac{u}{\Delta x}\left[\cos \left(2\pi \frac{n}{N}\right) - i\sin \left(2\pi \frac{n}{N}\right)\right]\) &nbsp;
&nbsp; \(\frac{u}{\Delta x} +\frac{u}{\Delta x}\left[\cos \left(2\pi \frac{n}{N}\right) + i\sin \left(2\pi \frac{n}{N}\right)\right]\) &nbsp;
&nbsp; \(-\frac{u}{\Delta x} +\frac{u}{\Delta x}\left[\cos \left(2\pi \frac{n}{N}\right) + i\sin \left(2\pi \frac{n}{N}\right)\right]\) &nbsp;

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