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. 

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. 
