Prove that a $(n+1)\times(n+1)$ matrix with cosinuses is invertible I have to prove that matrix $$
    \begin{pmatrix}
    1 & \cos(x_0) & \cos(2x_0) & … & \cos(nx_0) \\
    1 & \cos(x_1) & \cos(2x_1) & … & \cos(nx_1) \\
    ... & ... & … & ... \\
    1 & \cos(x_n) & \cos(2x_n) & … & \cos(nx_n) \\ 
    \end{pmatrix}
$$
is invertible. I know that $$ 0 \le x_0 \lt x_1 \lt x_2 \lt … \lt x_n \lt \pi $$
so all the elements in the second column are different and decreasing. But the same cannot be said about the other columns. 
I don't think that calculating the determinant is a good idea here, I tried to prove that columns\rows are independent, but I didn't come up with anything useful. 
 A: The determinant
$$D_{n+1} = \begin{vmatrix}
    1 & \cos(x_0) & \cos(2x_0) & … & \cos(nx_0) \\
    1 & \cos(x_1) & \cos(2x_1) & … & \cos(nx_1) \\
    ... & ... & … & ... \\
    1 & \cos(x_n) & \cos(2x_n) & … & \cos(nx_n) \\ 
    \end{vmatrix}
$$
Can be written as 
$$D_{n+1} = \begin{vmatrix}
    T_0(y_0) & T_1(y_0) & T_2(y_0) & … & T_n(y_0) \\
    T_0(y_1) & T_1(y_1) & T_2(y_1) & … & T_n(y_1) \\
    ... & ... & … & ... \\
    T_0(y_n) & T_1(y_n) & T_2(y_n) & … & T_n(y_n) \\ 
    \end{vmatrix}
$$ where $T_n$ is a polynomial of degree $n$ and $y_i = \cos(x_i)$ according to Multiple-Angle Formulas.
And the last determinant is a constant multiple of $\prod_{1\leq j < k\leq n}(y_j-y_k)$, since it is a polynomial in the variables $y_1,\ldots,y_n$ with degree $\binom{n}{2} = 1 + 2 + \dots + n$ which vanishes if $y_j=y_k$ for some $j\neq k$.
As $$ 0 \le x_0 \lt x_1 \lt x_2 \lt … \lt x_n \lt \pi ,$$ we have $y_j \neq y_k$ for $j \neq k$. Hence the determinant is not zero and the matrix is invertible.
