First:
\begin{align} e^{x + iy} &= e^x e^{iy} \\ &= e^x \angle y \end{align}
So:
\begin{align} \log(r \angle \theta) &= \log(r) + i\theta \\ \mathrm{Im}(log(r \angle \theta)) &= \theta \\ \mathrm{Im}(log(z)) &= arg(z) \end{align}
So we can simplify this to:
\sum_{n=1}^{\infty} \frac{\sin nx}{n} = -\arg \left(1 - e^{ix} \right)
However, that's not all... now looking at what this means geometrically... let
z = 1 - e^{ix} and
\theta = -\arg(z), and plot these on an Argand diagram:
- In case it's not clear, z is a point, x and θ are their respective angles. The circle is the possible locations of z, which is centred on 1 and has radius 1.
- argand.png (4.79 KiB) Viewed 3414 times
Now we can use the "angle at a centre is double the angle at the circumference" rule to find that:
\theta = \begin{cases} \frac {\pi-x}2 & 0 < x \le \pi \\ \frac{-\pi-x}2 & -\pi \le x < 0 \end{cases}
The cases are necessary as that's where the path of z crosses the origin - the argument is discontinuous there.
To complete the cases, we can evaluate the original power series at x=0 to plug the gap we got when we went from having just sin to exp (the power series using sin converges at zero, but the power series using cos diverges at zero, so when we added the cos, we lost the value at x=0), and get our final result:
\sum_{n=1}^{\infty} \frac{\sin nx}{n} = \begin{cases} \frac {\pi-x}2 & 0 < x \le \pi \\ 0 & x = 0 \\ \frac{-\pi-x}2 & -\pi \le x < 0 \end{cases}
So we get a stepped linear thing.
Alpha agrees (don't try to get alpha to find the formula though, as you get some convoluted mess... because it takes x as complex, not real, which is necessary for pretty much all the simplifications we've done in the thread).
However, I'd be curious to hear if there's a geometric reason why
\sum_{n=1}^{\infty} \frac{e^{inx}}{n} gives that circle around 1...