Prove Demoivre's theorem for a rational index and shew how to express \(\cos\theta\) and \(\sin\theta\) in terms of exponential functions. Express \(\cos^n\theta\) (\(n\) being a positive integer) linearly in terms of cosines of multiples of \(\theta\), distinguishing if necessary between odd and even values of \(n\), and deduce the corresponding expressions for \(\sin^n\theta\).
A plane polygon of \(n\) sides of lengths \(a_1, a_2, \dots, a_n\), respectively, has angles given by \(\theta_{rs}\), the measure of the angle between the two sides \(a_r, a_s\), positively drawn in the same sense. Establish the relation
\[ a_n^2=a_1^2+\dots+a_{n-1}^2+2\Sigma a_r a_s\cos\theta_{rs}, \]
where in the summation all possible combinations of \(r\) and \(s\) are taken for \(r