TITLE: How to evaluate this three diagonal determinant?2019
QUESTION [5 upvotes]: Can someone give me a hint how to solve
\begin{align*}
|A|=\begin{vmatrix} x & 1 & 0 & 0 & \cdots & 0 & 0 \\ n-1 & x & 2 & 0 & \cdots & 0 & 0 \\ 0 & n-2 & x & 3 & \cdots & 0 & 0 \\ 0 & 0 & n-3 & x & \cdots & 0 & 0 \\ \vdots & \vdots & \vdots & \vdots & & \vdots & \vdots \\ 0 & 0 & 0 & 0 & \cdots & 1 & x \\ \end{vmatrix}？
\end{align*}
By adding to row 1 the rows from 2 to n ,I can see that $|A|$ has $x+n-1$ as a factor. And by trying $n=2,3,4$, I can deduce that
$$|A|=(x^2-(n-1)^2)(x^2-(n-3)^2)\cdots (x^2-1^2)$$
if $n$ is even, and
$$|A|=(x^2-(n-1)^2)(x^2-(n-3)^2)\cdots (x^2-2^2)x$$
if $n$ is odd. I tried hard to give a proof, but without any progress.

REPLY [2 votes]: Denote $|A|=D_n(x)$. By adding the rows numbered $2, 3, \ldots, n$ to row $1$, we get 
\begin{align*}
D_n(x)=
\begin{vmatrix} 
x+n-1 & x+n-1 & x+n-1 & x+n-1 & \cdots & x+n-1 & x+n-1 \\
 n-1 & x & 2 & 0 & \cdots & 0 & 0 \\ 
 0 & n-2 & x & 3 & \cdots & 0 & 0 \\ 
 0 & 0 & n-3 & x & \cdots & 0 & 0 \\ 
 \vdots & \vdots & \vdots & \vdots & & \vdots & \vdots \\
  0 & 0 & 0 & 0 & \cdots & 1 & x 
\end{vmatrix}
\end{align*}
Subsequently we add the rows numbered $3, 4, \ldots, n$ to row $2$, and obtain
\begin{align*}
D_n(x)=
\begin{vmatrix} 
x+n-1 & x+n-1 & x+n-1 & x+n-1 & \cdots & x+n-1 & x+n-1 \\
 n-1 & x+n-2 & x+n-1 & x+n-1 & \cdots &x+n-1 & x+n-1 \\ 
 0 & n-2 & x & 3 & \cdots & 0 & 0 \\ 
 0 & 0 & n-3 & x & \cdots & 0 & 0 \\ 
 \vdots & \vdots & \vdots & \vdots & & \vdots & \vdots \\
  0 & 0 & 0 & 0 & \cdots & 1 & x 
\end{vmatrix}
\end{align*}
$\cdots$ and so on, by  adding the rows numbered $k+1, k+2, \ldots, n$ to row $k$ ($k=1,2,\cdots,n-1$) successively, we finally get
\begin{align*}
D_n(x)=
\begin{vmatrix} 
x+n-1 & x+n-1 & x+n-1 & x+n-1 & \cdots & x+n-1 & x+n-1 \\
 n-1 & x+n-2 & x+n-1 & x+n-1 & \cdots &x+n-1 & x+n-1 \\ 
 0 & n-2 & x+n-3 &  x+n-1 & \cdots &  x+n-1 &  x+n-1 \\ 
 0 & 0 & n-3 & x+n-4 & \cdots &  x+n-1 &  x+n-1 \\ 
 \vdots & \vdots & \vdots & \vdots & & \vdots & \vdots \\
   0 & 0 & 0 & 0 & \cdots & x+1 & x+n-1 \\
  0 & 0 & 0 & 0 & \cdots & 1 & x 
\end{vmatrix}
\end{align*}
In this determinant the elements above the diagonal are all $x+n-1$．We successively subtract the $k$-th column from the $k+1$-th column, $k=n-1,n-2,\cdots,1$, and finally get
\begin{align*}
D_n(x)=
\begin{vmatrix} 
x+n-1 & 0 & 0 & 0 & \cdots & 0 & 0 \\
 n-1 & x-1 & 1 & 0 & \cdots &0 & 0 \\ 
 0 & n-2 & x-1 & 2 & \cdots &  0 &  0 \\ 
 0 & 0 & n-3 & x-1 & \cdots &  0 &  0 \\ 
 \vdots & \vdots & \vdots & \vdots & & \vdots & \vdots \\
   0 & 0 & 0 & 0 & \cdots & x-1 & n-2 \\
  0 & 0 & 0 & 0 & \cdots & 1 & x-1
\end{vmatrix}
\end{align*}
By expanding the above determinant along its first row, we obtain
\begin{align*}
D_n(x)=&(x+n-1)\begin{vmatrix}
 x-1 & 1 & 0 & \cdots &0 & 0 \\ 
  n-2 & x-1 & 2 & \cdots &  0 &  0 \\ 
 0 & n-3 & x-1 & \cdots &  0 &  0 \\ 
  \vdots & \vdots & \vdots & & \vdots & \vdots \\
   0 & 0 & 0 & \cdots & x-1 & n-2 \\
  0 & 0 & 0 & \cdots & 1 & x-1
\end{vmatrix}\\
=&(x+n-1)D_{n-1}(x-1)
\end{align*}
Using the above recurrence relation, we can get
\begin{align*}
D_n(x)=&(x+n-1)(x+n-3)D_{n-2}(x-2)\\
=&(x+n-1)(x+n-3)\cdots (x+n+1-2k)D_{n-k}(x-k)\\
=&(x+n-1)(x+n-3)\cdots (x-n+3)D_{1}(x-n+1)\\
=&(x+n-1)(x+n-3)\cdots (x-n+3)(x-n+1)\\
=&\prod_{k=1}^{n}\big(x+n+1-2k\big)\\
=&\begin{cases}
(x^2-(n-1)^2)(x^2-(n-3)^2)\cdots (x^2-1^2),~~~\text{when $n$ is even}\\ 
(x^2-(n-1)^2)(x^2-(n-3)^2)\cdots (x^2-2^2)x,~\text{when $n$ is odd．}
\end{cases}
\end{align*}