# Eigenvalues of a tridiagonal matrix with boundary conditions

I need to diagonalize(analytically) the following matrix(I really only need the eigenvalues):

$$\begin{matrix} a+e & -i x & 0 & 0 & \cdots & 0\\ i x & a & -i x & 0 & \cdots & 0\\ 0 & ix & a & -ix & \cdots & 0\\ 0 & 0 & i x & a & \cdots & 0\\ \vdots & \vdots & \vdots & \vdots& \ddots & -ix\\ 0 & \cdots & 0 & 0 & ix & a-e \end{matrix}$$

I'm not sure if this is too general of a problem to be solved, since this is equivalent to some boundary condition problems.

All constants are real, except for ix (which is purely imaginary).

From what I gathered the eigenvalues are of the form $\lambda = 2(1-\cos{\theta})$ but didn't manage to get much further.

There is a very similar question here:

Eigenvalues of a tridiagonal matrix with special strucure

Look at an article called:

Eigenvalues of Several Tridiagonal Matrices by Wen-ChyuanYueh.

The article has explained the development for tridiagonal matrices from first principles. The results are generalized for certain forms of tridiagonal matrices and I believe it has the solution for your case.