show/hide this revision's text 3 added 136 characters in body; edited body

The previous answer of Hans Engler Pablo Lessa seems to be related to a different problem: with periodic boundary conditions. Your conditions are not periodic.

Your matrix is a special Jacobi matrix, and the characteristic polynomial can be found explicitly.

Let $A$ be your matrix, $x=(x_0,\ldots,x_n)$ an eigenvector with eigenvalue $\lambda$. Then $(A-\lambda)x=0$ gives you $n+1$ linear equations which I enumerate $0$ to $n$. Let us fix arbitrary $\lambda$ and try to solve for $x$. WLOG set $x_0=1$. Then equation $0$ gives $$x_1=2\lambda-1,$$ And the next $n-1$ equations are $$x_{k+2}-2\lambda x_{k+1}+x_k=0,\quad k=0,...,n-2.$$ This is a linear recurrency, and it is solved in the usual way. Let us denote $\lambda=\cos\theta$. The characteristic equation is then $\rho^2-2\cos\theta+1=0$ thus $\rho=\exp(\pm i\theta).$ The general solution is $x_k=c_1\cos k\theta+c_2\sin k\theta$. Substituting $k=0$ and $k=1$ we obtain $c_1=1,c_2=(\cos\theta-1)/\sin\theta$. So $$x_k=\cos k\theta+\frac{\sin k\theta}{\sin\theta}(\cos\theta-1)$$ Or, returning to $\lambda$, $$x_k=T_k(\lambda)+(\lambda-1)U_{k-1}(\lambda),$$ where $T_k$ and $U_k$ are Chebyshev polynomials of the first and second kind, respectively.

Now the equations number $n-1$ and $n$ give two expressions for $x_n$. Equating these two expressions we obtain the characteristic equation: $$(1-2\lambda)(T_n+(\lambda-1)U_{n-1}(\lambda))+T_{n-1}+(\lambda-1)U_{n-2}(\lambda)=0.$$ Probably this can be simplified using the relations between Chebyshev polynomials.

A general reference for Jacobi matrices is the book by Gantmakher and Krein, Oscillation matrices, etc., recently translated by AMS.

show/hide this revision's text 2 misprints corrected; added 12 characters in body

The previous answer of Hans Engler seems to be related to a different problem: with periodic boundary conditions. Your conditions are not periodic.

Your matrix is a special Jacobi matrix, and the characteristic polynomial can be found explicitly.

Let $A$ be your matrix, $x=(x_0,\ldots,x_n)$ an eigenvector with eigenvalue $\lambda$. Then $(A-\lambda)x=0$ gives you $n+1$ linear equations which I enumerate $0$ to $n$. Let us fix arbitrary $\lambda$ and try to solve for $x$. WLOG set $x_0=1$. Then equation $0$ gives $$x_1=2\lambda-1,$$ And the next $n-1$ equations are $$x_{k+2}-2\lambda x_{k+1}+x_k=0,\quad k=0,...,n-2.$$ This is a linear recurrency, and it is solved in the usual way. Let us denote $\lambda=\cos\theta$. The characteristic equation is then $\rho^2-2\cos\theta+1=0$ thus $\rho=\exp(\pm i\theta).$ The general solution is $x_k=c_1\cos k\theta+c_2\sin k\theta$. Substituting $k=0$ and $k=1$ we obtain $c_1=1,c_2=(2\cos\theta-1)/\sin\theta$. c_1=1,c_2=(\cos\theta-1)/\sin\theta$. So $$x_k=\cos k\theta+\frac{\sin k\theta}{\sin\theta}(2\cos\theta-1)$$ k\theta}{\sin\theta}(\cos\theta-1)$$ Or, returning to $\lambda$, $$x_k=T_n(\lambda)+(2\lambda-1)U_{n-1}(\lambda),$$ $x_k=T_k(\lambda)+(\lambda-1)U_{k-1}(\lambda),$$ where $T_n$ T_k$ and $U_n$ U_k$ are Chebyshev polynomials of the first and second kind, respectively.

Now the equations number $n-1$ and $n$ give two expressions for $x_n$. Equating these two expressions we obtain the characteristic polynomial as equation: $$(1-2\lambda)(T_n+U_{n-1}(2\lambda-1)+T_{n-1}+U_{n-2}(2\lambda-1)=0.$$ $(1-2\lambda)(T_n+(\lambda-1)U_{n-1}(\lambda))+T_{n-1}+(\lambda-1)U_{n-2}(\lambda)=0.$$ Probably this can be simplified using the relations between Chebyshev polynomials.

show/hide this revision's text 1

The previous answer of Hans Engler seems to be related to different problem: with periodic boundary conditions. Your conditions are not periodic.

Your matrix is a special Jacobi matrix, and the characteristic polynomial can be found explicitly.

Let $A$ be your matrix, $x=(x_0,\ldots,x_n)$ an eigenvector with eigenvalue $\lambda$. Then $(A-\lambda)x=0$ gives you $n+1$ linear equations which I enumerate $0$ to $n$. Let us fix arbitrary $\lambda$ and try to solve for $x$. WLOG set $x_0=1$. Then equation $0$ gives $$x_1=2\lambda-1,$$ And the next $n-1$ equations are $$x_{k+2}-2\lambda x_{k+1}+x_k=0,\quad k=0,...,n-2.$$ This is a linear recurrency, and it is solved in the usual way. Let us denote $\lambda=\cos\theta$. The characteristic equation is then $\rho^2-2\cos\theta+1=0$ thus $\rho=\exp(\pm i\theta).$ The general solution is $x_k=c_1\cos k\theta+c_2\sin k\theta$. Substituting $k=0$ and $k=1$ we obtain $c_1=1,c_2=(2\cos\theta-1)/\sin\theta$. So $$x_k=\cos k\theta+\frac{\sin k\theta}{\sin\theta}(2\cos\theta-1)$$ Or, returning to $\lambda$, $$x_k=T_n(\lambda)+(2\lambda-1)U_{n-1}(\lambda),$$ where $T_n$ and $U_n$ are Chebyshev polynomials of the first and second kind, respectively Now the equations number $n-1$ and $n$ give two expressions for $x_n$. Equating these two expressions we obtain the characteristic polynomial as $$(1-2\lambda)(T_n+U_{n-1}(2\lambda-1)+T_{n-1}+U_{n-2}(2\lambda-1)=0.$$ Probably this can be simplified using the relations between Chebyshev polynomials.