Expand the function [tex]F(x)=\int_{0}^{x}\ln\sqrt{\left|\cot \frac{t}{2}\right|}\,dt[/tex] in a Fourier series on the interval [tex][-\pi, \pi][/tex].
Solution:
The integrand [tex]g(t)=\frac{1}{2}\ln\left|\cot \frac{t}{2}\right|[/tex] has only logarithmic singularities at [tex]t=0[/tex] and [tex]t=\pm\pi[/tex], which are integrable, so [tex]F[/tex] is defined and continuous on [tex][-\pi, \pi][/tex]. Since [tex]g[/tex] is even, [tex]F[/tex] is odd, so all [tex]a_n=0[/tex] (including [tex]a_0[/tex]).
Moreover [tex]F(\pi)=0[/tex]: the substitution [tex]t=\pi-s[/tex] turns [tex]\cot \frac{t}{2}[/tex] into [tex]\tan \frac{s}{2}=\frac{1}{\cot \frac{s}{2}}[/tex], so the integral [tex]\frac{1}{2}\int_{0}^{\pi}\ln\cot \frac{t}{2}\,dt[/tex] equals its own negative. Thus [tex]F(-\pi)=F(\pi)=0[/tex]. Integrating by parts (the boundary term vanishes because [tex]F(0)=F(\pi)=0[/tex]):
[tex]b_n=\frac{2}{\pi}\int_{0}^{\pi}F(x)\sin nx\,dx=\frac{2}{n\pi}\int_{0}^{\pi}F'(x)\cos nx\,dx=\frac{1}{n\pi}I_n,\qquad I_n=\int_{0}^{\pi}\ln\cot \frac{x}{2}\,\cos nx\,dx[/tex]
The substitution [tex]x=\pi-s[/tex] gives [tex]I_n=-(-1)^nI_n[/tex], so [tex]I_n=0[/tex] for even [tex]n[/tex]. For odd [tex]n[/tex] we integrate by parts once more, using [tex]\left(\ln\cot \frac{x}{2}\right)'=-\frac{1}{\sin x}[/tex] (the boundary terms vanish, since the logarithmic singularity is multiplied by [tex]\sin nx[/tex], which tends to [tex]0[/tex] linearly at [tex]0[/tex] and at [tex]\pi[/tex]):
[tex]I_n=\frac{1}{n}\int_{0}^{\pi}\frac{\sin nx}{\sin x}\,dx[/tex]
For [tex]n=2m+1[/tex] the identity [tex]2\sin x\cos 2jx=\sin (2j+1)x-\sin (2j-1)x[/tex] telescopes to
[tex]\frac{\sin (2m+1)x}{\sin x}=1+2\sum_{j=1}^{m}\cos 2jx[/tex]
whose integral over [tex][0, \pi][/tex] is [tex]\pi[/tex]. Hence [tex]I_n=\frac{\pi}{n}[/tex] and [tex]b_n=\frac{1}{n^2}[/tex] for odd [tex]n[/tex], while [tex]b_n=0[/tex] for even [tex]n[/tex]:
[tex]F(x)=\sum_{k=1}^{\infty}\frac{\sin \left((2k-1)x\right)}{(2k-1)^2}[/tex]
Since [tex]\sum\frac{1}{(2k-1)^2}[/tex] converges, the series converges uniformly (Weierstrass M-test) to a continuous function with the same Fourier coefficients as the continuous function [tex]F[/tex] (for which [tex]F(-\pi)=F(\pi)[/tex]); two such functions coincide, so the equality holds on the whole interval [tex][-\pi, \pi][/tex].