Calculate for $ n \geq 2 $ and $ x, a_{0}, a_{1}, \ldots, a_{n-1} \in \mathbb{R} $ the determinant of the following matrix:
$$\begin{bmatrix} {x} & {0} & {\cdots} & {\cdots} & {\cdots} & {0} & {a_{0}} \\ {-1} & {x} & {0} & {\cdots} & {\cdots} & {0} & {a_{1}} \\ {0} & {-1} & {x} & {0} & {\cdots} & {0} & {a_{2}} \\ {\vdots} & {\ddots} & {\ddots} & {\ddots} & {\ddots} & {\vdots} & {\vdots} \\ {0} & {\cdots} & {0} & {-1} & {x} & {0} & {a_{n-3}} \\ {0} & {\cdots} & {\cdots} & {0} & {-1} & {x} & {a_{n-2}} \\ {0} & {\cdots} & {\cdots} & {\cdots} & {0} & {-1} & {a_{n-1}+x} \end{bmatrix} \in \mathbb{R}^{n \times n}$$
My solution approach so far:
By using laplace extension $\bigl(\operatorname{det}(A)=\sum \limits_{i=1}^{n}(-1)^{i+1} a_{i 1} \operatorname{det}\left(A_{i 1}\right)\bigr)$:
$$\operatorname{det}(A)=\sum \limits_{i=1}^{n}(-1)^{i+1} x \operatorname{det}\begin{bmatrix} {x} & {0} & {\cdots} & {\cdots} & {0} & {a_{1}} \\ {-1} & {x} & {0} & {\cdots} & {0} & {a_{2}} \\ {\ddots} & {\ddots} & {\ddots} & {\ddots} & {\vdots} & {\vdots} \\ {\cdots} & {0} & {-1} & {x} & {0} & {a_{n-3}} \\{\cdots} & {\cdots} & {0} & {-1} & {x} & {a_{n-2}} \\{\cdots} & {\cdots} & {\cdots} & {0} & {-1} & {a_{n-1}+x} \end{bmatrix}$$
How do I continue? Do I just use laplace extension again and again, or what is the most elegant way to solve this task? Thanks in advance!
An easy way is to expand along the last column. This gives the polynomial directly since you have $a_i$ coefficients by the determinant of an $(n-1)\times (n-1)$ direct sum of triangular matrices.