# Algorithms for Various Trigonometric Power Sums
## 3 Alternating Sums
Then, we have  
\[\text{csc}^{2v}\bigg{(}\frac{k\pi}{lm}\bigg{)}=-\frac{4^{v-1}l^{2}m^{2}}{\pi^ {2}\Gamma(2v)}\int_{0}^{1}\frac{\ln u}{1-u^{lm}}\prod_{n=1}^{v-1}\bigg{(}\frac {l^{2}m^{2}}{4\pi^{2}}\ln^{2}u+n^{2}\bigg{)}\Big{(}u^{k}+u^{lm-k}\Big{)}\frac{ du}{u}. \tag{20}\]  
Multiplying the above result by \((-1)^{k}\) and summing over \(k\) from \(1\) to \(m-1\), we obtain \(S^{-}_{v,l}(m)\), which is given by  
\[S^{-}_{v,l}(m)=-\frac{4^{v-1}l^{2}m^{2}}{\pi^{2}\Gamma(2v)}\int_{0}^{1}\frac{ \ln u}{1-u^{lm}}\prod_{n=1}^{v-1}\bigg{(}\frac{l^{2}m^{2}}{4\pi^{2}}\ln^{2}u+ n^{2}\bigg{)}\Big{(}\sum_{k=1}^{m-1}(-u)^{k}+\sum_{k=1}^{m-1}(-1)^{k}u^{lm-k} \Big{)}\frac{du}{u}. \tag{21}\]  
The sums over \(k\) in (21) are simply the finite geometric series, which yield  
\[\frac{1}{u}\sum_{k=1}^{m-1}\Big{(}(-u)^{k}+(-1)^{k}u^{lm-k}\Big{)}=-\big{(}1+ (-1)^{m}u^{(l-1)m}\big{)}\Big{(}\frac{1-(-u)^{m-1}}{1+u}\Big{)}. \tag{22}\]  
In addition, from [21], the product in (21) can be expressed via [PERSON]'s identities as  
\[\prod_{n=1}^{v-1}\Big{(}\frac{l^{2}m^{2}}{4\pi^{2}}\ln^{2}u+n^{2}\Big{)}=\sum _{n=0}^{v-1}\Big{(}\frac{l^{2}m^{2}}{4\pi^{2}}\ln^{2}u\Big{)}^{n}s(v,n). \tag{23}\]  
By introducing (22) and (23) into (21), one is able to write the integrals over \(u\) in terms of derivative of digamma function via No. 4.271(16) in [23]. Thus, after some algebra, one arrives at  
\[S^{-}_{v,l}(m) =\frac{2^{2v}}{\Gamma(2v)}\sum_{n=0}^{v-1}(2\pi)^{2n-2v}s(v,n) \sum_{k=1}^{m-1}\Big{(}(-1)^{k}\psi^{(2v-2n-1)}\Big{(}\frac{k}{lm}\Big{)}\] \[+\quad(-1)^{m-k}\psi^{(2v-2n-1)}\Big{(}\frac{k+(l-1)m}{lm}\Big{)} \Big{)}, \tag{24}\]where \(s(v,n)\) is given by (12). Noting that \(\psi^{(n)}(x)=(-1)^{n+1}n!\zeta(n+1,x)\), where \(\zeta(n,x)\) represents the Hurwitz zeta function, we can simplify (24) to  
\[S^{-}_{v,l}(m) =\frac{2^{2v}\Gamma(2v-2n)}{\Gamma(2v)}\sum_{n=0}^{v-1}(2\pi)^{2n -2v}s(v,n)\sum_{k=1}^{m-1}\Big{(}(-1)^{k}\zeta\Big{(}2v-2n,\frac{k}{lm}\Big{)}\] \[-(-1)^{m}\,2^{2v-2n}+(-1)^{m}-1\Big{)}\zeta(2v-2n). \tag{18}\]0  
Now, we examine the \(l\!=\!1\) and \(l\!=\!2\) cases of (24) separately. For \(l\!=\!1\) or the Dowker case, we find that the summation over \(k\) reduces to  
\[-(-1)^{m}\,2^{2v-2n}+(-1)^{m}-1\Big{)}\zeta(2v-2n). \tag{18}\]1 \[-(-1)^{m}\,2^{2v-2n}+(-1)^{m}-1\Big{)}\zeta(2v-2n). \tag{18}\]2  
This result indicates that when \(m\) is an odd integer, \(S^{-}_{v,1}(m)\) vanishes. Hence, the trigonometric power sum will only yield non-zero solutions for even integer values of \(m\). Thus, we arrive at  
\[-(-1)^{m}\,2^{2v-2n}+(-1)^{m}-1\Big{)}\zeta(2v-2n). \tag{18}\]3  
The sum over \(k\) can be expressed as  
\[-(-1)^{m}\,2^{2v-2n}+(-1)^{m}-1\Big{)}\zeta(2v-2n). \tag{18}\]4  
Since \(m\) can only be an even integer, we can combine the two dimensional sum into one dimensional sums by noting that  
\[-(-1)^{m}\,2^{2v-2n}+(-1)^{m}-1\Big{)}\zeta(2v-2n). \tag{18}\]5  
Introducing (29) into (25) yields the first result displayed in the theorem. For \(l\!=\!2\) or the Gardner-Fisher case, the summation over \(k\) in (25) for any positive integer \(v\) becomes  
\[\sum_{k=1}^{m-1}\Big{(}(-1)^{k}\zeta\Big{(}v,\frac{k}{2m}\Big{)}+(-1)^{m+k} \zeta\Big{(}v,\frac{k+m}{2m}\Big{)}\Big{)}=\sum_{ \begin{subarray}{c}k=1\\ k\
eq m\end{subarray} }^{2m-1}(-1)^{k}\zeta\Big{(}v,\frac{k}{2m}\Big{)}. \tag{30}\]  
By inserting the \(k\!=\!m\) term into the sum over \(k\) on the right-hand side (rhs) and subtracting it separately, one eventually arrives at  
\[\sum_{ \begin{subarray}{c}k=1\\ k\
eq m\end{subarray} }^{2m-1}(-1)^{k}\zeta\Big{(}v,\frac{k}{2m}\Big{)}=\Big{(}2 m^{v}-(2m)^{v}-(-1)^{m}2^{v}+(-1)^{m}-1\Big{)}\zeta(v). \tag{31}\]  
Introducing (31) into (25) gives the second result in the theorem. We can use the material in the previous section to create an algorithm/program of these results. First, we begin by programming the alternating sum directly. This will show that Mathematica is able to provide the polynomials in powers of \(m^{2}\) for the Dowker case, but can only provide numerical values in the Gardner-Fisher case.