Finding the determinant of a matrix with $0$s on the diagonal, $1$s in the first row and column, and $x$ elsewhere. How do you attempt to solve the deterimnant of
$$D_n=\begin{vmatrix}
0 & 1 & 1 & 1 & \cdots & 1 \\
1 & 0 & x & x & \cdots & x \\
1 & x & 0 & x & \cdots & x \\
1 & x & x & 0 & \ddots & \vdots \\
\vdots & \vdots & \vdots & x & \ddots & x \\
1 & x & x & \cdots & x & 0
\end{vmatrix}$$
My approach is to try and create a similar matrix with finite dimensions (something like a $4\times 4$) and then try and simplify it, but I always get stuck in the process of simplifying...
In general, how do you approach these types of questions?
 A: The first approach is to compute the first few values.
Here they are (WA):
$$
\begin{array}{c}
n& 1 & 2 & 3 & 4 & 5
\\
D_n&0 & -1 & 2x & -3x^2 & 4x^3
\end{array}
$$
The pattern is clear. Try a proof by induction.
A: By Determinant of a specially structured matrix ($a$'s on the diagonal, all other entries equal to $b$)
we know that the determinant is
$$
(-1)^{n-1}(n-1)x^{n}
$$
for the matrix, where the one's are replaced by $x$. But multiplying the first row and column by $x$, we can obtain such a matrix from the given one. The determinant changes by a factor $x^2$ then. So the determinant of our matrix then is
$$
(-1)^{n-1}(n-1)x^{n-2}.
$$
A: We have $$x^2D_n = \begin{vmatrix}
0 & x & x & \cdots & x \\
x & 0 & x & \cdots & x \\
x & x & 0 & \cdots & x \\
\vdots & \vdots & \vdots & \ddots & \vdots \\
x & x & x & \cdots & 0
\end{vmatrix}  = x^n\begin{vmatrix}
0 & 1 & 1 & \cdots & 1 \\
1 & 0 & 1 & \cdots & 1 \\
1 & 1 & 0 & \cdots & 1 \\
\vdots & \vdots & \vdots & \ddots & \vdots \\
1 & 1 & 1 & \cdots & 0
\end{vmatrix} = x^n\det(J-I)$$
where $J$ is the matrix with all entries equal to $1$. We know that $J$ has eigenvalues $0,0, \ldots, 0, n$ with multiplicity. Indeed, the respective basis of eigenvectors are $$e_2-e_1, e_3-e_2,\ldots, e_n-e_{n-1}, e_1+e_2+\cdots+e_n.$$The matrix $J-I$ therefore has eigenvalues $-1,-1, \ldots, -1, n-1$ with multiplicity. Determinant is the product of eigenvalues so $$\det(J-I)=(-1)^{n-1}(n-1)$$
We conclude $D_n = (-1)^{n-1}(n-1)x^{n-2}$.
