Eigenvalues and eigenvectors of the laplacian matrix associated to the cycle graph with one weighted edge (interactive visualization)

This program illustrates some ideas and results from our paper.
Sergei M. Grudsky, Egor A. Maximenko, Alejandro Soto-González (2022):
Eigenvalues of the laplacian matrices of the cycles with one weighted edge.
Linear Algebra Appl. 653, 86–115.
DOI: 10.1016/j.laa.2022.07.011.

Please, choose the value of the parameter α and the order n of the matrix.

α = 0.3

n = 8

The next picture shows the graph of the generating function
g(x) = (2 sin(x / 2))^{2}.
The ordinates of the yellow points are the eigenvalues of the corresponding n×n matrix.

The eigenvalues λ_{α,n,1}, …, λ_{α,n,n} are numbered in the ascending order.
Each eigenvalue λ_{α,n,j} is computed as g(θ_{α,n,j}).

If j is odd, then θ_{α,n,j} is just
(j − 1) π / n.

If j is even, then θ_{α,n,j} is the unique solution of the main equation:
nx − (j −1) π = η_{α}(x).

The function η_{α} is defined by
η_{α}(x) = 2 arctan(κ_{α} cot(x / 2)),
where κ_{α} = α / (1 − α).

The next figure shows the left-hand side and the right-hand side of the main equation for the even values of j.
The numbers θ_{α,n,j} are the abscissas of the intersection points.

The next figure shows the components of an eigenvectorv_{α,n,j} associated to λ_{α,n,j}.
Recall that n = 8 (the value of n can be changed above).
Choose the index j of the eigenvalue/eigenvector pair:

j = 1

For j = 1, all components of v_{α,n,j} are equal to 1.

For j ≥ 2 and p = 1, …, n,
the p-st component of v_{α,n,j} is computed as

The thin gray curve is the graph of the smooth function defined by the same formula, with a continuous variable p.

The next picture shows a family portrait of the normalized eigenvectors.
The color of the cell (p, j) corresponds to the value of the component p of a normalized eigenvector associated to λ_{n,j}.
For example, the column corresponds to the eigenvector shown above (after normalization).