## Eigenvalues a finite difference formulas

Hello,

I'm working with finite difference formulas to obtain a semianalytical
solution of partial differential equations, and in my problems is
usual to have tridiagonal matrices like:

$A_{N=5}=\left( \begin{array}{ccccc}
-1 & 1 & 0 & 0 & 0\\
1 & -2 & 1 & 0 & 0\\
0 & 1 & -2 & 1 & 0\\
0 & 0 & 1 & -2 & 1\\
0 & 0 & 0 & 1 & -1\end{array}\right)$

where N is the dimension of the matrix. To obtain the semianalytic
solution of my PDEs I need the eigenvalues of this matrix which are
easily computed with standard software (Mathematica, Matlab, etc.).
But by chance (I swear, it was by trial and error) I also found that
the eigenvalues of this kind of matrices can be computed using the
following formula:

$\lambda_{i,N}=-2\left(1+cos\left(\frac{i}{N}\pi\right)\right)$

I know how the eigenvalues are computed through the solution of the polynomial equation

$Det\left(A-\lambda\cdot I\right)=0$

but I don't realise how to arrive to the trigonometric solution. Can someone give me a proof or a reference of this observation?

Regards,

Javier

P.S.: I'm a newby in this forum and I still have problems with my LaTeX style, sorry. I'll improve it in the future