There is a Wikipedia entry dedicated to this, which contains an alternative method to compute the minimal polynomial of $2\cos(\pi/n)$, which is essentially the same as for $\cos(π/n)$. In fact, denoting the minimal polynomial of $2\cos(π/n)$ by $\Psi_n(x)$, we have by the quoted AMM article in Vladimir Dotsenko's answer for odd $n=2k+1$ $$\prod_{d \mid n}\Psi_d(x) = 2\Big(T_{k + 1}(\frac x2) - T_k(\frac x2)\Big)$$ and for even $n=2k$ $$\prod_{d \mid n}\Psi_d(x) = 2\Big(T_{k + 1}(\frac x2) - T_{k-1}(\frac x2)\Big).$$ But there is in fact no need to calculate the ChebychevChebyshev polynomials. Defining for odd $n=2k+1$ $$\chi_{n}(x):= \sum_{k=0}^m (-1)^{\lfloor k/2\rfloor}\binom {m-\lfloor (k+1)/2\rfloor}{\lfloor k/2\rfloor} x^{m-k},$$ we have directly
$$\prod _{d\mid n}\Psi_{d}( x)=(x-2)\chi_{n}(x),$$ noting that $\Psi_{1}( x)=x-2$.
For even $n=2k$, we just need to sum up two of those polynomials: $$\prod _{d\mid n}\Psi_{d}( x)=(x-2)\Big(\chi_{n+1}(x)+\chi_{n-1}(x)\Big).$$