Cosine of Integer Multiple of Argument/Formulation 9

Theorem
For $n \in \Z_{>1}$:
 * $\cos n \theta = \map \sin {\paren {n - 1} \theta} \paren {a_0 + \cfrac 1 {a_1 + \cfrac 1 {a_2 + \cfrac 1 {\ddots \cfrac {} {a_{n - r} } } } } }$

where:
 * $r = \begin {cases} 1 & : \text {$n$ is even} \\ 2 & : \text {$n$ is odd} \end {cases}$


 * $a_k = \begin {cases} -2 \sin \theta & : \text {$k$ is even and $k < n - 1$} \\ 2 \sin \theta & : \text {$k$ is odd} \\ \sin \theta & : k = n - 1 \end {cases}$

Proof
By comparing Line 2 to Line 8, we see that:

Therefore, the terminal denominator will be:


 * $-2 \sin \theta + \dfrac {\map \cos {\paren {n - 2 k} \theta} } {\map \sin {\paren {n - \paren {2 k - 1} } \theta} }$

Assume $n$ even:
 * $n = 2 k$

Assume $n$ odd:
 * $n = 2 k + 1$

Therefore:


 * $\cos n \theta = \map \cos {\paren {n - 1} \theta} \paren {a_0 + \cfrac 1 {a_1 + \cfrac 1 {a_2 + \cfrac 1 {\ddots \cfrac {} {a_{n - r} } } } } }$

where:
 * $r = \begin {cases} 1 & : \text {$n$ is even} \\ 2 & : \text {$n$ is odd} \end {cases}$


 * $a_k = \begin {cases} -2 \sin \theta & : \text {$k$ is even and $k < n - 1$} \\ 2 \sin \theta & : \text {$k$ is odd} \\ \sin \theta & : k = n - 1 \end {cases}$