Compute the determinant The following problem is taken from here exercise $2:$

Question: Evaluate the determinant: 
  \begin{vmatrix}
0 & x & x & \dots & x \\
y & 0 & x & \dots & x \\
y & y & 0 & \dots & x \\
\vdots & \vdots & \vdots & \ddots & \vdots \\
y & y & y & \dots & 0
\end{vmatrix}

My attempt: 
I tried to use first row substract second row to obtain 
\begin{pmatrix}
y & -x & 0 \dots & 0
\end{pmatrix}
and also first row subtracts remaining rows. 
However, I have no idea how to proceed. 
 A: If you continue subtracting the $(k+1)$th row from the $k$th, you end up with
$$ \Delta_n = \begin{vmatrix} -y & x  \\
& -y & x \\
&& -y & x \\
&&&\ddots & \ddots \\
&&&& -y & x \\
y & y & y & \cdots & y & 0 \end{vmatrix}, $$
where blank spaces are zeros. One can also pull out a factor of $xy$ now, but there's not a lot of point. Expanding along the first column gives
$$ \Delta_n = -y\Delta_{n-1} +(-1)^{n-1} y \begin{vmatrix}  x  \\
-y & x \\
& -y & x \\
&&\ddots & \ddots \\
&&& -y & x \end{vmatrix} = -y \Delta_{n-1} + (-1)^{n-1} yx^{n-1}. $$
Iterating this and using $\Delta_2=-xy$ gives
$$ \Delta_n = (-1)^{n-1} (xy^{n-1}+x^2y^{n-2}+\dotsb+x^{n-1}y) = (-1)^{n-1}xy \frac{x^{n-1}-y^{n-1}}{x-y}.  $$
A: Let $A$ be a $n\times n$ matrix of the form described above. You can easily compute the determinant by hand for the case up to $n=4$, which suggests the following relation:
$$\det(A_n) = (-1)^{n+1}\sum_{i=1}^{n-1}x^iy^{n-i}$$
This can be proved by induction, by using the calculated small cases, followed by using the fact that the determinant can be computed as the sum of the determinants of comatrices. 
A: Chappers's expanding is correct, but the answer is imho wrong: it is not correct for $n=2$. Iterating over $\Delta$ gives you
$$
\Delta_n = (-1)^{n-1}xy\frac{x^{n-1}-y^{n-1}}{x-y}
$$
