Let $f : (-\pi, \pi)\setminus\{0\} \longrightarrow \mathbb{R}$ be $2\pi$-periodic and defined by $$f(x) = -\log\left(\left|2\sin\left(\frac{x}{2}\right)\right|\right).$$ I have to find the Fourier coefficients of $f$.
There is a suggestion: it can be useful to prove that the integral $$I_k = \int_0^\pi \cot\left(\frac{x}{2}\right)\sin(kx) dx$$ does not depend on $k \geq 1$.
Then I could prove that $I_{k + 1} - I_k = 0$. But how? I know that $$I_{k + 1} - I_k = \\$$ $$= \int_0^\pi \cot\left(\frac{x}{2}\right)\left(\sin\left((k + 1)x\right) - \sin(kx)\right) dx$$ and I tried writing $x = \frac{x}{2} + \frac{x}{2}$, but I don't get anywhere.
Bonus question: does the Fourier series converge?
We have that $$\cot\left(\frac{x}{2}\right)\left(\sin\left((k + 1)x\right) - \sin(kx)\right)= \cot\left(\frac{x}{2}\right)\left(\sin(kx)\cos(x)+\cos(kx)\sin(x) - \sin(kx)\right)=\\\cot\left(\frac{x}{2}\right)\left(\sin(kx)(\cos(x)-1)) + \cos(kx)\sin(x)\right)$$
But since $\sin(x)=2\sin(x/2)\cos(x/2)$ and $\cos^2(x/2)=\dfrac{1+\cos(x)}{2}$, $$\cot\left(\frac{x}{2}\right)=\dfrac{\cos(\frac{x}{2})}{\sin(\frac{x}{2})}=\dfrac{\cos(\frac{x}{2})}{\sin(x)/(2\cos(x/2))}=\dfrac{2\cos^2(x/2)}{\sin(x)}=\dfrac{1+\cos(x)}{\sin(x)}$$
Thus, $$\cot\left(\frac{x}{2}\right)\left(\sin\left((k + 1)x\right) - \sin(kx)\right)=\dfrac{1+\cos(x)}{\sin(x)}[\sin(kx)(\cos(x)-1)]+\dfrac{1+\cos(x)}{\sin(x)}\sin(x)\cos(kx)=\\=\dfrac{\cos^2(x)-1}{\sin(x)}\sin(kx)+(1+\cos(x))\cos(kx)=\\=-\sin(x)\sin(kx)+\cos(kx)+\cos(x)\cos(kx)$$
A straight-forward calculation shows the integral of the previous expression is $0$ (otherwise just use that $\{1,\cos(x),\sin(x),\ldots, \cos(kx),\sin(kx),\ldots\} $ is orthogonal).
Regarding the convergence, it is well-known that a differentiable function has a pointwise convergent Fourier series.