# Eigenvalue problem with periodic boundary conditions: Are my eigenvalues correct?

I am using a (central) finite difference scheme to solve the eigenvalue problem

$$-\frac{d^2}{dx^2}u = \lambda u$$

with periodic boundary conditions on a unit interval.

I use arpack's zndrv1 and the standard discretization

$$-\frac{d^2}{dx^2} = \left(\begin{matrix}2t_0 & -t_0 & 0 & \cdots & -t_0 \\ -t_0 & 2t_0 & -t_0 & \cdots & 0 \\ \vdots &-t_0 & 2t_0 & -t_0 & \vdots \\ 0 & \cdots &-t_0 & 2t_0 & -t_0 \\ -t_0 & \cdots & 0 & -t_0 & 2t_0 \\ \end{matrix}\right)$$

I expected to obtain the eigenvalues with the form

$$u(x) = Ae^{in\pi x}\\ |u(x)|^2 = A$$

Instead, when I plot $|u(x)|^2$ I get periodic oscillations instead of $A$. E.g. The image below is the 3rd eigenfunction squared.

My question: Should I expect eigenfunctions of the form $e^{in\pi x}$ or are more general eigenfunctions permitted?

• Are you sure you are plotting the absolute value? Is this absolute value function working properly with complex numbers? For the eigenfunction, you should have $k$ or $\lambda$ in $u(x)$ if I understand your notation – as right now, your eigenfunction is not tied to the eigenvalue. However, the general form (with a possible change of $\pi$ to $2\pi$ seems correct. Take a look at this question where I have an answer with the Python script to obtain the eigenvalues in discrete and continuous cases. Might be useful. Commented Jul 17, 2018 at 2:12
• You get eigenvalues of the form $\lambda=\pi^2n^2$, so two eigenfunctions $e^{\pm\mathrm{i}\pi nx}$ per eigenvalue, and so the solver is permitted to return any eigenvector basis, such as $\cos(\pi n x),\sin(\pi n x)$. Commented Jul 17, 2018 at 7:54
• Could you plot the axes and the range of values? Commented Jul 17, 2018 at 19:09