<s>[INST] Find largest eigenvalue of specific nonnegative matrix I look for the largest eigenvalue of the following matrix (or at least a small upper bound).
The only thing I know is that the eigenvalue is smaller than 1 and converges to $\cos(\frac{\pi}{2n+1})$ with growing n.
In general, it is very hard to compute the characteristic polynomial to calculate the eigenvalue and that's why I hope for an easier way.
Has anyone some ideas?
The dimension of the matrix is $n \times n$.
$A = \begin{bmatrix}
\frac{1}{2-\frac{1}{n+1}}&  \frac{1}{2} & 0 & 0 & \dots & 0 \\
\frac{1}{2} & 0 & \frac{1}{2} & 0 & \dots & 0 \\
0 & \frac{1}{2} & 0 & \frac{1}{2} & \dots & 0 \\
\vdots & \vdots & \vdots & \vdots & \vdots & \vdots \\
0 & 0 & 0 &0 & \frac{1}{2} & 0
\end{bmatrix}$
 [/INST] An asymptotic expansion for large $n$ can be obtained as follows. Expanding $A - \lambda I$ by the first row and expanding one of the resulting matrices by the first column gives
$$\det(A - \lambda I) =
\left( \frac {n + 1} {2 n + 1} - \lambda \right) \det \tilde A_{n - 1} -
 \frac 1 4 \det \tilde A_{n - 2},$$
where $\tilde A_n$ is a tridiagonal  Toeplitz matrix with $-\lambda$ on the main diagonal and $1/2$ on the two adjacent diagonals. The determinant of $\tilde A_n$ is $2^{-n} U_n(-\lambda)$, where $U_n$ is the Chebyshev polynomial of the second kind. Since $U_n(-\cos \theta) = (-1)^n \csc \theta \,\sin \,(n + 1) \theta$, $\det(A - \lambda I) = 0$ reduces to
$$\cot n \theta =
\left( \frac {2 n + 2} {2 n + 1} - \cos \theta \right) \csc \theta.$$
Taking $\theta = \alpha/n$ and expanding both sides of the equation into series, we obtain $\cot \alpha = 1/(2 \alpha) + O(1/n)$, determining $\alpha$. Then
$$\lambda_{\max} = \cos \theta \sim
1 -\frac {\alpha^2} {2 n^2},$$
where $\alpha$ is the smallest positive root of $\cot \alpha = 1/(2 \alpha)$. The next terms can be obtained in the same manner.
</s>