This wikipedia page https://en.wikipedia.org/wiki/Eigenvalues_and_eigenvectors_of_the_second_derivative for the discrete second derivative ivative says that the eigenvalue problem $v_{k+1}-2v_k+v_{k-1}=\lambda v_k$ in the case of periodic boundary conditions $v_0=v_n$ ($k=1,\ldots,n$) has eigenvalues $$
\lambda_j=\begin{cases}-4\sin^2\left(\frac{\mathrm{\pi}(j-1)}{2n}\right) & j~\text{odd},\\-4\sin^2\left(\frac{\mathrm{\pi}j}{2n}\right)&j~\text{even}.\end{cases}
$$
How is this derived, or is there a reference anywhere? I wrote down the corresponding equations as:
\begin{align*}
-(2+\lambda_1)v_1+v_2+v_N &= 0, \\
v_{j-1}-(2+\lambda_j)v_j + v_{j+1} &= 0,\quad j=2,\ldots,N-1, \\
v_1+v_{N-1}-(2+\lambda_N)v_N &= 0.
\end{align*}
but how to actually solve this system of difference equations is not so clear to me.
Eigenvalues for discrete second derivative with periodic boundary conditions
circulant-matriceseigenvalues-eigenvectorsfinite differenceslinear algebrarecurrence-relations
Best Answer
Great question!
Actually, solving the eigenvalue for circular boundary condition is surprisingly tractable. Consider the matrix $$ \begin{bmatrix} -2 & 1 & 0 &0 &...&1\\ 1 & -2 & 1 & 0&... &0\\ 0&1 & -2 & 1&... &0\\ &&&&...\\ 0&0 & 0 & 0&... &1\\ 1&0 & 0 & 0&... &-2\\ \end{bmatrix} $$ It's a circulant matrix, which could be diagonalized by a Discrete Fourier Transform matrix. Generally, if $$ C=\begin{bmatrix} c_0 & c_{n-1} & c_{n-2} & ... & c_2 & c_1\\ c_1 & c_{0} & c_{n-1} & ...& c_3 & c_2\\ &&...&&\\ c_{n-2} & c_{n-3} & c_{n-4} & ...& c_0& c_{n-1}\\ c_{n-1} & c_{n-2} & c_{n-3} & ... & c_1&c_0\\ \end{bmatrix} $$ Then, with $\omega = e^{2\pi i/n}$ $$ v_j=[1,\omega^j,\omega^{2j},...\omega^{(n-1)j}]^T\\ \lambda_j = c_0+c_1 \omega^j+c_2 \omega^{2j}+ ... + c_{n-1}\omega^{(n-1)j} $$ In this case, $c_0=-2,c_1=1,c_{n-1}=1$, then we can directly compute each eigenvalue $j=0,1,...n-1$ $$ \lambda_j = -2+\omega^j+\omega^{-j} $$ Then use the basic formula for $\cos$ double angle. $$ \lambda_j = -2+e^{2j\pi i/n}+e^{-2j\pi i/n}\\ =-2+2\cos(\frac{2\pi j}{n})\\ =-4\sin^2(\frac{\pi j}{n}) $$
Note that this looks different from your answer, but they are the same set of eigenvalues. Notice that $$ \sin^2(\frac{\pi j}{n})=\sin^2(\frac{\pi (n-j)}{n}) \text{ for } j=1,2...n-1 $$ So any $\lambda_j,j\neq0$ has multiplicity 2, $\lambda_0=0$ has multiplicity 1; if $n$ is even, $\lambda_{n/2}=-4$ has multiplicity 1 too.
So if you sort and re-oder the eigenvalues, they will be the same as your answer.