Determinant with rows $a_1$ to $a_n$ with $-x$ on the diagonal $\left|\begin{matrix}
-x&a_2&\cdots&a_{n}\\
a_1&-x&\cdots&a_{n}\\
a_1&a_2&\cdots&a_{n}\\
\vdots&\vdots&\ddots&\vdots\\
a_1&a_2&\cdots&-x
\end{matrix}\right|$
so i tried to find and expression $D_{n}=kD_{n-1}+tD_{n-2}$
by doing this $\left|\begin{matrix}
-x&a_2&\cdots&a_{n}\\
a_1&-x&\cdots&a_{n}\\
a_1&a_2&\cdots&a_{n}\\
\vdots&\vdots&\ddots&\vdots\\
a_1&a_2&\cdots&a_n-x-a_n
\end{matrix}\right|$ so we split it and get 
$\left|\begin{matrix}
-x&a_2&\cdots&a_{n}\\
a_1&-x&\cdots&a_{n}\\
a_1&a_2&\cdots&a_{n}\\
\vdots&\vdots&\ddots&\vdots\\
a_1&a_2&\cdots&a_n
\end{matrix}\right|$ which is an upper trianglular matrix hence the determinant is $\prod_{1\le i\le n}(-x-a_i)$ 
$\left|\begin{matrix}
-x&a_2&\cdots&0\\
a_1&-x&\cdots&0\\
a_1&a_2&\cdots&0\\
\vdots&\vdots&\ddots&\vdots\\
a_1&a_2&\cdots&-x-a_n
\end{matrix}\right|$  now i expand it along the last column and get $(-x-a_n)D_{n-1}$ but the expression gets very complicated , can i please get a hint on a good way to solve it , i didnt see a better way by manipulating rows/columns(e.g. adding/subtracting all columns to the first but since i miss the $a_i$ in the $i$-th row i cant manipulate the determinant better). 

Your matrix is $M=(-D-xI)+ue^T$ where $D=\operatorname{diag}(a_1,\ldots,a_n)$, $u=(a_1,\ldots,a_n)^T$ and $e=(1,\ldots,1)^T$. Using the identity $\det(A+uv^T)=\det(A)+v^T\operatorname{adj}(A)u$, we get
\begin{aligned}
\det(M)
&=\det\left((-D-xI)+ue^T\right)\\
&=\det(-D-xI) + e^T\operatorname{adj}(-D-xI)\,u\\
&=\prod_{i=1}^n(-a_i-x) + \sum_{i=1}^na_i\prod_{j\ne i}(-a_j-x). 
\end{aligned}
