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.
For 2) Let $$A=\begin{bmatrix} a_1 & a_2 & .. &a_n \\ a_1 & a_2 & .. &a_n \\ a_1 & a_2 & .. &a_n \\ ...&...&...&...\\ a_1 & a_2 & .. &a_n \\ \end{bmatrix}$$
Then $A$ has rank $1$ and hence $\lambda=0$ is an eigenvalue with geometric multiplicity $n-1$, and hence has algebraic multiplicity at least $n-1$.
As the trace is the sum of eigenvalues, the last eigenvalue is $a_1+a_2+..+a_n$.
Thus $$ \det(\lambda I-A) =\lambda^n -(a_1+...+a_n) \lambda^{n-1} $$
Now replace $\lambda$ by $-x$.
For 1) Subtract the last row from each of the previous $n-1$. You get $$\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 & 0 & 0 & \ldots & -a_n \\ 0 & a_2 & 0 & \ldots & -a_n \\ 0 & 0 & a_3 & \ldots & -a_n \\ \vdots & \vdots& &\ddots& \vdots\\ x & x & x & \ldots & a_n+x \\ \end{vmatrix}$$
This determinant is a linear function in $x$. Therefore $$\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}=ax+b$$
Now when $x=0$ we get $$b=a_1 ... a_n$$
All you have to do next is do row expansion by the last row in $$\begin{vmatrix} a_1 & 0 & 0 & \ldots & -a_n \\ 0 & a_2 & 0 & \ldots & -a_n \\ 0 & 0 & a_3 & \ldots & -a_n \\ \vdots & \vdots& &\ddots& \vdots\\ x & x & x & \ldots & a_n+x \\ \end{vmatrix}$$ in order to find the coefficient of $x$.
For 2), without eigenvalues: Transpose the matrix, and then add all rows to the first. We get:
$$\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}=\begin{vmatrix} a_1+x & a_1 & a_1 & \ldots & a_1 \\ a_2 & a_2+x & a_2 & \ldots & a_2 \\ a_3 & a_3 & a_3+x & \ldots & a_3 \\ \vdots & \vdots& &\ddots& \vdots\\ a_n & a_n & a_n & \ldots & a_n+x \\ \end{vmatrix}=\begin{vmatrix} a_1+a_2+..+a_n+x & a_1+a_2+..+a_n+x & a_1+a_2+..+a_n+x & \ldots &a_1+a_2+..+a_n+x\\ a_2 & a_2+x & a_2 & \ldots & a_2 \\ a_3 & a_3 & a_3+x & \ldots & a_3 \\ \vdots & \vdots& &\ddots& \vdots\\ a_n & a_n & a_n & \ldots & a_n+x \\ \end{vmatrix}=(a_1+a_2+..+a_n+x)\begin{vmatrix} 1 & 1 & 1 & \ldots &1\\ a_2 & a_2+x & a_2 & \ldots & a_2 \\ a_3 & a_3 & a_3+x & \ldots & a_3 \\ \vdots & \vdots& &\ddots& \vdots\\ a_n & a_n & a_n & \ldots & a_n+x \\ \end{vmatrix}$$
Now if you do each row minus $a_i$ row one you get $$=(a_1+a_2+..+a_n+x)\begin{vmatrix} 1 & 1 & 1 & \ldots &1\\ 0 & x & 0 & \ldots & 0 \\ 0 & 0 & x & \ldots & 0 \\ \vdots & \vdots& &\ddots& \vdots\\ 0& 0 & 0 & \ldots & x \\ \end{vmatrix}$$