I'm currently resolving a problem, and I came across the following matrix for which I need an expression of the determinant. $$ \begin{matrix} a+1 & 1 & 1 & 1 & . & . & . & 1 & 1 \\ -a & a+1 & 1 & 1 & . & . & . & 1 & 1 \\ 0 & -a & a+1 & 1 & . & . & . & 1 & 1 \\ 0 & 0 & -a & a+1 & . & & & . & . \\ . & . & . & . & . & . & & . & . \\ . & . & & . & . & . & . & . & . \\ . & . & & & . & . & . & 1 & 1 \\ 0 & 0 & . & . & . & 0 & -a & a+1 & 1 \\ 0 & 0 & . & . & . & . & 0 & -a & a+1 \\ \end{matrix} $$ where $a$ is a real number. This matrix can also be described like this:
$$ m_{i, j} = \begin{cases} 1, & \text{if $i<j$} \\ a+1, & \text{if $i=j$} \\ -a, & \text{if $i=j+1$} \\ 0, & \text{if $i>j+1$} \end{cases} $$
The size of the matrix is not known, potentially high (more than 1000).
I do not know how to solve this problem, nor can it be solved.
Edit:
Following achille hui advice, the problem is equivalent to compute an expression of the determinant of the next matrix:
$$ \begin{matrix} 2a+1 & -a & 0 & . & . & . & 0 & 0 & 0 \\ -a & 2a+1 & -a & . & . & . & 0 & 0 & 0 \\ 0 & -a & 2a+1 & . & . & . & 0 & 0 & 0 \\ . & . & . & . & . & & & . & . \\ . & . & . & . & . & . & & . & . \\ . & . & & . & . & . & . & . & . \\ 0 & 0 & 0 & & . & . & 2a+1 & -a & 0 \\ 0 & 0 & 0 & . & . & . & -a & 2a+1 & -a \\ 0 & 0 & 0 & . & . & . & 0 & -a & a+1 \\ \end{matrix} $$ Be aware that the last coefficient is $a+1$ and not $2a+1$.
Edit 2:
By developping the last row, we get ride of the last coefficient and we deal with tridiagonal matrices with constant diagonals.
Using the answer from this question, we get the following expression: $$ det_n = \frac{1}{\sqrt{4a+1}} \biggl[ \frac{1+\sqrt{4a+1}}{2} \biggl(\frac{2a+1+\sqrt{4a+1}}{2}\biggl)^n - \frac{1-\sqrt{4a+1}}{2} \biggl(\frac{2a+1-\sqrt{4a+1}}{2}\biggl)^n \biggl] $$