Let $\theta=\dfrac{2\pi}{1996}$, $I$ denote the $1996\times 1996$ identity matrix, and $A=(a_{jk})$ be the $1996\times 1996$ matrix whose entries are defined as $a_{jk} = \cos((k+j)\theta)$. Find $\det(I+A)$.
Edit: previously I had attached a solution to this question, but apparently that made my question off-topic, so I've decided to look for another solution.
Obviously, one has to use eigenvalues and eigenvectors to solve this question. Properties of the determinant will be useful as well, and it may be necessary to have separate cases for when $N$ is even or odd.
The answer is easily deduced from the following more general identity.
(The coefficient of $\lambda^{n-k}$ is $\pm$ the sum of principal minors of $A$ of size $k$; these vanish when $k>2$.)
The given matrix is obtained with $x_k=\cos k\theta$ and $y_k=\sin k\theta$ (where $\theta=2\pi/n$ and $n=1996$), giving $\det(\lambda I-A)=\lambda^n-n^2\lambda^{n-2}/4$ when $n>2$. The answer to the given question is $\color{blue}{-996003}$.