On a determinant identity 
Show that
$$\det \begin{bmatrix} -x & 1 & \dots & 1 \\ 1 & -x & \dots & 1 \\ \vdots & \vdots & \ddots & \vdots \\ 1 & 1 & \dots & -x \end{bmatrix}  = (-1)^n(1+x-n)(1+x)^{n-1}$$
for all $n \in \mathbb{N}$.

I tried using induction but I didn't manage (using row/column swaps). Does anyone have any idea?
 A: Idea:
Let 
$$A=\begin{bmatrix} -x & 1 & \dots & 1 \\ 1 & -x & \dots & 1 \\ \vdots & \vdots & \ddots & \vdots \\ 1 & 1 & \dots & -x \end{bmatrix}.$$
Then
$$A\begin{bmatrix}1\\1\\ \vdots \\1\end{bmatrix}=((n-1)-x)\begin{bmatrix}1\\1\\ \vdots \\1\end{bmatrix}.$$
Thus $(n-1)-x$ is an eigen value of $A$ so it divides the determinant. 
Moreover we can think of $\text{det} A$ as an $n^{\text{th}}$ degree polynomial in $x$. An obvious root is $x=-1$ (because $\text{det} A\big|_{x=-1}=0$). Thus you have another factor of the determinant. 
So far we have
$$\text{det} A=(x+1)(x-(n-1))p(x),$$
where $p(x)$ is some polynomial of degree $n-2$.
If $x \neq -1, n-1$ then try showing that the columns/rows are linearly independent so  $\text{det} A \neq 0$. Thus the only roots of the determinant polynomial are $-1,n-1$. Now think about how to deal with multiplicity of the root $x=-1$ (hint: when $x=-1$, the $\text{rank}(A)=n-1$.)
A: HINT
$$\begin{align}\begin{vmatrix} -x & 1 & \dots & 1 \\ 1 & -x & \dots & 1 \\ \vdots & \vdots & \ddots & \vdots \\ 1 & 1 & \dots & -x \end{vmatrix}&=\begin{vmatrix} -x+n-1& 1 & \dots & 1 \\ -x+n-1 & -x & \dots & 1 \\ \vdots & \vdots & \ddots & \vdots \\-x+n-1 & 1 & \dots & -x \end{vmatrix}\\&=(-x+n-1)\begin{vmatrix} 1& 1 & \dots & 1 \\ 1 & -x & \dots & 1 \\ \vdots & \vdots & \ddots & \vdots \\1 & 1 & \dots & -x \end{vmatrix}\\&=(-x+n-1)\begin{vmatrix} 1& 1 & \dots & 1 \\ 0 & -x-1 & \dots & 0 \\ \vdots & \vdots & \ddots & \vdots \\0 & 0 & \dots & -x-1 \end{vmatrix}\end{align}$$
A: Subtract the first row from all of the other rows ... we have
\begin{eqnarray*}
\left[\begin{array}{cccccc}
-x  & 1      & 1 & 1 &\cdots &1\\
1+x & -(x+1) & 0 & 0 &\cdots &0\\ 
1+x & 0 &-(x+1)  & 0 &\cdots &0\\ 
1+x & 0 &0 & -(x+1)  & \cdots &0\\ 
\vdots & \vdots &\vdots &\vdots &\ddots &\vdots & \\
1+x & 0 &0 & 0  & \cdots &-(x+1)\\ 
\end{array}\right]
\end{eqnarray*}
The leading diagonal will give a contribution of $\color{blue}{-x(-1)^{n-1}(x+1)^{n-1}}$ and if we pick the $i^{th}$ $1$ in the first row then we must pick the $i^{th}$ $(1+x)$ in the first column and the rest of the terms on the leading diagonal, there are $\color{red}{(n-1)}$ of these & each will give a contribution of $\color{orange}{-(1+x)^{n-1}(-1)^{n-2}}$. Putting these together we have $(-1)^{n}(1+x-n)(1+x)^{n-1}$.
\begin{eqnarray*}
\color{blue}{-x(-1)^{n-1}(x+1)^{n-1}}+\color{red}{(n-1)} \color{orange}{(-(1+x)^{n-1}(-1)^{n-2})}=(-1)^{n}(1+x-n)(1+x)^{n-1}.
\end{eqnarray*}
A: $$\begin{bmatrix} -x & 1 & \dots & 1 \\ 1 & -x & \dots & 1 \\ \vdots & \vdots & \ddots & \vdots \\ 1 & 1 & \dots & -x \end{bmatrix} = 1_n 1_n^\top - (x+1) \mathrm I_n = - (x+1) \left( \mathrm I_n - \frac{1}{x+1} 1_n 1_n^\top \right)$$
Using the Weinstein-Aronszajn determinant identity,
$$\begin{array}{rl} \det \begin{bmatrix} -x & 1 & \dots & 1 \\ 1 & -x & \dots & 1 \\ \vdots & \vdots & \ddots & \vdots \\ 1 & 1 & \dots & -x \end{bmatrix} &= (-1)^n (x+1)^n \det \left( \mathrm I_n - \frac{1}{x+1} 1_n 1_n^\top \right)\\ &= (-1)^n (x+1)^n \left( 1 - \frac{1}{x+1} 1_n^\top 1_n \right)\\\\ &= (-1)^n (x+1)^n \left( 1 - \frac{n}{x+1} \right)\\\\ &= (-1)^n (x+1)^{n-1} \left( x+1 - n \right)\end{array}$$
