2

$$S(n)=\sum_{r=1}^{n}\sec^2\left(\frac{2r\pi}{n}\right)$$

I started with the identity $\sec^2(x)=1+\tan^2(x)$ to try and simplify this;

$$\sum_{r=1}^{n}\sec^2\left(\frac{2r\pi}{n}\right)=\sum_{r=1}^{n}\left(1+\tan^2\left(\frac{2r\pi}{n}\right)\right)=n+\sum_{r=1}^{n}\tan^2\left(\frac{2r\pi}{n}\right)$$ We land on, $$T(n)=\sum_{r=1}^{n}\tan^2\left(\frac{2r\pi}{n}\right)$$

Now trying to solve this I have tried to substitute $\tan(x)=\frac{e^{ix}-e^{-ix}}{i(e^{ix}+e^{-ix})}$ to try and use any standard progressions, but that path failed, the expression got complicated. No hope on telescoping as well.

I know about $\sum_{r=1}^{n}\sin^2\left(\frac{2r\pi}{n}\right), \sum_{r=1}^{n}\cos^2\left(\frac{2r\pi}{n}\right)$, but cannot think of anything works the same way for the tan series, unless the double angle identity of tangent makes it easier;

$$1-\frac{2\tan(x)}{\tan(2x)}=\tan^2(x)$$

$$T(n)=\sum_{r=1}^{n} \left(1-\frac{2\tan\left(\frac{2r\pi}{n}\right)}{\tan\left(\frac{4r\pi}{n}\right)}\right)=n-2\sum_{r=1}^{n} \frac{\tan\left(\frac{2r\pi}{n}\right)}{\tan\left(\frac{4r\pi}{n}\right)}$$

I am interested in understanding how this can be evaluated

Note: I do know the closed form is $S(n)=n^2\implies T(n)=n^2-n$

Edit :

Here's the solution for the original $n$ value it was intended; $n=2023$

$$x^{2023}-1=\prod_{n=1}^{2023}\left(x-e^{\frac{n2i\pi }{2023}}\right)$$ $$x \to -x$$ $$x^{2023}+1=\prod_{n=1}^{2023}\left(x+e^{\frac{-n2i\pi }{2023}}\right)$$

Multiply above equations;

$$x^{4046}-1=\prod_{n=1}^{2023}\left(x-e^{\frac{n2i\pi }{2023}}\right)\prod_{n=1}^{2023}\left(x+e^{\frac{-n2i\pi }{2023}}\right)=\prod_{n=1}^{2023}\left(x-e^{\frac{n2i\pi }{2023}}\right)\left(x+e^{\frac{-n2i\pi }{2023}}\right)$$

$$x^{4046}-1=\prod_{n=1}^{2023}\left(x^2-x\left(e^{\frac{n2i\pi }{2023}}-e^{\frac{-n2i\pi }{2023}}\right)-1\right)$$

$$x^{4046}-1=\prod_{n=1}^{2023}\left(x^2-2ix\left(\frac{e^{\frac{n2i\pi }{2023}}-e^{\frac{-n2i\pi }{2023}}}{2i}\right)-1\right)$$

$$x^{4046}-1=\prod_{n=1}^{2023}\left(x^2-2ix\sin\left({\frac{2n\pi }{2023}}\right)-1\right)$$

$$x \to ix$$

$$x^{4046}+1=\prod_{n=1}^{2023}\left(x^2-2x\sin\left({\frac{2n\pi }{2023}}\right)+1\right)=\prod_{n=1}^{2023}2x\left(\frac{x^2+1}{2x}-\sin\left({\frac{2n\pi }{2023}}\right)\right)$$

$$2^{-2023}(x^{2023}+x^{-2023})=\prod_{n=1}^{2023}\left(\frac{x^2+1}{2x}-\sin\left({\frac{2n\pi }{2023}}\right)\right)$$

$$\frac{x^2+1}{2x}=t\implies x=t+\sqrt{t^2-1}\,\,|| \,\,(t+\sqrt{t^2-1})^{-1}=t-\sqrt{t^2-1}$$

$$2^{-2023}\left((t+\sqrt{t^2-1})^{2023}+(t-\sqrt{t^2-1})^{2023}\right)=\prod_{n=1}^{2023}\left(t-\sin\left({\frac{2n\pi }{2023}}\right)\right)$$

Differentiate above equation and applying below property and after lots of simplification;

$$\frac{d}{dx}\prod_{n=1}^{2023} f(x)=\prod_{n=1}^{2023} f(x)\,\sum_{n=1}^{2023} \frac{f'(x)}{f(x)}$$

$$\sum_{n=1}^{2023} \left(\frac{1}{t-\sin\left(\frac{2n\pi}{2023}\right)}\right)=\frac{2023}{\sqrt{t^2-1}}\left(\frac{(t+\sqrt{t^2-1})^{2023}-(t-\sqrt{t^2-1})^{2023}}{(t+\sqrt{t^2-1})^{2023}+(t-\sqrt{t^2-1})^{2023}}\right)$$

$$t \to -t$$

$$\sum_{n=1}^{2023} \left(\frac{1}{t+\sin\left(\frac{2n\pi}{2023}\right)}\right)=\frac{2023}{\sqrt{t^2-1}}\left(\frac{(t+\sqrt{t^2-1})^{2023}-(t-\sqrt{t^2-1})^{2023}}{(t-\sqrt{t^2-1})^{2023}+(t+\sqrt{t^2-1})^{2023}}\right)$$

Adding above two equations; $$\sum_{n=1}^{2023} \left(\frac{1}{t-\sin\left(\frac{2n\pi}{2023}\right)}\right)+ \left(\frac{1}{t+\sin\left(\frac{2n\pi}{2023}\right)}\right)=\frac{4046}{\sqrt{t^2-1}}\left(\frac{(t+\sqrt{t^2-1})^{2023}-(t-\sqrt{t^2-1})^{2023}}{(t-\sqrt{t^2-1})^{2023}+(t+\sqrt{t^2-1})^{2023}}\right)$$

$$\sum_{n=1}^{2023} \left(\frac{1}{t^2-\sin^2\left(\frac{2n\pi}{2023}\right)}\right)=\frac{2023}{t\sqrt{t^2-1}}\left(\frac{(t+\sqrt{t^2-1})^{2023}-(t-\sqrt{t^2-1})^{2023}}{(t-\sqrt{t^2-1})^{2023}+(t+\sqrt{t^2-1})^{2023}}\right)$$

Applying the right hand limit on both sides,

$$\lim_{t\to1}\sum_{n=1}^{2023} \left(\frac{1}{t^2-\sin^2\left(\frac{2n\pi}{2023}\right)}\right)=\lim_{t\to1}\frac{2023}{t\sqrt{t^2-1}}\left(\frac{(t+\sqrt{t^2-1})^{2023}-(t-\sqrt{t^2-1})^{2023}}{(t-\sqrt{t^2-1})^{2023}+(t+\sqrt{t^2-1})^{2023}}\right)$$

$$\sum_{n=1}^{2023} \left(\frac{1}{1-\sin^2\left(\frac{2n\pi}{2023}\right)}\right)=\lim_{t\to1}\frac{2023}{t\sqrt{t^2-1}}\left(\frac{(t+\sqrt{t^2-1})^{2023}-(t-\sqrt{t^2-1})^{2023}}{(t-\sqrt{t^2-1})^{2023}+(t+\sqrt{t^2-1})^{2023}}\right)$$

$$\sum_{r=1}^{2023}\sec^2\left(\frac{2r\pi}{2023}\right)=\lim_{t\to1}\frac{2023}{t\sqrt{t^2-1}}\left(\frac{(t+\sqrt{t^2-1})^{2023}-(t-\sqrt{t^2-1})^{2023}}{(t-\sqrt{t^2-1})^{2023}+(t+\sqrt{t^2-1})^{2023}}\right)$$

Using L'hospital, $$\sum_{r=1}^{2023}\sec^2\left(\frac{2r\pi}{2023}\right)=2023^2$$

$$\sum_{r=1}^{2023}\tan^2\left(\frac{2r\pi}{2023}\right)=(2022)(2023)$$

bob
  • 3,079
Amrut Ayan
  • 8,887
  • https://math.stackexchange.com/questions/951522/trig-sum-tan-21-circ-tan-22-circ-cdots-tan2-89-circ-text – lab bhattacharjee Aug 21 '24 at 14:07
  • I think the values $\sec(2r\pi/n)$ should be the roots of a polynomial related to the imaginary part of $(1 + i\sqrt{x^2-1})^n$. From there, expand what the largest powers of $x$ would be in terms of $n$, use Vieta's formulas, etc. – Daniel Schepler Aug 21 '24 at 22:09
  • By the way, from my quick experiments using a Python script, it looks like in the case $n \equiv 2 \pmod{4}$, the correct answer is probably $S(n) = \frac{n^2}{2}$. If $n$ is odd, then indeed it looks like $S(n) = n^2$ is probably correct in that case. – Daniel Schepler Aug 21 '24 at 22:37

2 Answers2

3

Note that $S(n)$ is not defined for $n \equiv 0 \pmod 4$.

For odd $n$, let $n=2m+1$ and $(2m+1)\theta=r\pi$ for $r=1,2,3, \cdots ,2m+1$. $$\tan(2m+1)\theta=0$$ Using de Moivre's theorem, $$\sum_{k=0}^m\binom{2m+1}{2k+1}(-1)^k\tan^{2k+1}\theta=0$$ Let $t=\tan\theta$ $$f(t)=\sum_{k=0}^m\binom{2m+1}{2k+1}(-1)^kt^{2k+1}\theta$$ $$f(t)=a_{2m+1}t^{2m+1}+a_{2m-1}t^{2m-1}+ \cdots + a_3t^3+a_1t$$ Using Vieta's formulas, sum of squares of zeroes of $f$ is equal to $$\sum_{r=1}^{2m+1}\tan^2\left(\frac{r\pi}{2m+1}\right)=\frac{a_{2m}^2}{a_{2m+1}^2}-2\frac{a_{2m-1}}{a_{2m+1}}$$

Since $a_{2m}=0$ , $a_{2m-1}= (-1)^{m-1}\binom{2m+1}{2}$ and $a_{2m+1}=(-1)^m$ $$\sum_{r=1}^{2m+1}\tan^2\left(\frac{r\pi}{2m+1}\right)=2\binom{2m+1}{2}=(2m+1)(2m)=n(n-1)=n^2-n$$ Also, $$T(n)=\sum_{r=1}^{2m+1}\tan^2\left(\frac{2r\pi}{2m+1}\right)$$ $$=\sum_{r=1}^{m}\tan^2\left(\frac{2r\pi}{2m+1}\right)+\sum_{r=m+1}^{2m+1}\tan^2\left(\frac{2r\pi}{2m+1}\right)$$ $$=\sum_{r=1}^{m}\tan^2\left(\frac{2r\pi}{2m+1}\right)+\sum_{r=m+1}^{2m+1}\tan^2\left(\frac{2r\pi}{2m+1}-\pi\right)$$ $$=\sum_{r=1}^{m}\tan^2\left(\frac{2r\pi}{2m+1}\right)+\sum_{r=0}^{m}\tan^2\left(\frac{(2r+1)\pi}{2m+1}\right)$$ $$=\sum_{r=1}^{2m+1}\tan^2\left(\frac{r\pi}{2m+1}\right)$$

$$\therefore T(n)=n^2-n$$ $$S(n)=T(n)+n=n^2$$

For $n\equiv 2 \pmod 4$, let $n=4m+2$ $$T(n)=\sum_{r=1}^{n}\tan^2\left(\frac{2r\pi}{n}\right)$$ $$=\sum_{r=1}^{4m+2}\tan^2\left(\frac{r\pi}{2m+1}\right)=2\sum_{r=1}^{2m+1}\tan^2\left(\frac{r\pi}{2m+1}\right)$$ $$=4\binom{2m+1}{2}=\frac{n(n-2)}{2}$$ $$\therefore S(n)=T(n)+n$$ $$S(n)=\frac{n^2}{2}$$

1

I begin with a preliminary claim which is likely already on other pages on Math.SE.

Claim: $\sum_{r=1}^{2n-1} \tan^2\left(\frac{r\pi}{2n-1}\right) = (2n-1)(2n-2)$ for $n\in \mathbb Z^+$.

Proof: It is known from the expansion of $\sin(nx)$ (which follows from Binomial and Demoivre's theorems) that the roots of $\binom{2n-1}1x - \binom{2n-1}3 x^3 + \binom{2n-1}5 x^5 + \dots + (-1)^{\frac{n-1}2}x^{2n-1}$ are $\tan\left(\frac{r\pi}{2n-1}\right)$ for $r \in \{1,2,3\dots,2n-1\}$. Note that $p_2 = \color{pink}{e_2}^2 - 2\color{teal}{e_1}$ from Newton's identities. It follows via Vieta's relations that $$\begin{align} \sum_{r=1}^{2n-1} \tan^2\left(\frac{r\pi}{2n-1}\right) &= \left(\color{pink}{\sum_{r=1}^{2n-1} \tan\left(\frac{r\pi}{2n-1}\right)}\right)^2 - 2\left(\color{teal}{\underset{1\le j\lt k\le 2n-1}{\sum\sum} \tan\left(\frac{j\pi}{2n-1}\right)\tan\left(\frac{k\pi}{2n-1}\right)}\right)\\ &=\color{pink}0 - 2\color{teal}{\frac{-\binom{2n-1}{2n-3}}{1}} \\ &= (2n-1)(2n-2) \end{align}$$


Coming back to the original question; if $n$ is odd then $n=2k-1$ for some $k \in \mathbb Z^+$.

$$\begin{align} T &:= \sum_{r=1}^{n} \tan^2\left(\frac{2r\pi}{n}\right)\\ &= \sum_{r=1}^{2k-1} \tan^2\left(\frac{2r\pi}{2k-1}\right)\\ &= \sum_{r=1}^{2k-1} \tan^2\left(\frac{r\pi}{2k-1}\right)\tag{1.1}\\ &= (2k-1)(2k-2)\\ &= n(n-1)\end{align}$$

If $n=4k$ for some $k\in \mathbb Z^+$ then $T$ is undefined; if $n=4k-2$ for $k\in \mathbb Z^+$ then $$\begin{align} T &:= \sum_{r=1}^{n} \tan^2\left(\frac{2r\pi}{n}\right)\\ &= \sum_{r=1}^{4k-2} \tan^2\left(\frac{r\pi}{2k-1}\right)\\ &= \sum_{r=1}^{2k-1} \tan^2\left(\frac{r\pi}{2k-1}\right) + \sum_{r=2k}^{4k-2} \tan^2\left(\frac{r\pi}{2k-1}\right)\\ &= \sum_{r=1}^{2k-1} \tan^2\left(\frac{r\pi}{2k-1}\right) + \sum_{r=1}^{2k-1} \tan^2\left(\frac{(2k-1+r)\pi}{2k-1}\right) \tag{1.2}\\ &= 2\sum_{r=1}^{2k-1} \tan^2\left(\frac{r\pi}{2k-1}\right)\\ &= 2(2k-1)(2k-2)\\ &= \frac{n(n-2)}2 \end{align}$$

With this we have found $T(n)$ for all integers based on $n\bmod 4$. We conclude the value for $S(n)$ as follows $$S(n) = \begin{cases} n^2 && n\text{ odd} \\ \frac{n^2}2 && n\equiv 2 \pmod 4 \end{cases}$$

Explanations;

$(1.1)$ follows from the identity that $\tan^2(k\pi \pm x) = \tan^2 x$ for all integers $k$ and that the set $\{2r \ |\ 1\le r\le n\}$ is a complete residue class $\bmod n$ since $\gcd(2,n)=1$. Specfically, each of the $\frac{2r}{n}$ where $r\in [1,n] \cap \mathbb Z$ can be expressed in the form $\frac{kn + m}{n}$ where $m\in [1,n] \cap \mathbb Z$ and where $k \in \mathbb Z$ and where each $r$ corresponds to a distinct $m$.

$(1.2)$ reindex the second sum $r\to 2k-1+r$.

Sahaj
  • 5,355