Interesting Determinant Let $x_1,x_2,\ldots,x_n$ be $n$ real numbers that satisfy $x_1<x_2<\cdots<x_n$. 
Define \begin{equation*}
A=%
\begin{bmatrix}
0 & x_{2}-x_{1} & \cdots & x_{n-1}-x_{1} & x_{n}-x_{1} \\ 
x_{2}-x_{1} & 0 & \cdots & x_{n-1}-x_{2} & x_{n}-x_{2} \\ 
\vdots & \vdots & \ddots & \vdots & \vdots \\ 
x_{n-1}-x_{1} & x_{n-1}-x_{2} & \cdots & 0 & x_{n}-x_{n-1} \\ 
x_{n}-x_{1} & x_{n}-x_{2} & \cdots & x_{n}-x_{n-1} & 0%
\end{bmatrix}%
\end{equation*}
Could you determine the determinant of $A$ in term of $x_1,x_2,\ldots,x_n$?
I make a several Calculation: 
For $n=2$, we get
\begin{equation*}
A=%
\begin{bmatrix}
0 & x_{2}-x_{1} \\ 
x_{2}-x_{1} & 0%
\end{bmatrix}%
\text{ and}\det (A)=-\left( x_{2}-x_{1}\right) ^{2}
\end{equation*}
For $n=3$, we get
\begin{equation*}
A=%
\begin{bmatrix}
0 & x_{2}-x_{1} & x_{3}-x_{1} \\ 
x_{2}-x_{1} & 0 & x_{3}-x_{2} \\ 
x_{3}-x_{1} & x_{3}-x_{2} & 0%
\end{bmatrix}%
\text{ and}\det (A)=2\left( x_{2}-x_{1}\right) \left( x_{3}-x_{2}\right)
\left( x_{3}-x_{1}\right) 
\end{equation*}
For $n=4,$ we get
\begin{equation*}
A=%
\begin{bmatrix}
0 & x_{2}-x_{1} & x_{3}-x_{1} & x_{4}-x_{1} \\ 
x_{2}-x_{1} & 0 & x_{3}-x_{2} & x_{4}-x_{2} \\ 
x_{3}-x_{1} & x_{3}-x_{2} & 0 & x_{4}-x_{3} \\ 
x_{4}-x_{1} & x_{4}-x_{2} & x_{4}-x_{3} & 0%
\end{bmatrix} \\%
\text{ and} \\ \det (A)=-4\left( x_{4}-x_{1}\right) \left( x_{2}-x_{1}\right)
\left( x_{3}-x_{2}\right) \left( x_{4}-x_{3}\right) 
\end{equation*}
Finally, I guess that the answer is $\det(A)=2^{n-2}\cdot (x_n-x_1)\cdot (x_2-x_1)\cdots (x_n-x_{n-1})$. But I don't know how to prove it.
 A: Clearly the determinant is $0$ if $x_i = x_{i+1}$ (because two adjacent rows are identical) or $x_1 = x_n$ (last row is $-$ first row).  So the determinant must be a polynomial divisible by $(x_1 - x_2)(x_2 - x_3) \ldots (x_{n-1} - x_n)(x_n - x_1)$.  But the determinant has degree $n$, so it is a constant times this product.  To determine what the constant is,
you might try a special case: $x_i = i$.
EDIT: Thanks to J.M.'s remark, you can show that in that special case the inverse of your matrix $A_n$ looks like this:
$$ \pmatrix{ -\frac{1}{2}+\frac{1}{2n-2} & \frac{1}{2} & 0 & 0 & \ldots & 0 & \frac{1}{2n-2}\cr
             \frac{1}{2} & -1 & \frac{1}{2} & 0 & \ldots & 0 & 0\cr
              0          & \frac{1}{2} & -1 & \frac{1}{2} & \ldots & 0 & 0\cr
              \ldots     &  \ldots     & \ldots & \ldots & \ldots & \ldots & \ldots \cr
    0 & 0 & 0 & 0 & \ldots & -1 & \frac{1}{2}\cr
  \frac{1}{2n-2} & 0 & 0 & 0 & \ldots & \frac{1}{2} & -\frac{1}{2} + \frac{1}{2n-2}\cr}$$
where the  elements on the main diagonal are all $-1$ except for the first and last, those 
just above and below the diagonal are all $1/2$, the top right and bottom left are $1/(2n-2)$, and everything else is $0$.
A: Expanding Robert solution.
Let $det(A) = P(x)$. Let the polynomial on the right is a multi-variable polynomial $P(x)$.
If $x_1 = x_2$ then $det(A) = 0$ i.e $P(x) = 0$ i.e. $(x_1 - x_2)$ is a factor of $P(x)$.
If $x_2 = x_3$ then $det(A) = 0$ i.e $P(x) = 0$ i.e. $(x_2 - x_3)$ is a factor of $P(x)$.
etc. We calculate possible factors of $P(x)$. Have we calculated all possible factors of $P(x)$?
Let $Q(x) = (x_1 - x_2) (x_2 - x_3) \ldots (x_{n} - x_{1}) $
What we know about the degree of $P(x)$? It is $n$, equal to that of $Q(x)$. Thus $Q(x)$ multiplied by some constant factor should give us $P(x)$ i.e. we already have all possible factors of $P(x)$.
A Robert has already mentioned, we should calculate this constant factor.
It follows that if for any $i$, $x_i = x_{i+1}$, then $P(x) =0$ i.e. $det(A) = 0$. Since you alretady have constraints such as $x_1 >x_2 \ldots x_n$, $det(A) \ne 0$.
