Now $cos\left(\frac{a}{b}\pi\right) = cos\left(a \cdot \frac{1}{b} \pi\right) = P\left(cos\left(\frac{1}{b} \pi\right)\right)$; that is, $cos\left(\frac{a}{b}\pi\right)$ can be written as a degree $a$ polynomial in terms of $cos\left(\frac{1}{b}\pi\right)$.

So when $a = b,$ where $b$ is a positive integer, we get a degree $b$ polynomial in terms of $cos\left(\frac{1}{b}\pi\right)$.

But if $a = b, cos\left(\frac{a}{b}\pi\right) = cos(\pi) = -1,$ so it follows that the root of the polynomial, $cos\left(\frac{1}{b}\pi\right)$, will be algebraic; $P(x) = y,$ where $y$ is algebraic, by definition has an algebraic root.

Hence $cos\left(\frac{a}{b}\pi\right) = P\left(cos\left(\frac{1}{b} \pi\right)\right)$ will be algebraic for all integer values of $a$; if $a$ is negative then we use the result that $cos(x) = cos(-x)$. Q.E.D.

Notes

Because $sin^2(x) + cos^2(x) = 1$ and $tan(x) = \dfrac{sin(x)}{cos(x)}$ it follows that $sin(x)$ and $tan(x)$ will also be algebraic if $x$ is a rational multiple of $\pi$.

As $\pi$ radians = $180^o$, $1^o$ degree = $\dfrac{\pi}{180}$, so $cos(1^o) = cos\left(\dfrac{\pi}{180}\right)$ is algebraic. So it follows that $sin(x), cos(x),$ and $tan(x)$ will be algebraic for all rational angles given in degrees.

The Hemite-Lindermann Theorem states that $a_{1}e^{b_1} + a_{2}e^{b_2} + ... \ne 0$ if all $a_i$ and $b_i$ are algebraic. (Additionally the coefficients must be non-zero and the exponents must be distinct.) In other words, no sum of exponential functions with algebraic coefficients and exponents will ever equal zero.

Using the identity $y = cos(x) = \dfrac{e^{ix}+e^{-ix}}{2}$ we get the equation, $e^{ix}+e^{-ix} - 2ye^0 = 0$. But according to the theorem this cannot be true if all the coefficients and exponents are algebraic. We can see that when $x = \pi, y = cos(\pi) = -1$ is clearly algebraic. So this theorem proves that $x = \pi$ is the non-algebraic entity, and $\pi$ is transcendental. It also demonstrates that when $x$ (in radians) is algebraic, $y = cos(x)$ must be transcendental.