Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do I calculate $$\sum_{k=1}^\infty \frac{k\sin(kx)}{1+k^2}$$ for $0<x<2\pi$? Wolfram alpha can't calculate it, but the sum surely converges.

share|cite|improve this question
First thing to see is that S(x) is the derivative of an other sum, $T(x)= \sum_{k=1}^{\infty} \frac{-\cos(kx)}{1+k^2}$ – Matt B. Jul 14 '14 at 8:44
Wolfram Functions says that $\displaystyle\sum_{k=1}^{\infty}\dfrac{k\sin{(kx)}}{a^2+k^2}=\dfrac{\pi\sinh {(a(\pi-x))}}{2\sinh {(a\pi)}}$. But how to prove it? – Pkwssis Jul 14 '14 at 9:00
I think you can translate this sum in to a integral and then try to use the contour integral methods to derive this formula. – Nil Mal Jul 14 '14 at 9:11
up vote 12 down vote accepted

Using known Fourier series expansion $$\sinh(at)=\frac{2\sinh \pi a}{\pi}\sum_{n=1}^\infty\frac{(-1)^{n+1}n\sin nt}{n^2+a^2},\quad t\in(-\pi,\pi)$$ (which can be easily proven simply by calculating the Fourier coefficients for this function) and noting that $(-1)^{n+1}\sin nt=\sin((\pi-t)n)$ we get the series in question taking $a=1$ and $t=\pi-x$: $$\sum_{n=1}^\infty\frac{n\sin nx}{n^2+1}=\frac{\pi\sinh(\pi-x)}{2\sinh \pi},\quad x\in(0,2\pi).$$

share|cite|improve this answer
Very neat solution! – mike Jul 14 '14 at 9:22

We can write the sum as a linear combination of the LerchPhi function

$$ \Phi(z,s,a) = \sum_{k=0}^{\infty} \frac{z^k}{(k+a)^s}. $$

First, we write the sum as (using partial fraction)

$$ S = \sum_{k=0}^{\infty}\frac{e^{ikx}}{4i(k-i)} -\sum_{k=0}^{\infty} \frac{e^{-ikx}}{4i(k-i)}+ \sum_{k=0}^{\infty}\frac{e^{ikx}}{4i(k+i)}-\sum_{k=0}^{\infty}\frac{e^{-ikx}}{4i(k+i)} $$

$$\implies S =\frac{1}{4i}( \Phi(e^{ix},1,-i)- \Phi(e^{-ix},1,-i)+ \Phi(e^{ix},1,i)- \Phi(e^{-ix},1,i) ).$$

Note: this is a general technique which can handle more general series than the one in considdration.

share|cite|improve this answer
I don't see how the original sum can make a real argument into a complex value. For example with $x=1$ your formula is equal to $-0.285478-0.2751 i$ – Kristoffer Ryhl Jul 14 '14 at 9:04
@Mhenni Benghorbal. I guess that a $\Sigma$ is missing for the fourth term – Claude Leibovici Jul 14 '14 at 9:07
@Darksonn: Make sure of your calculation. With $x=1$ the answer is $.5709561705$. – Mhenni Benghorbal Jul 14 '14 at 9:07
@Mhenni Benghorbal. Your solution is very elegant (may I say, as usual ?) ! Thanks for this good stuff ! Cheers :) – Claude Leibovici Jul 14 '14 at 9:10
Nice solution! i din't know much about the Lerch zeta function though.. – Pkwssis Jul 14 '14 at 9:21

You may use Mathematica. I tried Mathematica 7.0 and it gives:

enter image description here

Where $_2F_1$ is the hypergeometric function:

enter image description here

share|cite|improve this answer
What is $_2F_1$ – Kristoffer Ryhl Jul 14 '14 at 8:54
@Darksonn: It is the hypergeometric function. – Mhenni Benghorbal Jul 14 '14 at 8:58
The expression is a real valued function the plot of which being quite nice and simple. – Claude Leibovici Jul 14 '14 at 9:05
Moreover, it appears valid for all $x\ne2\pi n,\;n\in\mathbb{Z}$, unlike that given in the accepted answer. But the accepted solution is way nicer. – Ruslan Jul 14 '14 at 13:33

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.