Skip to content


  • Research
  • Open Access

Inequalities for finite trigonometric sums. An interplay: with some series related to harmonic numbers

Journal of Inequalities and Applications20162016:173

  • Received: 17 March 2016
  • Accepted: 20 June 2016
  • Published:


An interplay between the sum of certain series related to harmonic numbers and certain finite trigonometric sums is investigated. This allows us to express the sum of these series in terms of the considered trigonometric sums, and permits us to find sharp inequalities bounding these trigonometric sums. In particular, this answers positively an open problem of Chen (Excursions in Classical Analysis, 2010).


  • Bernoulli polynomials
  • Bernoulli numbers
  • harmonic numbers
  • asymptotic expansion
  • sum of cosecants
  • sum of cotangents


  • 11B68
  • 11B83
  • 26D05
  • 26D15
  • 41A17

1 Introduction

Many identities that evaluate trigonometric sums in closed form can be found in the literature. For example, in a solution to a problem in SIAM Review [2], p.157, Fisher shows that
$$\begin{aligned}& \sum_{k=1}^{p-1}\sec^{2} \biggl( \frac{k\pi}{2p} \biggr) =\frac{2}{3} \bigl(p^{2}-1 \bigr), \\& \sum_{k=1}^{p-1}\sec^{4} \biggl( \frac{k\pi}{2p} \biggr) =\frac{4}{45} \bigl(2p^{4}+5p^{2}-7 \bigr). \end{aligned}$$
General results giving closed forms for the power sums of secants \(\sum_{k=1}^{p-1}\sec^{2n}(\frac{k\pi}{2p})\) and \(\sum_{k=1}^{p}\sec^{2n}(\frac{k\pi}{2p+1})\), for many values of the positive integer n, can be found in [3] and [4]. Also, in [5] the author proves that
$$\sum_{k=1}^{p}\sec \biggl( \frac{2k\pi}{2p+1} \biggr) = \textstyle\begin{cases} p&\text{if }p\text{ is even}, \\ -p-1& \text{if }p\text{ is odd}. \end{cases} $$

However, while there are many cases where closed forms for finite trigonometric sums can be obtained, it seems that there are no such formulas for the sums we are interested in.

In this paper we study the trigonometric sums \(I_{p}\) and \(J_{p}\) defined for positive integers p by the formulas
$$\begin{aligned}& I_{p} =\sum_{k=1}^{p-1} \frac{1}{\sin(k\pi/p)}=\sum_{k=1}^{p-1}\csc \biggl( \frac{k\pi}{p} \biggr) , \end{aligned}$$
$$\begin{aligned}& J_{p} =\sum_{k=1}^{p-1}k\cot \biggl(\frac{k\pi}{p} \biggr), \end{aligned}$$
with empty sums interpreted as 0.
To the best of the author’s knowledge there no closed form for \(I_{p}\) is known, and the same can be said about the sum \(J_{p}\). Therefore, we will look for asymptotic expansions for these sums and will give some tight inequalities that bound \(I_{p}\) and \(J_{p}\). This investigation complements the work of Chen in [1], Chapter 7, where it was asked, as an open problem, whether the inequality
$$I_{p}\le\frac{2p}{\pi}\bigl(\ln p+\gamma-\ln(\pi/2)\bigr) $$
holds true for \(p\ge3\) (here γ is the so-called the Euler-Mascheroni constant). In fact, it will be proved that for every positive integer p and every nonnegative integer n, we have
$$ I_{p} < \frac{2p}{\pi}\bigl(\ln p+\gamma-\ln(\pi/2)\bigr)+ \sum _{k=1}^{2n}(-1)^{k} \frac{(2^{2k}-2)b_{2k}^{2}}{k\cdot(2k)!} \biggl(\frac{\pi}{p} \biggr)^{2k-1} $$
$$ I_{p} >\frac{2p}{\pi}\bigl(\ln p+\gamma-\ln(\pi/2)\bigr)+ \sum _{k=1}^{2n+1}(-1)^{k} \frac{(2^{2k}-2)b_{2k}^{2}}{k\cdot(2k)!} \biggl(\frac{\pi}{p} \biggr)^{2k-1}, $$
where the \(b_{2k}\)’s are Bernoulli numbers (see Theorem 3.4). The corresponding inequalities for \(J_{p}\) are also proved (see Theorem 3.9).
Harmonic numbers play an important role in this investigation. Recall that the nth harmonic number \(H_{n}\) is defined by \(H_{n}=\sum_{k=1}^{n}1/k\) (with the convention \(H_{0}=0\)). In this work, a link between our trigonometric sums \(I_{p}\) and \(J_{p}\) and the sum of several series related to harmonic numbers is uncovered. Indeed, the well-known fact that \(H_{n}=\ln n+\gamma+\frac{1}{2n}+\mathcal {O} (\frac{1}{n^{2}} )\) proves the convergence of the numerical series,
$$\begin{aligned}& C_{p} =\sum_{n=1}^{\infty}\biggl(H_{pn}-\ln(pn)-\gamma-\frac {1}{2pn} \biggr), \\& D_{p} =\sum_{n=1}^{\infty}(-1)^{n-1} \bigl(H_{pn}-\ln(pn)-\gamma \bigr), \\& E_{p} = \sum_{n=0}^{\infty}(-1)^{n}(H_{p(n+1)}-H_{pn}), \end{aligned}$$
for every positive integer p.

An interplay between the considered trigonometric sums and the sum of these series will allow us to prove sharp inequalities for \(I_{p}\) and \(J_{p}\), and to find the expression of the sums \(C_{p}\), \(D_{p}\), and \(E_{p}\) in terms of \(I_{p}\) and \(J_{p}\).

The main tool will be the following formulation ([6], Corollary 8.2) of the Euler-Maclaurin summation formula.

Theorem 1.1

Consider a positive integer m, and a function f that has a continuous \((2m-1)\) st derivative on \([0,1]\). If \(f^{(2m-1)}\) is decreasing, then
$$\int_{0}^{1}f(t) \,dt=\frac{f(1)+f(0)}{2} -\sum _{k=1}^{m-1}\frac{b_{2k}}{(2k)!} \delta f^{(2k-1)}+(-1)^{m+1}R_{m} $$
$$R_{m}= \int_{0}^{1/2}\frac{\vert B_{2m-1}(t)\vert }{(2m-1)!} \bigl(f^{(2m-1)}(t)-f^{(2m-1)}(1-t) \bigr) \,dt $$
$$0\leq R_{m}\leq\frac{6}{(2\pi)^{2m}} \bigl(f^{(2m-1)}(0)-f^{(2m-1)}(1) \bigr), $$
where the \(b_{2k}\) ’s are Bernoulli numbers, \(B_{2m-1}\) is the Bernoulli polynomial of degree \(2m-1\), and the notation δg for a function \(g:[0,1]\to\mathbb{C}\) means \(g(1)-g(0)\).

For more information on the Bernoulli polynomials, Bernoulli numbers, and the Euler-Maclaurin formula, the reader may refer to [610], and the references therein. This paper is organized as follows. In Section 2 we find the asymptotic expansions of \(C_{p}\) and \(D_{p}\) for large p. In Section 3, the inequalities the trigonometric sums \(I_{p}\) and \(J_{p}\) are proved.

2 Asymptotic expansions for the sum of certain series related to harmonic numbers

In the next lemma, the asymptotic expansion of \((H_{n})_{n\in\mathbb {N}}\) is presented. It can be found implicitly in Chapter 9 of [11]; we present a proof for convenience of the reader.

Lemma 2.1

For every positive integer n and nonnegative integer m, we have
$$H_{n}=\ln n+\gamma+\frac{1}{2n}-\sum _{k=1}^{m-1}\frac {b_{2k}}{2k}\cdot \frac{1}{n^{2k}}+(-1)^{m} R_{n,m}, $$
$$R_{n,m}= \int_{0}^{1/2}\bigl\vert B_{2m-1}(t)\bigr\vert \sum_{j=n}^{\infty}\biggl( \frac{1}{(j+t)^{2m}}-\frac{1}{(j+1-t)^{2m}} \biggr) \,dt. $$
Moreover, \(0< R_{n,m}<\frac{\vert b_{2m}\vert }{2m\cdot n^{2m}}\).


Note that for \(j\geq1\) we have
$$\frac{1}{j}-\ln \biggl(1+\frac{1}{j} \biggr)= \int_{0}^{1} \biggl(\frac{1}{j}- \frac{1}{j+t} \biggr) \,dt= \int_{0}^{1}\frac{t}{j(j+t)} \,dt. $$
Adding these equalities as j varies from 1 to \(n-1\) we conclude that
$$H_{n}-\ln n-\frac{1}{n}= \int_{0}^{1} \Biggl(\sum _{j=1}^{n-1}\frac {t}{j(j+t)} \Biggr) \,dt. $$
Thus, letting n tend to ∞, and using the monotone convergence theorem, we conclude
$$\gamma= \int_{0}^{1} \Biggl(\sum _{j=1}^{\infty}\frac{t}{j(j+t)} \Biggr) \,dt. $$
It follows that
$$ \gamma+\ln n-H_{n}+\frac{1}{n}= \int_{0}^{1} \Biggl(\sum _{j=n}^{\infty}\frac {t}{j(j+t)} \Biggr) \,dt. $$
So, let us consider the function \(f_{n}:[0,1]\longrightarrow\mathbb{R}\) defined by
$$f_{n}(t)=\sum_{j=n}^{\infty}\frac{t}{j(j+t)}. $$
Note that \(f_{n}(0)=0\), \(f_{n}(1)=1/n\), and that \(f_{n}\) is infinitely continuously derivable with
$$\frac{f_{n}^{(k)}(t)}{k!}=(-1)^{k+1}\sum_{j=n}^{\infty}\frac {1}{(j+t)^{k+1}}, \quad \text{for }k\geq1. $$
In particular,
$$\frac{f_{n}^{(2k-1)}(t)}{(2k-1)!}=\sum_{j=n}^{\infty}\frac {1}{(j+t)^{2k}},\quad \text{for }k\geq1. $$
So, \(f_{n}^{(2m-1)}\) is decreasing on the interval \([0,1]\), and
$$\frac{\delta f_{n}^{(2k-1)}}{(2k-1)!} =\sum_{j=n}^{\infty}\frac{1}{(j+1)^{2k}} -\sum_{j=n}^{\infty}\frac{1}{j^{2k}}=-\frac{1}{n^{2k}}. $$
Applying Theorem 1.1 to \(f_{n}\), and using the above data, we get
$$\gamma+\ln n-H_{n}+\frac{1}{2n}= \sum _{k=1}^{m-1}\frac{b_{2k}}{2k n^{2k}}+(-1)^{m+1}R_{n,m} $$
$$R_{n,m}= \int_{0}^{1/2}\bigl\vert B_{2m-1}(t)\bigr\vert \sum_{j=n}^{\infty}\biggl( \frac{1}{(j+t)^{2m}}-\frac{1}{(j+1-t)^{2m}} \biggr) \,dt $$
$$0< R_{n,m}< \frac{6\cdot(2m-1)!}{(2\pi)^{2m}n^{2m}}. $$
The important estimate is the lower bound, i.e. \(R_{n,m}>0\). In fact, considering separately the cases m odd and m even, we obtain, for every nonnegative integer \(m'\):
$$ H_{n} < \ln n+\gamma+\frac{1}{2n}-\sum _{k=1}^{2m'}\frac {b_{2k}}{2k}\cdot\frac{1}{n^{2k}} $$
$$ H_{n} >\ln n+\gamma+\frac{1}{2n}-\sum _{k=1}^{2m'+1}\frac {b_{2k}}{2k}\cdot\frac{1}{n^{2k}}. $$
This yields the following more precise estimate for the error term:
$$ 0< (-1)^{m} \Biggl(H_{n}-\ln n-\gamma-\frac{1}{2n}+ \sum_{k=1}^{m-1}\frac{b_{2k}}{2k\cdot n^{2k}} \Biggr)< \frac{ \vert b_{2m}\vert }{2m\cdot n^{2m}}, $$
which is valid for every positive integer m. □
Now, consider the two sequences \((c_{n})_{n\geq1}\) and \((d_{n})_{n\geq1}\) defined by
$$c_{n}=H_{n}-\ln n-\gamma-\frac{1}{2n} \quad \text{and} \quad d_{n}=H_{n}-\ln n-\gamma. $$
For a positive integer p, we know according to Lemma 2.1 that \(c_{pn}=\mathcal{O} (\frac{1}{n^{2}} )\), it follows that the series \(\sum_{n=1}^{\infty}c_{pn}\) is convergent. Similarly, since \(d_{pn}=c_{pn}+\frac{1}{2pn}\) and the series \(\sum_{n=1}^{\infty}(-1)^{n-1}/n\) is convergent, we conclude that \(\sum_{n=1}^{\infty}(-1)^{n-1} d_{pn}\) is also convergent. In the following we aim to find asymptotic expansions (for large p) of the following sums:
$$\begin{aligned}& C_{p} =\sum_{n=1}^{\infty}c_{pn}=\sum_{n=1}^{\infty}\biggl(H_{pn}-\ln (pn)-\gamma-\frac{1}{2pn} \biggr) , \end{aligned}$$
$$\begin{aligned}& D_{p} =\sum_{n=1}^{\infty}(-1)^{n-1}d_{pn} =\sum_{n=1}^{\infty}(-1)^{n-1} \bigl(H_{pn}-\ln(pn)-\gamma \bigr) , \end{aligned}$$
$$\begin{aligned}& E_{p} =\sum_{n=0}^{\infty}(-1)^{n}(H_{p(n+1)}-H_{pn}). \end{aligned}$$

Theorem 2.2

If p and m are positive integers and \(C_{p}\) is defined by (2.1), then
$$C_{p}=-\sum_{k=1}^{m-1} \frac{b_{2k}\zeta(2k)}{2k\cdot p^{2k}} +(-1)^{m}\frac{\zeta(2m)}{2m\cdot p^{2m}}\varepsilon_{p,m}, \quad \textit{with } 0< \varepsilon_{p,m}< \vert b_{2m}\vert , $$
where ζ is the well-known Riemann zeta function.


Indeed, we conclude from Lemma 2.1 that
$$H_{pn}-\ln(pn)-\gamma-\frac{1}{2pn}=-\sum _{k=1}^{m-1}\frac {b_{2k}}{2k\cdot p^{2k}}\cdot\frac{1}{n^{2k}} + \frac{(-1)^{m}}{2m\cdot p^{2m}}\cdot\frac{r_{pn,m}}{n^{2m}}, $$
with \(0< r_{pn,m}\leq \vert b_{2m}\vert \). It follows that
$$C_{p}=-\sum_{k=1}^{m-1} \frac{b_{2k}}{2k p^{2k}}\cdot \Biggl(\sum_{n=1}^{\infty}\frac{1}{n^{2k}} \Biggr)+\frac{(-1)^{m}}{2m\cdot p^{2m}}\cdot\tilde{r}_{p,m}, $$
where \(\tilde{r}_{p,m}=\sum_{n=1}^{\infty}\frac{r_{pn,m}}{n^{2m}}\).
$$0< \tilde{r}_{p,m}=\sum_{n=1}^{\infty}\frac{r_{pn,m}}{n^{2m}}< \vert b_{2m}\vert \sum _{n=1}^{\infty}\frac{1}{n^{2m}}=\vert b_{2m}\vert \zeta(2m) $$
and the desired conclusion follows with \(\varepsilon_{p,m}=\tilde {r}_{p,m}/\zeta(2m)\). □
For example, taking \(m=3\), we obtain
$$\sum_{n=1}^{\infty}\biggl(H_{pn}- \ln(pn)-\gamma-\frac{1}{2pn} \biggr) =-\frac{\pi^{2}}{72p^{2}}+\frac{\pi^{4}}{10\text{,}800p^{4}}+ \mathcal{O} \biggl(\frac{1}{p^{6}} \biggr). $$

In the next proposition we have the analogous result corresponding to \(D_{p}\).

Theorem 2.3

If p and m are positive integers and \(D_{p}\) is defined by (2.2), then
$$D_{p}=\frac{\ln2}{2p} -\sum_{k=1}^{m-1} \frac{b_{2k}\eta(2k)}{2k \cdot p^{2k}} +(-1)^{m}\frac{\eta(2m)}{2m\cdot p^{2m}}\varepsilon'_{p,m}, \quad \textit{with } 0< \varepsilon'_{p,m}< \vert b_{2m}\vert , $$
where η is the Dirichlet eta function [12].


Indeed, let us define \(a_{n,m}\) by the formula
$$a_{n,m}=H_{n}-\ln n-\gamma-\frac{1}{2n}+\sum _{k=1}^{m-1}\frac {b_{2k}}{2k\cdot n^{2k}} $$
with empty sum equal to 0. We have shown in the proof of Lemma 2.1 that
$$(-1)^{m}a_{n,m}= \int_{0}^{1/2}\bigl\vert B_{2m-1}(t)\bigr\vert g_{n,m}(t) \,dt, $$
where \(g_{n,m}\) is the positive decreasing function on \([0,1/2]\) defined by
$$g_{n,m}(t)=\sum_{j=n}^{\infty}\biggl( \frac{1}{(j+t)^{2m}}-\frac {1}{(j+1-t)^{2m}} \biggr). $$
Now, for every \(t\in[0,1/2]\) the sequence \((g_{np,m}(t))_{n\geq1}\) is positive and decreasing to 0. So, using the alternating series criterion [13], Theorem 7.8 and Corollary 7.9, we see that, for every \(N\geq1\) and \(t\in[0,1/2]\),
$$\Biggl\vert \sum_{n=N}^{\infty}(-1)^{n-1}g_{np,m}(t) \Biggr\vert \leq g_{Np,m}(t)\leq g_{Np,m}(0)=\frac{1}{(Np)^{2m}}. $$
This proves the uniform convergence on \([0,1/2]\) of the series
$$G_{p,m}(t)=\sum_{n=1}^{\infty}(-1)^{n-1}g_{np,m}(t). $$
$$(-1)^{m}\sum_{n=1}^{\infty}(-1)^{n-1}a_{pn,m}= \int_{0}^{1/2}\bigl\vert B_{2m-1}(t)\bigr\vert G_{p,m}(t) \,dt. $$
Now using the properties of an alternating series, we see that for \(t\in(0,1/2)\) we have
$$0< G_{p,m}(t)< g_{p,m}(t)< g_{p,m}(0)=\sum _{j=p}^{\infty}\biggl(\frac {1}{j^{2m}}- \frac{1}{(j+1)^{2m}} \biggr)=\frac{1}{p^{2m}}. $$
$$\sum_{n=1}^{\infty}(-1)^{n-1}a_{pn,m}= \frac{(-1)^{m}}{p^{2m}}\rho_{p,m} $$
with \(0<\rho_{p,m}<\int_{0}^{1/2}\vert B_{2m-1}(t)\vert \,dt\).
On the other hand we have
$$\begin{aligned} \sum_{n=1}^{\infty}(-1)^{n-1}a_{pn,m}&=D_{p} -\frac{1}{2p} \sum_{n=1}^{\infty}\frac{(-1)^{n-1}}{n}+\sum_{k=1}^{m-1} \frac{b_{2k}}{2k p^{2k}}\sum_{n=1}^{\infty}\frac {(-1)^{n-1}}{n^{2k}} \\ &=D_{p}-\frac{\ln2}{2p} +\sum_{k=1}^{m-1} \frac{b_{2k}\eta (2k)}{2k\cdot p^{2k}}. \end{aligned}$$
$$D_{p}=\frac{\ln2}{2p}-\sum_{k=1}^{m-1} \frac{b_{2k}\eta(2k)}{2k\cdot p^{2k}} +\frac{(-1)^{m}}{p^{2m}}\rho_{p,m} $$
Now, the important estimate for \(\rho_{p,m}\) is the lower bound, i.e. \(\rho_{p,m}>0\). In fact, considering separately the cases m odd and m even, we obtain, for every nonnegative integer \(m'\):
$$ D_{p} < \frac{\ln2}{2p}-\sum_{k=1}^{2m'} \frac{b_{2k}\eta(2k)}{2k\cdot p^{2k}} $$
$$ D_{p} >\frac{\ln2}{2p}-\sum_{k=1}^{2m'+1} \frac{b_{2k}\eta (2k)}{2k\cdot p^{2k}}. $$
This yields the following more precise estimate for the error term:
$$0< (-1)^{m} \Biggl(D_{p}-\frac{\ln2}{2p}+\sum _{k=1}^{m-1}\frac {b_{2k}\eta(2k)}{2k p^{2k}} \Biggr)< \frac{\vert b_{2m}\vert \eta(2m)}{2m\cdot p^{2m}}, $$
and the desired conclusion follows. □

The case of \(E_{p}\), which is the sum of another alternating series (2.3), is discussed in the next lemma where it is shown that \(E_{p}\) can easily be expressed in terms of \(D_{p}\).

Lemma 2.4

For a positive integer p, we have
$$ E_{p} =\ln p+\gamma-\ln \biggl(\frac{\pi}{2} \biggr)+2D_{p}, $$
where \(D_{p}\) is the sum defined by (2.2).


$$\begin{aligned} 2D_{p}&=d_{p}+\sum_{n=2}^{\infty}(-1)^{n-1}d_{pn}+ \sum_{n=1}^{\infty}(-1)^{n-1}d_{pn} \\ &=d_{p}+\sum_{n=1}^{\infty}(-1)^{n}d_{p(n+1)}+ \sum_{n=1}^{\infty}(-1)^{n-1}d_{pn} \\ &=d_{p}+\sum_{n=1}^{\infty}(-1)^{n-1}(d_{pn}-d_{p(n+1)}) \\ &=d_{p}+\sum_{n=1}^{\infty}(-1)^{n}(H_{p(n+1)}-H_{pn})+ \sum_{n=1}^{\infty}(-1)^{n-1}\ln \biggl(\frac{n+1}{n} \biggr) \\ &=-\ln p-\gamma+\sum_{n=0}^{\infty}(-1)^{n}(H_{p(n+1)}-H_{pn})+ \sum_{n=1}^{\infty}(-1)^{n-1}\ln \biggl( \frac{n+1}{n} \biggr). \end{aligned}$$
Using the Wallis formula for π [8], Formula 0.262, we have
$$\begin{aligned} \sum_{n=1}^{\infty}(-1)^{n-1}\ln \biggl(\frac{n+1}{n} \biggr)&= \sum_{n=1}^{\infty}\ln \biggl(\frac{2n}{2n-1}\cdot\frac {2n}{2n+1} \biggr) \\ &=-\ln\prod_{n=1}^{\infty}\biggl(1- \frac{1}{4n^{2}} \biggr)=\ln \biggl(\frac{\pi}{2} \biggr) \end{aligned}$$
and the desired formula follows. □

3 Inequalities for trigonometric sums

As we mentioned in the introduction, we are interested in the sum of cosecants \(I_{p}\) defined by (1.1) and the sum of cotangents \(J_{p}\) defined by (1.2). Many other trigonometric sums can be expressed in terms of \(I_{p}\) and \(J_{p}\). The next lemma lists some of these identities.

Lemma 3.1

For a positive integer p let
$$\begin{aligned}& K_{p} =\sum_{k=1}^{p-1}\tan \biggl(\frac{k\pi}{2p} \biggr),\qquad \widetilde{K}_{p} =\sum _{k=1}^{p-1}\cot \biggl(\frac{k\pi }{2p} \biggr), \\& L_{p} =\sum_{k=1}^{p-1} \frac{k}{\sin(k\pi/p)},\qquad M_{p} =\sum_{k=1}^{p}(2k-1) \cot \biggl(\frac{(2k-1)\pi }{2p} \biggr). \end{aligned}$$
  1. (i)


  2. (ii)

    \(L_{p}=(p/2) I_{p}\).

  3. (iii)

    \(M_{p}=(p/2) J_{2p}-2J_{p}=-p I_{p}\).



First, note that the change of summation variable \(k\leftarrow p-k\) proves that \(K_{p}=\widetilde{K}_{p}\). So, using the trigonometric identity \(\tan\theta+\cot\theta=2\csc (2\theta)\) we obtain (i) as follows:
$$ 2K_{p}=K_{p}+\widetilde{K}_{p}=\sum _{k=1}^{p-1} \biggl(\tan \biggl(\frac {k\pi}{2p} \biggr)+\cot \biggl(\frac{k\pi}{2p} \biggr) \biggr) =2\sum _{k=1}^{p-1}\csc \biggl(\frac{k\pi}{p} \biggr)=2I_{p}. $$
Similarly, (ii) follows from the change of summation variable \(k\leftarrow p-k\) in \(L_{p}\):
$$L_{p}=\sum_{k=1}^{p-1} \frac{p-k}{\sin(k\pi/p)}=pI_{p}-L_{p}. $$
$$\begin{aligned} M_{p}&=\sum_{\substack{1\leq k< 2p \\ k \text{ odd} }} k\cot \biggl( \frac{k\pi}{2p} \biggr)=\sum_{k=1}^{2p-1} k \cot \biggl(\frac{k\pi}{2p} \biggr)- \sum_{\substack{1\leq k< 2p \\ k \text{ even} }} k \cot \biggl(\frac{k\pi}{2p} \biggr) \\ &=\sum_{k=1}^{2p-1} k\cot \biggl( \frac{k\pi}{2p} \biggr)-2 \sum_{k=1}^{p-1} k \cot \biggl(\frac{k\pi}{p} \biggr)=J_{2p}-2J_{p}. \end{aligned}$$
$$\begin{aligned} J_{2p}&=\sum_{k=1}^{p-1} k\cot \biggl(\frac{k\pi}{2p} \biggr)+\sum_{k=p+1}^{2p-1} k\cot \biggl(\frac{k\pi}{2p} \biggr) \\ &=\sum_{k=1}^{p-1} k\cot \biggl( \frac{k\pi}{2p} \biggr)-\sum_{k=1}^{p-1} (2p-k)\cot \biggl(\frac{k\pi}{2p} \biggr) \\ &=2\sum_{k=1}^{p-1} k\cot \biggl( \frac{k\pi}{2p} \biggr)-2p\widetilde{K}_{p}. \end{aligned}$$
Thus, using (i) and the trigonometric identity \(\cot(\theta/2)-\cot \theta=\csc\theta\) we obtain
$$\begin{aligned} M_{p}&=J_{2p}-2J_{p}=2\sum _{k=1}^{p-1} k \biggl(\cot \biggl(\frac{k\pi }{2p} \biggr)-\cot \biggl(\frac{k\pi}{p} \biggr) \biggr) -2pI_{p} \\ &=2\sum_{k=1}^{p-1}k\csc \biggl( \frac{k\pi}{p} \biggr)-2pI_{p}=2L_{p}-2pI_{p}=-pI_{p}. \end{aligned}$$
This concludes the proof of (iii). □

Proposition 3.2

For \(p\geq2\), let \(I_{p}\) be the sum of cosecants defined by the (1.1). Then
$$\begin{aligned} I_{p}&=-\frac{2\ln2}{\pi}+\frac{2p}{\pi}E_{p} \\ &=-\frac{2\ln2}{\pi}+\frac{2p}{\pi} \bigl(\ln p+\gamma-\ln(\pi /2) \bigr)+ \frac{4p}{\pi}D_{p}, \end{aligned}$$
where \(D_{p}\) and \(E_{p}\) are defined by Eqs. (2.2) and (2.3), respectively.


Indeed, our starting point will be the ‘simple fraction’ expansion ([14], Chapter 5, Section 2) of the cosecant function:
$$\frac{\pi}{\sin(\pi\alpha)}=\sum_{n\in\mathbb{Z}}\frac {(-1)^{n}}{\alpha-n}= \frac{1}{\alpha}+\sum_{n=1}^{\infty}(-1)^{n} \biggl(\frac{1}{\alpha-n}+ \frac{1}{\alpha+n} \biggr), $$
which is valid for \(\alpha\in\mathbb{C}\setminus\mathbb{Z}\). Using this formula with \(\alpha=k/p\) for \(k=1,2,\ldots,p-1\) and adding, we conclude that
$$\begin{aligned} \frac{\pi}{p} I_{p}&=\sum_{k=1}^{p-1} \frac{1}{k}+\sum_{n=1}^{\infty}(-1)^{n}\sum_{k=1}^{p-1} \biggl( \frac{1}{k-np}+ \frac{1}{k+n p} \biggr) \\ &=\sum_{k=1}^{p-1}\frac{1}{k}+ \sum _{n=1}^{\infty}(-1)^{n} \Biggl(-\sum _{j=p(n-1)+1}^{pn-1}\frac{1}{j}+ \sum _{j=pn+1}^{p(n+1)-1}\frac{1}{j} \Biggr), \end{aligned}$$
and this result can be expressed in terms of the harmonic numbers as follows:
$$\begin{aligned} \frac{\pi}{p} I_{p}&=H_{p-1}+ \sum _{n=1}^{\infty}(-1)^{n} (- H_{pn-1}+H_{p(n-1)}+H_{p(n+1)-1}-H_{pn} ) \\ &=H_{p-1}+ \sum_{n=1}^{\infty}(-1)^{n} (H_{p(n+1)}-2H_{pn}+H_{p(n-1)} ) +\frac{1}{p}\sum _{n=1}^{\infty}(-1)^{n} \biggl( \frac{1}{n}-\frac{1}{n+1} \biggr) \\ &=H_{p-1}+\sum_{n=1}^{\infty}(-1)^{n} (H_{p(n+1)}-2H_{pn}+H_{p(n-1)} ) +\frac{1}{p} \Biggl(\sum_{n=1}^{\infty}\frac{(-1)^{n}}{n}+\sum _{n=2}^{\infty}\frac{(-1)^{n}}{n} \Biggr) \\ &=H_{p}+\sum_{n=1}^{\infty}(-1)^{n} (H_{p(n+1)}-2H_{pn}+H_{p(n-1)} ) -\frac{2}{p}\sum _{n=1}^{\infty}(-1)^{n-1} \frac{1}{n} \\ &=H_{p}-\frac{2\ln2}{p}+\sum_{n=1}^{\infty}(-1)^{n} (H_{p(n+1)}-2H_{pn}+H_{p(n-1)} ). \end{aligned}$$
$$\begin{aligned} \frac{\pi}{p} I_{p}+\frac{2\ln2}{p}&= H_{p}+\sum _{n=1}^{\infty}(-1)^{n} (H_{p(n+1)}-H_{pn} ) +\sum_{n=1}^{\infty}(-1)^{n} (H_{p(n-1)}-H_{pn} ) \\ &=\sum_{n=0}^{\infty}(-1)^{n} (H_{p(n+1)}-H_{pn} ) +\sum_{n=1}^{\infty}(-1)^{n} (H_{p(n-1)}-H_{pn} ) \\ &=E_{p}+E_{p}=2E_{p}, \end{aligned}$$
and the desired formula follows according to Lemma 2.4. □

Combining Proposition 3.2 and Theorem 2.3, we obtain the following.

Proposition 3.3

For \(p\geq2\) and \(m\geq1\), we have
$$\pi I_{p}= 2p\ln p+2\bigl(\gamma-\ln( \pi/2)\bigr)p -\sum _{k=1}^{m-1} \frac {2b_{2k}\eta(2k)}{ k \cdot p^{2k-1}} +(-1)^{m} \frac{2\eta(2m)}{ m\cdot p^{2m-1}}\varepsilon'_{p,m} $$
with \(0<\varepsilon'_{p,m}<\vert b_{2m}\vert \).
Using the well-known result ([8], [12], Formula 9.542):
$$\eta(2k)=\bigl(1-2^{1-2k}\bigr)\zeta(2k)=\frac{(2^{2k-1}-1)\pi ^{2k}(-1)^{k-1}b_{2k}}{(2k)!}, $$
and considering separately the cases m even and m odd we obtain the following result.

Theorem 3.4

For every positive integer p and every nonnegative integer n, the sum of cosecants \(I_{p}\) defined by (1.1) satisfies the following inequalities:
$$\begin{aligned}& I_{p} < \frac{2p}{\pi}\bigl(\ln p+\gamma-\ln(\pi/2)\bigr)+ \sum _{k=1}^{2n}(-1)^{k} \frac{(2^{2k}-2)b_{2k}^{2}}{k\cdot(2k)!} \biggl(\frac{\pi}{p} \biggr)^{2k-1}, \\& I_{p} >\frac{2p}{\pi}\bigl(\ln p+\gamma-\ln(\pi/2)\bigr)+ \sum _{k=1}^{2n+1}(-1)^{k} \frac{(2^{2k}-2)b_{2k}^{2}}{k\cdot(2k)!} \biggl(\frac{\pi}{p} \biggr)^{2k-1}. \end{aligned}$$
As an example, for \(n=0\) we obtain the following inequality, valid for every \(p\geq1\):
$$\frac{2p}{\pi}\bigl(\ln p+\gamma-\ln(\pi/2)\bigr)-\frac{\pi}{36p} < I_{p}< \frac{2p}{\pi}\bigl(\ln p+\gamma-\ln(\pi/2)\bigr). $$
This answers positively the open problem proposed in Section 7.4 of [1].

Remark 3.5

The asymptotic expansion of \(I_{p}\) was proposed as an exercise in [9], Exercise 13, p.460, and it was attributed to Waldvogel, but the result there is less precise than Theorem 3.4 because here we have inequalities valid in the whole range of p.

Now we turn our attention to the other trigonometric sum, \(J_{p}\). The first step is to find an analogous result to Proposition 3.2 for the trigonometric sum \(J_{p}\), is the next lemma, where an asymptotic expansion for \(J_{p}\) is proved but it has a harmonic number as an undesired term; later it will be removed.

Lemma 3.6

For every positive integers p, there is a real number \(\theta_{p}\in(0,1)\) such that
$$\pi J_{p}=-p^{2}H_{p}+\ln(2\pi) p^{2}- \frac{p}{2}-\theta_{p}. $$


Indeed, let φ be the function defined by
$$\varphi(x)=\pi x\cot(\pi x)+\frac{1}{1-x}. $$
According to the partial fraction expansion formula for the cotangent function ([14], Chapter 5, Section 2) we know that
$$\varphi(x)=2+\frac{x}{x+1}+\sum_{n=2}^{\infty}\biggl(\frac {x}{x-n}+\frac {x}{x+n} \biggr). $$
Thus, φ is defined and analytic on the interval \((-1,2)\). Let us show that φ is concave on this interval. Indeed, it is straightforward to check that, for \(-1< x<2\), we have
$$ \varphi^{\prime\prime}(x) =-\frac{2}{(1+x)^{3}}-2 \sum _{n=2}^{\infty}\biggl(\frac{n}{(n-x)^{3}}+ \frac{n}{(n+x)^{3}} \biggr)< 0. $$
So, we can use Theorem 1.1 with \(m=1\) applied to the function \(x\mapsto\varphi (\frac{x+k}{p} )\) for \(1\le k< p\) to get
$$0< p \int_{k/p}^{(k+1)/p}\varphi(x)\, dx-\frac{1}{2} \biggl(\varphi \biggl(\frac {k+1}{p} \biggr)+\varphi \biggl( \frac{k}{p} \biggr) \biggr)\le\frac {3}{2p\pi^{2}} \biggl( \varphi' \biggl(\frac{k}{p} \biggr)-\varphi' \biggl(\frac {k+1}{p} \biggr) \biggr). $$
Adding these inequalities and noting that \(\varphi(0)=2\), \(\varphi'(0)=1\), \(\varphi(1)=1\), and \(\varphi'(1)=-\pi^{2}/3\), we get
$$0< p \int_{0}^{1}\varphi(x)\, dx-\frac{\pi}{p}J_{p}-pH_{p}- \frac{1}{2}\le \frac {3+\pi^{2}}{2\pi^{2}p}< \frac{1}{p}. $$
Also, for \(x\in[0,1)\), we have
$$\int_{0}^{x}\varphi(t) \,dt=-\ln(1-x)+x\ln\sin(\pi x)- \int_{0}^{x} \ln \sin (\pi t) \,dt, $$
and, letting x tend to 1 we obtain
$$\int_{0}^{1}\varphi(t) \,dt=\ln(\pi)- \int_{0}^{1}\ln\sin(\pi t) \,dt=\ln (2\pi), $$
where we used the fact \(\int_{0}^{1}\ln\sin(\pi t) \,dt=-\ln2\) (see [8], 4.224 Formula 3). So, we have proved that
$$0< p\ln(2\pi)-\frac{\pi}{p}J_{p}-pH_{p}- \frac{1}{2}< \frac{1}{p}, $$
which is equivalent to the desired conclusion. □

The next proposition gives an analogous result to Proposition 3.2 for the trigonometric sum \(J_{p}\).

Proposition 3.7

For a positive integer p, let \(J_{p}\) be the sum of cotangents defined by (1.2). Then
$$\pi J_{p}= -p^{2}\ln p+\bigl(\ln(2\pi)-\gamma \bigr)p^{2} -p+2p^{2}C_{p}, $$
where \(C_{p}\) is given by (2.1).


Recall that \(c_{n}=H_{n}-\ln n-\gamma-\frac{1}{2n}\) satisfies \(c_{n}=\mathcal{O}(1/n^{2})\). Thus, the two series
$$C_{p}=\sum_{n=1}^{\infty}c_{pn} \quad \text{and} \quad \widetilde {C}_{p}=\sum _{n=1}^{\infty}(-1)^{n-1} c_{pn} $$
are convergent. Further, we note that \(\widetilde{C}_{p}=D_{p}-\frac{\ln 2}{2p}\) where \(D_{p}\) is defined by (2.2).
According to Proposition 3.2 we have
$$ \widetilde{C}_{p} =\frac{\ln(\pi/2)-\gamma-\ln p}{2}+ \frac{\pi}{4p}I_{p}. $$
Now, noting that
$$\begin{aligned}& C_{p} =\sum_{\substack{n\geq1\\ n \text{ odd}}}c_{pn} +\sum _{\substack{n\geq1\\ n \text{ even}}}c_{pn} =\sum _{\substack{n\geq1\\ n \text{ odd}}}c_{pn}+\sum_{n=1}^{\infty}c_{2pn}, \\& \widetilde{C}_{p} =\sum_{\substack{n\geq1\\ n \text{ odd}}}c_{pn} -\sum_{\substack{n\geq1\\ n \text{ even}}}c_{pn} =\sum _{\substack{n\geq1\\ n \text{ odd}}}c_{pn}-\sum_{n=1}^{\infty}c_{2pn} \end{aligned}$$
we conclude that \(C_{p}-\widetilde{C}_{p}=2C_{2p}\), or equivalently
$$ C_{p}-2C_{2p}=\widetilde{C}_{p} . $$
On the other hand, for a positive integer p let us define \(F_{p}\) by
$$ F_{p}=\frac{\ln p+\gamma-\ln(2\pi)}{2}+\frac{1}{2p}+ \frac{\pi}{2p^{2}}J_{p}. $$
It is easy to check, using Lemma 3.1(iii), that
$$\begin{aligned} F_{p}-2F_{2p}&=\frac{\ln(\pi/2)-\ln p-\gamma}{2} - \frac{\pi }{4p^{2}}(J_{2p}-2J_{p}) \\ &=\frac{\ln(\pi/2)-\ln p-\gamma}{2} +\frac{\pi}{4p}I_{p}. \end{aligned}$$
We conclude from (3.2) and (3.4) that \(C_{p}-2C_{2p}=F_{p}-2F_{2p}\), or equivalently
$$C_{p}-F_{p}=2(C_{2p}-F_{2p}). $$
$$ \forall m\geq1, \quad C_{p}-F_{p}=2^{m}(C_{2^{m}p}-F_{2^{m}p}) . $$
Now, using Lemma 2.1 to replace \(H_{p}\) in Lemma 3.6, we obtain
$$\begin{aligned} \frac{\pi}{p^{2}}J_{p}&=\ln(2\pi)-H_{p}- \frac{1}{2p}+\mathcal{O} \biggl(\frac{1}{p^{2}} \biggr) \\ &=\ln(2\pi)-\ln p-\gamma-\frac{1}{p} +\mathcal{O} \biggl( \frac {1}{p^{2}} \biggr). \end{aligned}$$
Thus \(F_{p}=\mathcal{O} (\frac{1}{p^{2}} )\). Similarly, from the fact that \(c_{n}=\mathcal{O} (\frac{1}{n^{2}} )\) we conclude also that \(C_{p}=\mathcal{O} (\frac{1}{p^{2}} )\). Consequently, there exists a constant κ such that, for large values of p, we have \(\vert C_{p}-F_{p}\vert \leq\kappa/p^{2}\). So, from (3.5), we see that for large values of m we have
$$\vert C_{p}-F_{p}\vert \leq\frac{\kappa}{2^{m}p^{2}} $$
and letting m tend to +∞ we obtain \(C_{p}=F_{p}\), which is equivalent to the announced result. □

Combining Proposition 3.7 and Theorem 2.2, we obtain the following.

Proposition 3.8

For \(p\geq2\) and \(m\geq1\), we have
$$\pi J_{p}= -p^{2}\ln p+\bigl(\ln(2\pi)-\gamma \bigr)p^{2} -p -\sum_{k=1}^{m-1} \frac {b_{2k}\zeta(2k)}{ k\cdot p^{2k-2}} +(-1)^{m}\frac{\zeta(2m)}{m\cdot p^{2m-2}}\varepsilon_{p,m}, $$
with \(0<\varepsilon_{p,m}<\vert b_{2m}\vert \), where ζ is the well-known Riemann zeta function.

Using the values of the \(\zeta(2k)\)’s [8], Formula 9.542, and considering separately the cases m even and m odd, we obtain the next result.

Theorem 3.9

For every positive integer p and every nonnegative integer n, the sum of cotangents \(J_{p}\) defined by (1.2) satisfies the following inequalities:
$$\begin{aligned}& J_{p} < \frac{1}{\pi} \bigl(-p^{2}\ln p+\bigl(\ln(2 \pi)-\gamma\bigr)p^{2} -p \bigr) +2\pi\sum_{k=1}^{2n}(-1)^{k} \frac{b_{2k}^{2}}{ k\cdot(2k)!} \biggl(\frac{2\pi}{ p} \biggr)^{2k-2}, \\& J_{p} > \frac{1}{\pi} \bigl(-p^{2}\ln p+\bigl(\ln(2 \pi)-\gamma\bigr)p^{2} -p \bigr) +2\pi\sum_{k=1}^{2n+1}(-1)^{k} \frac{b_{2k}^{2}}{ k\cdot(2k)!} \biggl(\frac{2\pi}{ p} \biggr)^{2k-2}. \end{aligned}$$
As an example, for \(n=0\) we obtain the following double inequality, which is valid for \(p\geq1\):
$$0 < \frac{1}{\pi} \bigl(-p^{2}\ln p+\bigl(\ln(2\pi)-\gamma \bigr)p^{2} -p \bigr)-J_{p}< \frac{\pi}{36}. $$

Remark 3.10

Note that we have proved the following results. For a positive integer p:
$$\begin{aligned}& \sum_{n=1}^{\infty}(-1)^{n-1} \bigl(H_{pn}-\ln(pn)-\gamma\bigr) =\frac{\ln(\pi /2)-\gamma-\ln p}{2}+ \frac{\ln2}{2p} +\frac{\pi}{4p}\sum_{k=1}^{p-1} \csc \biggl(\frac{k \pi}{p} \biggr), \\& \sum_{n=0}^{\infty}(-1)^{n}(H_{p(n+1)}-H_{pn}) =\frac{\ln2}{p} +\frac{\pi}{2p}\sum_{k=1}^{p-1} \csc \biggl(\frac{k \pi}{p} \biggr), \\& \sum_{n=1}^{\infty}\biggl(H_{pn}- \ln(pn)-\gamma-\frac{1}{2pn} \biggr) = \frac{\ln p+\gamma-\ln(2\pi)}{2}+ \frac{1}{2p}+\frac{\pi }{2p^{2}}\sum_{k=1}^{p-1}k \cot \biggl(\frac{k \pi}{p} \biggr). \end{aligned}$$
These results are to be compared with those in [15]; see also [16].



The author would like to thank the anonymous referees for reading this article carefully and providing valuable suggestions.

Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (, which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.

Authors’ Affiliations

Department of Mathematics, Higher Institute for Applied Sciences and Technology, P.O. Box 31983, Damascus, Syria


  1. Chen, H: Excursions in Classical Analysis. Math. Assoc. of America, Washington (2010) Google Scholar
  2. Klamkin, MS: Problems in Applied Mathematics: Selections from SIAM Review. SIAM, Philadelphia (1990). doi:10.1137/1.9781611971729 View ArticleMATHGoogle Scholar
  3. Chen, H: On some trigonometric power sums. Int. J. Math. Math. Sci. 30, 185-191 (2002) MathSciNetView ArticleMATHGoogle Scholar
  4. Grabner, PJ, Prodinger, H: Secant and cosecant sums and Bernoulli-Nörlund polynomials. Quaest. Math. 30, 159-165 (2007) MathSciNetView ArticleMATHGoogle Scholar
  5. Kouba, O, Andreescu, T: Mathematical Reflections, Two More Years (2010-2011), Solution to Problem U207. XYZ Press, San Jose (2014) Google Scholar
  6. Kouba, O: Lecture notes, Bernoulli polynomials and applications (2013). 1309.7560v2
  7. Abramowitz, M, Stegan, IA: Handbook of Mathematical Functions: With Formulas, Graphs, and Mathematical Tables. Dover Books on Mathematics. Dover, New York (1972) Google Scholar
  8. Gradshteyn, I, Ryzhik, I: Tables of Integrals, Series and Products, 7th edn. Academic Press, San Diego (2007) MATHGoogle Scholar
  9. Henrici, P: Applied and Computational Complex Analysis, vol. 2. Wiley, New York (1977) MATHGoogle Scholar
  10. Olver, FWJ: Asymptotics and Special Functions. Academic Press, New York (1974) MATHGoogle Scholar
  11. Graham, RL, Knuth, DE, Patashnik, O: Concrete Mathematics: A Foundation for Computer Science, 2nd edn. Addison-Wesley, Reading (1994) MATHGoogle Scholar
  12. Weisstein, EW: Dirichlet eta function. From MathWorld - A Wolfram web resource.
  13. Amann, H, Escher, J: Analysis I. Birkhäuser, Basel (2005) View ArticleMATHGoogle Scholar
  14. Ahlfors, LV: Complex Analysis. McGraw-Hill, New York (1979) MATHGoogle Scholar
  15. Kouba, O: The sum of certain series related to harmonic numbers. Octogon Math. Mag. 19(1), 3-18 (2011). Google Scholar
  16. Kouba, O: Proposed Problem 11499. Am. Math. Mon. 117(7), 371 (2010) Google Scholar


© Kouba 2016