I was wondering if you could help me understand.
I am trying to solve this eigenvalue problem numerically via finite difference (I've solved it already using a spectral method).
\begin{equation} i \frac{\partial u}{\partial x} = \lambda u \end{equation} with boundary conditions $u(0) = u(1)$.
I've used the following discretisation of the operator on the left-hand-side \begin{equation} \frac{u_n - u_{n-1}}{\Delta x} \end{equation} and with this, I simply use eig (in python) on the following matrix
\begin{equation} \begin{pmatrix} -1 & 1 & 0 &... & 0 \\ 0 & -1 & 1 &... & 0 \\ \vdots & & \ddots & \ddots & 0 \\ \vdots & & \ddots & \ddots & 0 \\ 1 & & 0 & 0 & -1 \\ \end{pmatrix} \end{equation}, but this way I find that the xvalues are not prescribed and it gives me eigenvalues in a circle (they should be real). I don't even know what part of maths this is... Help please!
Kindest regards,
Catherine
So you get $$u_n=(1-iλΔx)^{-n}u_0,$$ and if periodicity means $u_N=u_0$, then $(1-iλΔx)^N=1$. This has solutions $$1-iλΔx=e^{iα}=\cos(α)+i\sin(α)$$ with $αN=k2\pi\iff α=2k\pi\frac{Δx}{L}$. Or $$ λ=\frac{1-e^{iα}}{iΔx}\approx \frac{2k\pi}{L} $$ the last for small values of $k$.
Yes, the eigenvalues lie on a large circle (very large for larger $N$), but the smaller eigenvalues lie close to the real axis.
If you want real eigenvalues, use the more symmetric trapezoidal discretization $$ i\frac{u_n-u_{n-1}}{Δx}=λ\frac{u_n+u_{n-1}}{2}. $$