Determine {\color{orange}w} = \cos \left(fractionReduce(3+2*N,12)\pi\right)
.
\color{orange}w
=
WF
We decompose the fraction into fractionReduce(3+2*N,12)\pi = fraction(1,4)\pi+ fractionReduce(N,6)\pi
and apply the addition theorem with
\cos(\alpha + \beta)=\cos (\alpha) \cdot \cos (\beta) - \sin (\alpha) \cdot \sin (\beta).
We look into the table with known values of the sine and cosine functions
\begin{array}{c|c c c c c} x & 0 & \frac{\pi}{6} & \frac{\pi}{4} & \frac{\pi}{3} & \frac{\pi}{2} \\ \hline \sin(x) & 0 & \frac{1}{2} & \frac{\sqrt{2}}{2} & \frac{\sqrt{3}}{2} & 1 \\ \cos (x) & 1 & \frac{\sqrt{3}}{2} & \frac{\sqrt{2}}{2} & \frac{1}{2} & 0 \end{array}
and substitute these values:
Thus, {\color{orange}w} = \cos \left(fractionReduce(3+2*N,12)\pi\right) =
\cos \left(fraction(1,4)\pi+ fractionReduce(N,6)\pi\right) = \cos \left(fraction(1,4)\pi\right) \cdot \cos \left(fractionReduce(N,6)\pi\right) - \sin \left(fraction(1,4)\pi\right) \cdot \sin \left(fractionReduce(N,6)\pi\right)
.
Evaluating then gives {\color{orange}w} = \left( \dfrac{\sqrt{2}}{2} \cdot \dfrac{\sqrt{-2*N+5}}{2}- \dfrac{\sqrt{2}}{2} \cdot \dfrac{\sqrt{2*N-1}}{2}\right),
which simplifies to {\color{orange}w} =\dfrac{\sqrt{2*(-2*N+5)} -\sqrt{2*(2*N-1)}}{4}
.