# Why $\cos\frac{\pi}{9}=-\frac{1}{2}(-1)^{\frac{8}{9}}(1+(-1)^{\frac{2}{9}})$?

If you type in Wolfram Alpha $$\cos\frac{\pi}{9}$$ this is what you get:

$$\cos\frac{\pi}{9}=-\frac{1}{2}(-1)^{\frac{8}{9}}(1+(-1)^{\frac{2}{9}})$$

I have no idea how to derive this, maybe it is trivial but I can't see it. Maybe it follows from the fact that $$\cos\frac{\pi}{9}=\Re\ e^{i\frac{\pi}{9}}=\Re\ (e^{i\pi})^{\frac{1}{9}}=\Re\ (-1)^\frac{1}{9}$$ but I couldn't continue from here.

By the way, should this be considered a "closed form"? In my opinion, yes.

Also, is it possible to get a similar result for every angle?

• Probably starts with $\cos x = (e^{ix} + e^{-ix})/2$. Commented May 4, 2023 at 16:16
• Related, as Wolfram Alpha also gives the answer as the root of the polynomial $8x^3-6x-1$. Commented May 4, 2023 at 16:47

It's easier to see, I think, if you note that $$-1= e^{\pi i}$$ and so, for example, $$(-1)^{\frac{8}{9}}= e^{\frac{8}{9}\pi i}$$. Then $$-\tfrac{1}{2}(-1)^{\frac{8}{9}}(1 + (-1)^{\frac{2}{9}})= \tfrac{1}{2}e^{\pi i}e^{\frac{8}{9}\pi i}(1 + e^{\frac{2}{9}\pi i})= \tfrac{1}{2}e^{2\pi i}e^{-\frac{1}{9}\pi i}(1 + e^{\frac{2}{9}\pi i})$$ which simplifies to $$\tfrac{1}{2}(e^{-\frac{1}{9}\pi i} + e^{\frac{1}{9}\pi i})= \cos \tfrac{1}{9}\pi.$$

This assumes that Wolfram Alpha intends $$(-1)^{\frac{1}{9}}$$ to be understood as the principal $$9^{\mathrm{th}}$$ root of $$-1$$.

• That's right, it was the reason! Commented May 4, 2023 at 16:53
• Thank you. My reasoning, that failed, was: $$\cos\frac{\pi}{9}=\frac{e^{i\frac{\pi}{9}}+e^{-i\frac{\pi}{9}}}{2}=\frac{1}{2}( (e^{i\pi})^{\frac{1}{9}}+ (e^{-i\pi})^{\frac{1}{9}})=\frac{1}{2}((-1)^{\frac{1}{9}}+(-1)^{\frac{1}{9}} )=\frac{1}{2}(2(-1)^{\frac{1}{9}})=(-1)^{\frac{1}{9}}=e^{i\frac{\pi}{9}}$$ which is clearly wrong. What did I miss?
– Zima
Commented May 4, 2023 at 16:55
• You have to be very careful with index notation for complex numbers: it is true that $e^{-i\frac{\pi}{9}}$ is one of the ninth roots of $-1$, but not the principal root; by calling them both $(-1)^{\frac{1}{9}}$ you are eliding that distinction. A more extreme form of the same notational problem is $(-1)^9 = -1 \implies -1 = (-1)^{\frac{1}{9}}$; again 'true' in the senmse that $-1$ is one of the ninth roots of $-1$.
– mcd
Commented May 4, 2023 at 18:16
• Be careful with non-integer exponents otherwise you get contradictions like $1 = 1^{1/2} = (e^{i2\pi})^{1/2} = e^{i\pi} = -1$. Commented May 4, 2023 at 19:11

As an alternative, using that $$e^{i\pi}=-1$$

$$\cos\frac{\pi}{9}=-\cos\left(\pi-\frac{\pi}{9}\right)=-\cos\frac{8}{9}\pi=-\frac12 \left(e^{i\pi\frac{8}{9}}+e^{-i\pi\frac{8}{9}}\right)=-\frac12e^{i\pi\frac{8}{9}} \left(1+e^{-i\pi\frac{16}{9}}\right)$$

$$=-\frac12(-1)^{\frac{8}{9}} \left(1+e^{-i\pi\frac{16}{9}+i2\pi}\right)=-\frac12(-1)^{\frac{8}{9}} \left(1+e^{i\pi\frac{2}{9}}\right)=-\frac12(-1)^{\frac{8}{9}} \left(1+(-1)^{\frac{2}{9}}\right)$$