# Algorithms for Various Trigonometric Power Sums
## 3 Alternating Sums  
In the previous section, algorithms for both the untwisted Gardner-Fisher and Dowker sums were presented. As indicated in [21], these results formed the basis for determining more intricate trigonometric power sums, which will be discussed in later sections of this paper. For now, however, we can extend this basis by considering the alternating versions of the sums. That is, we are interested in solving  
\[S_{v,l}^{\pm}(m)\doteq\sum_{k=1}^{m-1}(\pm 1)^{k}\csc^{2\kappa}\Big{(}\frac{k \pi}{Im}\Big{)}. \tag{16}\] \begin{table}
\begin{tabular}{c l} \hline \hline \(\boldsymbol{v}\) & \(\boldsymbol{S_{v,1}(m)}\) \\ \hline
1 & \(\frac{1}{3}(m^{2}-1)\) \\
2 & \(\frac{1}{45}(m^{4}+10m^{2}-11)\) \\
3 & \(\frac{1}{45}(2m^{6}+21m^{4}+168m^{2}-191)\) \\
4 & \(\frac{1}{4175}(3m^{8}+40m^{6}+294m^{4}+21600m^{2}-2497)\) \\
5 & \(\frac{1}{9355}(2m^{10}+33m^{8}+286m^{6}+1804m^{4}+12672m^{2}-14797)\) \\
6 & \(\frac{1}{638512875}(1382m^{12}+27300m^{10}+279279m^{8}+1987700m^{6}+11507496m^ {4}+78624000m^{2}\) \\  & \(-92427157)\) \\
7 & \(\frac{1}{273638375}(60m^{14}+1382m^{12}+16380m^{10}+133419m^{8}+846560m^{6}+463 8816m^{4}\) \\  & \(+31104000m^{2}-36740617)\) \\
8 & \(\frac{1}{48862439575}(10851m^{16}+285600m^{14}+3853016m^{12}+35536800m^{10}+25 2498246m^{8}\) \\  & \(+1485473600m^{6}+7834021056m^{4}+51819264000m^{2}-61430943169)\) \\
9 & \(\frac{1}{1948964740025}(438760m^{18}+12988647m^{16}+196571340m^{14}+2027485212m^ {12}\) \\  & \(+16038878310m^{10}+103972564332m^{8}+579728203680m^{6}+2972311034112m^{2}\) \\  & \(+1945965772800m^{2}-23133945892303)\) \\
10 & \(\frac{3215791877103125}{32157918771103125}(7333662m^{20}+241268500m^{18}+40481283 15m^{16}+46185447000m^{14}\) \\  & \(+403106645370m^{12}+2871945940500m^{10}+17427265889880m^{8}+93352118904000m^{6}\) \\  & \(+468374518402560m^{4}+3041851706640000m^{2}-3624331198599787)\) \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Values of \(S_{v,1}(m)\) for \(v\) up to and including 10. From here on, we shall denote \(S_{v,l}(m)\) in the previous section as \(S^{+}_{v,l}(m)\). The solutions for \(l=1\) and \(2\) of \(S^{-}_{v,l}(m)\) can be determined by modifying the derivations for \(l=1\) and \(2\) of \(S^{+}_{v,l}(m)\), as can be seen by the following theorem. **Theorem 1. **_General solutions of \(S^{-}_{v,l}(m)\) for the Dowker (\(l=1\)) and Gardner-Fisher (\(l=2\)) cases are, respectively,_  
\[S^{-}_{v,1}(m)= \begin{cases}0,&m,\ \text{odd},\\ 2^{2v+1}\sum_{n=0}^{v-1}\frac{(2\pi)^{2n-2v}}{(2v-2n)_{2n}}s(v,n)\Big{(}\big{(} 2^{2n-2v+1}-1\big{)}m^{2v-2n}-1\Big{)}\zeta(2v-2n),&m,\ \text{even},\end{cases}  \tag{17}\]  
_and_  
\[S^{-}_{v,2}(m) =2^{2v}\sum_{n=0}^{v-1}\frac{(2\pi)^{2n-2v}}{(2v-2n)_{2n}}s(v,n) \Big{(}2m^{2v-2n}-(2m)^{2v-2n}\] \[-(-1)^{m}\,2^{2v-2n}+(-1)^{m}-1\Big{)}\zeta(2v-2n). \tag{18}\]  
**Proof. ** In the proof of Theorem 3.1 in [21], the following result was obtained:  
\[\text{csc}^{2v}\bigg{(}\frac{k\pi}{2m}\bigg{)}=-\frac{4^{v}m^{2}}{\pi^{2}\Gamma (2v)}\int_{0}^{1}\frac{\ln u}{1-u^{2m}}\prod_{n=1}^{v-1}\bigg{(}\frac{m^{2}}{ \pi^{2}}\ln^{2}u+n^{2}\bigg{)}\Big{(}u^{k}+u^{2m-k}\Big{)}\frac{du}{u}. \tag{19}\]  
This can be generalized to \(\text{csc}^{2v}(k\pi/lm)\) by replacing \(m\) with \(lm/2\).