# 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