Is there any identity for $\sum_{k=1}^{n}\tan\left(\theta+\frac{k\pi}{\color{red} {2n+1}}\right)$ or $\sum_{k=1}^{n}\tan\left(\frac{k\pi}{\color{red} {2n+1}}\right)$ ?
I thought maybe wrongly that given:
$\sum_{k=1}^{n}\cot\left(\frac{k\pi}{\color{red} {2n+1}}\right)=\sum_{k=1}^{n}-\tan\left(\frac{\pi}{ {2}}+\frac{k\pi}{\color{red} {2n+1}}\right)$
and since $n \cot(nx)$ is the logarithmic derivative of $\sin(nx)$ and $\cot\left(x+\frac{\pi k}{n}\right)$ is the logarithmic derivative of $\sin\left(x+\frac{\pi k}{n}\right)$, I tried manipulating the identity:
$2^n \prod_{k=1}^n \sin\left(\frac{k\pi}{2n+1}\right)=\sqrt{2n+1}$
but I kept getting stuck.
The variation $\sum_{k=0}^{n-1}\tan\left(\theta+\frac{k\pi}{n}\right)=−n\cot\left(\frac{n\pi}{2}+n\theta\right)$ is seen to work quite nicely.
a
andb
$$\sum _{k=1}^n \tan (a k+b)=i n+\frac{2 i \psi _{e^{2 i a b}}\left(1-\frac{i \pi }{\ln \left(e^{2 i a b}\right)}\right)}{\ln \left(e^{2 i a b}\right)}-\frac{2 i \psi _{e^{2 i a b}}\left(1+n-\frac{i \pi }{\ln \left(e^{2 i a b}\right)}\right)}{\ln \left(e^{2 i a b}\right)}$$ where: $\psi _{e^{2 i a b}}\left(1+n-\frac{i \pi }{\ln \left(e^{2 i a b}\right)}\right)$ is QPolyGamma function. $\endgroup$