Find the value of the following $n \times n$ determinantes Find the value of the following $n \times n$ determinantes


*

*$$\begin{vmatrix}
a_1+x & x & x & \ldots & x \\ 
x & a_2+x & x & \ldots & x \\ 
x & x & a_3+x & \ldots & x \\ 
\vdots & \vdots& &\ddots& \vdots\\
x & x & x & \ldots & a_n+x \\ 
\end{vmatrix}$$

*$$\begin{vmatrix}
a_1+x & a_2 & a_3 & \ldots & a_n \\ 
a_1 & a_2+x & a_3 & \ldots & a_n \\ 
a_1 & a_2 & a_3+x & \ldots & a_n \\ 
\vdots & \vdots& &\ddots& \vdots\\
a_1 & a_2 & a_3 & \ldots & a_n+x \\ 
\end{vmatrix}$$


Both seem to be equally complicated to solve, I reckon that it's needed to subtract the $x$ from the diagonal in each term. I tried by subtracting the $(k-1)$-th row from the $k$-th row, however that doesn't really lead me to anything more comfortable whatsoever. So help is greatly appreciated, also perhaps a link to some methods on solving these kind of problems, would also be helpful. 

Let
\begin{align}
T_n &=
\begin{vmatrix}
a_1+x & x & x & \cdots & x \\
x & a_2+x & x & \cdots & x \\
x & x & a_3+x & \cdots & x \\
\vdots & \vdots & \vdots & \ddots & \vdots \\
x & x & x & \cdots & a_n+x
\end{vmatrix} \\
 &=
\begin{vmatrix}
a_1+x & x & x & \cdots & x \\
-a_1 & a_2 & 0 & \cdots & 0 \\
-a_1 & 0 & a_3 & \cdots & 0 \\
\vdots & \vdots & \vdots & \ddots & \vdots \\
-a_1 & 0 & 0 & \cdots & a_n
\end{vmatrix}
\end{align}
Expand $T_n$ with the last column, and we can get
$$
T_n = x a_1 a_2 \cdots a_{n-1} + a_n T_{n-1}
$$
It's obvious that
$$
T_1 = a_1 + x
$$
By induction, we can get
$$
T_n = x \sum^n_{j=1} \prod^n_{\scriptstyle i=1 \atop \scriptstyle i\ne j} a_i + \prod^n_{i=1} a_i
$$
