A surprising identity: $\det[\cos\pi\frac{jk}n]_{1\le j,k\le n}=(-1)^{\lfloor\frac{n+1}2\rfloor}(n/2)^{(n-1)/2}$ On the basis of my computation, here I pose my following conjecture involving the cosine function.
Conjecture. For any positive integer $n$, we have the identity
$$\frac1{2n}\det\left[\cos\pi\frac{jk}n\right]_{0\le j,k\le n}=\det\left[\cos\pi\frac{jk}n\right]_{1\le j,k\le n}=(-1)^{\lfloor\frac{n+1}2\rfloor}(n/2)^{(n-1)/2}.$$
This is a part of Conjecture 5.7 in my preprint arXiv:1901.04837. The paper contains more similar conjectures.
Any ideas towards a solution of the conjecture?
 A: First of all, we use the formula 
$$
D:=\det [x_j^k+x_j^{-k}]_{j,k=0,\dots,m-1}=\prod_{l<j}(x_j+x_j^{-1}-x_l-x_l^{-1})=\prod_{l<j} (x_j-x_l)(1-x_j^{-1}x_l^{-1}).
$$
This follows from the observation that $x^k+x^{-k}=p_k(x+x^{-1})$ for a polynomial $p$ of degree $k$ with leading coefficient 1, so our matrix is the Vandermonde matrix for $x_j+x_j^{-1}$ times some unitriangular matrix.
For the determinant when $j$ and $k$ vary from 0 to $n$, this is a special case when $x_j=e^{\pi i j/n}$ for $j=0,1,\dots,n$ (with $m=n+1$). The sign of $D$ clearly equals $(-1)^{\binom{n+1}2}$, since all differences $x_j+x_j^{-1}-x_l-x_l^{-1}$ are negative reals, and we have to find the absolute value of $D$. $$
|D|=4\left|\prod_{0<l<j<n}(x_j-x_l)(x_j-x_l^{-1})\right|\cdot \left|\prod_{j=1}^{n-1} (x_j-1)^2(x_j+1)^2\right|
=\\=4\left|\frac12\prod_{a^{2n}=b^{2n}=1,a\ne b} (a-b)\right|^{\frac12}\cdot \left|\prod_{j=1}^{n-1}(1-x_j^2)\right|^{\frac12}.
$$
It is well known that the absolute value of the product over $a,b$ (i.e. of the discriminant of the polynomial $f_{2n}(z)=z^{2n}-1$) equals $(2n)^n$ (for example, because $|f_{2n}'(\omega)|=2n$ for any root $\omega$ of $f_0$), and $\prod_{j=1}^{n-1}(1-x_j^2)=n$ for the same reason (i.e. $f_n'(1)=n$, $x_j^2$ are roots of $f_n$).
Now about the determinant $\det [x_j^k+x_j^{-k}]_{j,k=1,\dots,n}$
for $x_j=e^{i\pi j/n}$ (divided by $2^n$). In order to reduce it to the determinant $\tilde{D}$ when $j$ varies from 1 to $n$ but $k$ from 0 to $n-1$, we introduce the coefficients $a_0,a_1,\dots,a_{n-1}$ such that
$x^n+x^{-n}-\sum_{j=0}^{n-1} a_j(x^j+x^{-j})=\prod_{j=1}^n(x+x^{-1}-x_j-x_j^{-1})$. Then subtracting from the last column the linear combination of first $n-1$ columns we get the column of the form $a_0(x_j^0+x_j^{-0})$, thus our determinant equals $(-1)^{n-1}a_0\tilde{D}$. 
It remains to calculate $\tilde{D}$ and $a_0$. We may compare $\tilde{D}$ with above $D$. We have $$D=(-1)^n \cdot 2\tilde{D}\cdot \prod_{a^{2n}=1,a\ne 1} (1-a)=4(-1)^nn\tilde{D}.$$
Now about $a_0$. $-a_0$ is the constant term of the Laurent polynomial $$\prod_{j=1}^n(x+x^{-1}-x_j-x_j^{-1})=x^{-n}\prod_{j=1}^n(x-x_j)(x-x_j^{-1})=x^{-n}(x^{2n}-1)\cdot \frac{x+1}{x-1}=x^{-n}(x+1)(1+x+\dots+x^{2n-1}),$$ thus $a_0=-2$.
