8 By considering \(\sum _ { r = 1 } ^ { n } z ^ { 2 r - 1 }\), where \(z = \cos \theta + \mathrm { i } \sin \theta\), show that, if \(\sin \theta \neq 0\),
$$\sum _ { r = 1 } ^ { n } \sin ( 2 r - 1 ) \theta = \frac { \sin ^ { 2 } n \theta } { \sin \theta }$$
Deduce that
$$\sum _ { r = 1 } ^ { n } ( 2 r - 1 ) \cos \left[ \frac { ( 2 r - 1 ) \pi } { 2 n } \right] = - \operatorname { cosec } \left( \frac { \pi } { 2 n } \right) \cot \left( \frac { \pi } { 2 n } \right)$$