Without using tables, find the value of $$\cos\frac{\pi}{7}+\cos\frac{3\pi}{7}+\cos\frac{5\pi}{7}$$
This is a very common high school trigonometric problem, and the usual way to solve this is by repeated application of trigonometric identities. But I thought of a bit different approach.
Somehow, if we can find a polynomial whose roots are the three terms of the above expression, then we can apply Vieta's formula to find the value.
So please help me with it. (Any hint will be appreciated.)
If you insist on finding a polynomial, you can do it via Chebyshev polynomials. These polynomials are defined by $T_n(\cos \theta)=\cos n\theta$, and can be generated through the recurrence relation:
$$T_0(x)=1\\ T_1(x)=x \\ T_{n+1}(x)=2xT_n(x)-T_{n-1}(x)$$
By going through this recurrence you can find that $T_7(x)=64x^7-112x^5+56x^3-7x$. So for the cosines in this problem we have $T_7(\cos (k\pi/7))= \cos k\pi = -1$. This means that the cosines are roots of $f(x)=T_7(x)+1$. $$f(x)=64x^7-112x^5+56x^3-7x+1=(x+1)(8x^3-4x^2-4x+1)^2$$
It is no surprise they are double roots or that $-1$ is a root too. Because of this you could actually do this factorization by hand, by taking the greatest common polynomial divisor $f$ and its derivative $f'$: $$\gcd(f(x),f'(x)) = \\ \gcd(64x^7-112x^5+56x^3-7x+1,\ 448x^6-560x^4+168x^2-7) =\\ 8x^3-4x^2-4x+1$$ using the Euclidean algorithm with polynomial long division.
In this way we can find the polynomial $8x^3-4x^2-4x+1$ which has exactly those three cosines as roots. Their sum is therefore $-\frac{-4}{8} = \frac{1}{2}$.