Is there a closed - form expression for the finite sum on the secant function : $$\sum _{k=0}^{n-1} (-1)^k \sec \left(\frac{\pi \, k}{n}+\frac{\pi }{2\,n}\right)$$ as a function of n?
Motivation:
The sum is part of a more elaborated solution of Eric Naslund of the integral:
$$\int_0^{\infty } \text{sech}(z)\,\text{sech}(n\,z) \, dz = \frac{\pi}{2\, n} \sum _{k=0}^{n-1} (-1)^k \sec \left(\frac{\pi\, k}{n}+\frac{\pi }{2\,n}\right)+\frac{1}{2} \pi \sec \left(\frac{\pi\, n}{2}\right)$$
which holds for any even number n.
Attempt at a solution:
There are some interesting papers, WEN CHANG CHU, Djurdje Cvijovic, H.M. Srivastava and HONGWEI CHEN, considering the summation of finite secant sums.
Investigations of the first bibliographical reference lead to the closed form expression for the similar finite sum:
$$\sum _{k=0}^n (-1)^k \sec \left(2 \left(\frac{\pi\,k}{n}+y\right)\right)=\frac{2\,n \,\sin \left(\frac{\pi\,n}{4}\right) \,\cos \left(\frac{n\,y}{2}\right)}{\cos (n\,y)-\cos \left(\frac{\pi\,n}{2}\right)}+\sec (y)$$
with $y = \frac{1}{2\,n}$, which can be further investigated by:
$$\sec (2\,z) = \frac{\sec ^2(z)}{2-\sec ^2(z)}$$
and
$$\sec (\frac{z}{2})=\frac{\sqrt{2}}{\sqrt{\cos (z)+1}} (-1)^{\left\lfloor \frac{\pi +\Re(z)}{2 \pi }\right\rfloor } \left(1-\left((-1)^{\left\lfloor -\frac{\pi +\Re(z)}{2 \pi }\right\rfloor +\left\lfloor \frac{\pi +\Re(z)}{2 \pi }\right\rfloor }+1\right) \theta (-\Im(z))\right) $$ where $\Theta$ is the "unitstep" - function.
In case of the last bibliographical reference, the main difference to the sum above is, that [HONGWEI CHEN], deals only with higher powers of a similar sum - but without that "factor 2" - e.g.
$$S_{2 n}(\text{q})\text{:=}\sum _{p = 0\,\text{;}\,p\neq \frac{q}{2} (\text{q is even})}^{q-1} \sec ^{2\, n}\left(\frac{\pi\, p}{q}\right)$$
Another attempt at a solution is to write the sum as a "q-series" Dieckmann.
EDIT
A new approach is to split the sum e.g. for $n=4,8,12,...$ [Claude Leibovici]
$$\sum _{k=0}^{n-1} (-1)^k \sec \left(\frac{\pi (2\,k+1)}{2\,n}\right)=2 \sum _{l=0}^{\frac{n}{4}-1} (-1)^l \sec \left(\frac{\pi \, (2\,l+1)}{2\,n}\right)-2 \sum _{l=0}^{\frac{n}{4}-1} (-1)^l \csc \left(\frac{\pi\, (2\,l+1)}{2\,n}\right)$$
The summary of the preliminary work give some evidence that a closed - form expression exists:
The finite sum can be simplified to:
$$S_{n}=\sum _{k=0}^{n-1} (-1)^k \sec \left(\frac{\pi\,k}{n}+\frac{\pi }{2\,n}\right)=2 \,\sum _{k=0}^{\frac{n}{2}-1} \sec \left(\frac{2\,\pi\,k}{n}+\frac{\pi}{2\,n}\right)$$
For the proof one has to split the sum in even and odd "k's".
From expressions of the first bibliographical reference and the help of Dieckmann the following identity can be proven:
$$W_{n}=\sum _{k=0}^n \frac{1}{\cos \left(\frac{2\, \pi\, k}{n}\right)+z}=\frac{ n \,\cot \left(\frac{n}{4}\, \left(2\, \sin^{-1}(z)+\pi \right)\right)}{\sqrt{1-z^2}}+\frac{1}{z+1}$$
From the proof of the main result of [HONGWEI CHEN] one derive the further identity:
$$V_{n}=\sum _{k=0}^n \frac{1}{\cos \left(\frac{\pi \, k}{n}\right)+z}=\frac{z}{z^2-1}-\frac{n \cot \left(n \cos ^{-1}(z)\right)}{\sqrt{1-z^2}}$$
Now we split the finite sum $W_{n}$ for even numbers n:
$$W_{n}=\sum _{k=0}^{\frac{n}{2}} \frac{1}{\cos \left(\frac{2 \,\pi \, k}{n}\right)+z}+\sum _{k=\frac{n}{2}+1}^n \frac{1}{\cos \left(\frac{2\,\pi \,k}{n}\right)+z}$$
We express the first sum of $W_{n}$ by $V_{n}$ and solve for the last sum. This leads to:
$$S_{z,w,n}=2 \sum _{k=0}^{n-1} \frac{1}{z-\cos \left(\frac{\pi \, k}{n}+\frac{\pi}{w\,n}\right)}$$
For $w=1$ we have:
$$S_{z,1,n}=\frac{2\, n \,\left(\cot \left(n \cos ^{-1}(z)\right)+2\, \cot \left(\frac{1}{2} \,n \,\left(2 \,\sin ^{-1}(z)+\pi \right)\right)\right)}{\sqrt{1-z^2}}+\frac{2}{1-z^2}$$
The limit $\lim_{z\to 0}$ and $w=4$ gives the solution. With other words we need a general expression, dependent of $w$, with $S_{z,1,n}$ for $w=1$.
EDIT II
Mathematica can find a solution expressed in closed form using the q-polygamma function:
$$S_{\frac{n}{2}}=\frac{2\,n}{\pi } \left(\psi _{e^{-\frac{i\,\pi}{n}}}\left(\frac{1}{4}-\frac{n}{2}\right)-2\, \psi _{e^{-\frac{i\,\pi }{n}}}\left(\frac{1}{4}+\frac{n}{2}\right)+\psi_{e^{-\frac{i\,\pi }{n}}}\left(\frac{1}{4}+\frac{3\,n}{2}\right)\right)$$
where $\psi _q(z)$ is the q-polygamma function. With the function "FunctionExpand" Mathematica expands the q-polygamma function with the complex argument and one can verify the radicals of [Vepir]. Numerically the values can be optained by the well-known identity for the q-polygamma function:
$$\psi _q(x+1)=\psi _q(x)-\frac{q^x \log (q)}{1-q^x}$$
Using the identity n-times recursively, in the expression $S_{\frac{n}{2}}$, $\psi _q(x)$ for $x=\frac{1}{4}$ vanishes!
Summary
These results are the same!
- $$\mathcal{I}\left( n \right)=\int_0^{\infty } \text{sech}(z)\,\text{sech}(n\,z) \, dz$$
- $$\mathcal{I}\left( n \right)=\frac{1}{n}\sum _{k=0}^{\infty } (-1)^k \left(\psi \left(\frac{3 n+2k+1}{4 n}\right)-\psi \left(\frac{n+2 k+1}{4 n}\right)\right)$$
- $$\mathcal{I}\left( n \right)=\frac{\pi}{2\,n} \sum _{k=0}^{n-1} (-1)^k \sec \left(\frac{\pi\, k}{n}+\frac{\pi }{2\,n}\right)+\frac{1}{2} \pi \sec \left(\frac{\pi\, n}{2}\right)$$
- $$\mathcal{I}\left( n \right)=\frac{\pi} {2 \,n} \left(\sum _{l=0}^{\infty } \frac{\left(E_l\right){}^2 \left(\frac{i\, \pi }{2\, n}\right)^l}{l!}-n \,i^n\right)+\frac{1}{2} \pi \sec \left(\frac{\pi\, n}{2}\right)$$
- $$\mathcal{I}\left( n \right)=\frac{1}{2} \left(\psi _{e^{-\frac{2\, i \,\pi}{n}}}\left(\frac{1-n}{4}\right)-2\, \psi _{e^{-\frac{2\, i\, \pi }{n}}}\left(\frac{1+n}{4}\right)+\psi_ {e^{-\frac{2\, i\, \pi }{n}}}\left(\frac{1}{4} (1+3 \,n)\right)\right)+ \\ +\frac{1}{2} \pi \sec \left(\frac{\pi\, n}{2}\right)$$
- $$\mathcal{I}\left( n \right)=\frac{\pi}{2\,n} \left((n+1)-\sec\left(\frac{\pi }{2 \,n}\right)\left(\sin \left(\frac{\pi }{2\, n}\right)-3\right)+\\ + 2\, \sum _{m=-\frac{n}{4}}^{\frac{n}{4}} \cot \left(\frac{\pi \, \left(m-\frac{1}{4}\right)}{n}\right)+2 \sum_{m=-\frac{n}{2}}^{\frac{n}{2}} \frac{1}{\cot\left(\frac{\pi \, \left(m-\frac{1}{4}\right)}{n}\right)-1}\right) +\frac{1}{2} \pi \sec \left(\frac{\pi\, n}{2}\right)$$
"6." follows from "5" and has a nice form for $n=2,6,10,\cdots$. The first term is the approximation of [Claude Leibovici].
$$ \begin{array}{l|r} n=2& 2 \sqrt{2} \ n=4& -4 \sqrt{2-\sqrt{2}} \ n=6& 4 \sqrt{6}-2 \sqrt{2} \ n=8& -4 \sqrt{12-2 \sqrt{7 \sqrt{2}+10}} \ n=10& 2 \sqrt{2} \left(\sqrt{5}+4\right)-4 \sqrt{5-\sqrt{5}} \ n=12& -4 \sqrt{-11 \sqrt{2}+4 \sqrt{3}-4 \sqrt{6}+26} \ \end{array} $$
– Vepir Dec 25 '19 at 11:46