Fourier series with all coefficients $\frac1n$ The function with Fourier series given by
$$f(x)=\sum_{n=1}^\infty \frac{\cos{(nx)}+\sin{(nx)}}n$$
appears to be a curve with vertical asymptotes at $x=2\pi k$ where $k\in\mathbb{Z}$. Is there an elementary closed form for $f(x)$? Wolfram gives us
$$f(x)=-\frac12(1+i)(\ln{(1-e^{-ix})}-i\ln{(1 - e^{ix})})$$
but is there a way to simplify the above expression into one which does not involve complex numbers as the function $f(x)$ is clearly real?
Edit:
I found that this question may have been asked in different contexts before. I have provided a proof of the related results as one of the answers below.

$$ f(x) = - \frac{\ln(2-2\cos(x))}{2} + \arctan\left(\frac{\sin(x)}{1-\cos(x)}\right)$$
