\begin{align*} \sum_{k=1}^{n-1} \frac{1}{\cosh^2\left(\frac{\pi k}{n}\right)}\end{align*}
I tried to solve with mathematica that shows
Does anyone know how to derive this and does it is possible for Human to derive this(speaking seriously)
Copyright © 2021 JogjaFile Inc.
First of all, you could have simplified the formula $$\frac{\pi ^2}{n^2}\sum_{k=1}^{n-1} \frac{1}{\cosh^2\left(\frac{\pi k}{n}\right)}=$$ $$\psi _{e^{\frac{\pi }{n}}}^{(1)}\left(\left(1-\frac{i}{2}\right) n\right)+\psi _{e^{\frac{\pi }{n}}}^{(1)}\left(\left(1+\frac{i}{2}\right) n\right)-\psi _{e^{\frac{\pi }{n}}}^{(1)}\left(1-\frac{i n}{2}\right)-\psi _{e^{\frac{\pi }{n}}}^{(1)}\left(1+\frac{i n}{2}\right)$$
Next, you could bound the summation by the two integrals $$I_1=\int_{1}^{n-1} \frac{dk}{\cosh^2\left(\frac{\pi k}{n}\right)}=\frac n \pi \left(\tanh \left(\frac{\pi (n-1)}{n}\right)-\tanh \left(\frac{\pi }{n}\right)\right)$$
$$I_2=\int_{0}^{n-1} \frac{dk}{\cosh^2\left(\frac{\pi k}{n}\right)}=\frac n \pi \tanh \left(\frac{\pi (n-1)}{n}\right) $$ which, compared to your summation, differ at most by $\pm \frac 12$.
All of that leads to the asymptotics
$$\sum_{k=1}^{n-1} \frac{1}{\cosh^2\left(\frac{\pi k}{n}\right)}\sim -\frac 12+\frac{ \tanh (\pi )}{\pi }n-\frac{\pi \tanh (\pi ) \text{sech}^2(\pi )}{n}+O\left(\frac{1}{n^2}\right)$$