# What is the result of this infinite sum?

I'm trying to find the value of $\mathbf S$ where

$$\mathbf S = \sum_{k=1}^\infty \frac{\sin(2\pi k x)}{k}; k \in \mathbb N, x \in \mathbb R^*, x \not \in \mathbb N$$

I had a look to WA which lead me to this result.

I think this result can be simplified. So I did some research and some hours later, I found this result:

$$\mathbf S = \pi (x+\frac{1}{2}-(2n+m)) ; n,m \in \mathbb N$$

I'm not satisfied with this result either. I think I miss something on the way.

I'm stuck. What is the result of this infinite sum?

• This is the Fourier series of $f(x) = \frac{\pi}{2} - \pi x$ on $[0,1]$, see e.g. this question. An expression for the sum of the series that holds for all $x\not\in\mathbb{N}$ is $\frac{\pi}{2} - \pi \{x\}$ where $\{x\} = x - \lfloor x\rfloor$ is the fractional part of $x$ May 4, 2016 at 0:11
• It seems that wolfram alpha doesn't understand the Fourier series so well.. I wonder how it could be improved for detecting and simplifying such Fourier series. May 4, 2016 at 0:15
• Try writing down the Taylor series of $-\log(1-z)$ at $z=0$, replacing $z$ with $e^{2\pi i x}$ and taking the imaginary part. May 4, 2016 at 0:39
• @JackD'Aurizio : but you can't replace $|z| < 1$ by $e^{i t}$ directly, you have to prove also that $\sum_k z^k/k$ converges on $|z|=1, z \ne 1$, and that it is equal to $\lim_{r \to 1^-} \sum_k r^k z^k/k$ May 4, 2016 at 1:01
• @user1952009: you are clearly right, one has to be quite careful when acting on the boundary of the pointwise-convergence disk, but Abel's lemma is designed just for that. May 4, 2016 at 1:05

Indeed, WA missed some simplification.

$$\log(1-e^{i2\pi x})-\log(1-e^{-i2\pi x})=\log\left(\frac{1-\cos(2\pi x)+i\sin(2\pi x)}{1-\cos(2\pi x)-i\sin(2\pi x)}\right)\\ =\log\left(\frac{2\sin^2(\pi x)-i2\cos(\pi x)\sin(\pi x)}{2\sin^2(\pi x)+i2\cos(\pi x)\sin(\pi x)}\right)=\log\left(-\frac{ie^{i\pi x}}{ie^{-i\pi x}}\right)=i2\pi x+i(2k+1)\pi.$$

So with the factor $\frac i2$ the sum should be

$$\pi\left(k+\frac12\right)-\pi x$$ where $k$ is indeterminate.

As the sine is periodic so is the Fourier series, and the indeterminate $k$ must be some integer offset from the integer part of $x$,

$$\pi\left(\lfloor x\rfloor+n+\frac12\right)-\pi x.$$

Then we can evaluate the series at $x=\frac12$, which is an ordinary point ($x=0$ wouldn't work), get $S(\frac12)=0$, and conclude

$$S(x)=\pi\left(\frac12-\{x\}\right).$$ 