Re: trigonometry equation
let's take the scenic route (i love to look out the window and wave to the birds and trees and stuff...)!
let's start with some really simple algebra:
what is the average of $\dfrac{2\pi}{5}$ and $\dfrac{3\pi}{5}$?
um...well...lemme see...it's:
$$\frac{1}{2}\left(\frac{2\pi}{5} + \frac{3\pi}{5}\right) = \frac{5\pi}{10} = \frac{\pi}{2}$$.
this tells us that:
$\displaystyle \sin\left(\frac{2\pi}{5}\right) = \sin\left(\frac{3\pi}{5}\right)$
(since $\frac{2\pi}{5}$ and $\frac{3\pi}{5}$ are the same distance away from $\frac{\pi}{2}$ and sine is symmetric about $\frac{\pi}{2}$, draw this on a circle, and you will see what i mean).
hopefully you know these two formulas (formulae? formuli? formu-la-ha-ha-ha-ha-ha-ha...oops, sorry):
$\sin(2x) = 2\sin(x)\cos(x)$
$\sin(3x) = 4\sin(x)\cos^2(x) - \sin(x)$
(i'll wait while you verify this. ok, time's up! stop!).
since these are equal when $x = \frac{\pi}{5}$, we have (using $y$ instead of $\frac{\pi}{5}$...why? why y? oh why o why?, well y naught? seriously, i kill myself):
$2\sin(y)\cos(y) = 4\sin(y)\cos^2(y) - \sin(y)$
and we have some serious cancellation going on, now (and not those frivolous cancellations you might find on "other" math sites). in particular $\sin(y) \neq 0$, so we can divide it out, leaving:
$2\cos(y) = 4\cos^2(y) - 1$
using a "$u$-substitution" (because i CAN. so there), of: $u = \cos(y)$, this becomes the friendly neighborhood quadratic:
$4u^2 - 2u - 1 = 0$. we can solve this (or at least i can, because i know the formu-...ok, we won't go there), to get:
$\displaystyle u = \frac{1 \pm \sqrt{5}}{4}$
we want the positive solution, since $y$ is in the first quadrant. well, it's all downhill from here (so i'll just shut off the engine, and coast. wheeeee!).
since $\cos(2x) = 2\cos^2(x) - 1$, we have:
$\displaystyle \cos\left(\frac{2\pi}{5}\right) = 2\left(\frac{1+\sqrt{5}}{4}\right)^2 - 1 = \frac{\sqrt{5} - 1}{4}$
similarly, since $4 = 2\cdot 2$ (i KNEW that would come in handy some day!):
$\displaystyle \cos\left(\frac{4\pi}{5}\right) = 2\left(\frac{\sqrt{5} - 1}{4}\right)^2 - 1 = \frac{-\sqrt{5} - 1}{4}$
now since "others" (who aren't nearly as awesome as ME, so they shall remain nameless, in order to further promote my shameless self-promotion. i take cash, checks and all major credit cards) have pointed out that:
$\displaystyle \cos\left(\frac{2\pi}{5}\right) = \cos\left(\frac{8\pi}{5}\right);\ \cos\left(\frac{4\pi}{5}\right) = \cos\left(\frac{6\pi}{5}\right)$
when we add these four bad boys up (bad boys, bad boys, what are you going to do...what are you going to do when dey come for you...am i easily distracted? yes? no? maybe??) we get:
$\displaystyle \frac{\sqrt{5} -1}{4} + \frac{-\sqrt{5} -1}{4} + \frac{\sqrt{5} - 1}{4} + \frac{-\sqrt{5} - 1}{4} = -1$
TA DA!
(this message brought to you by starbucksTM coffee. remember to drink responsibly).
(posthumous credit given to evgeny.makarov and MarkFL on advice of counsel).