Problem 344
Easy Remainders and Fourier Series

Expand the periodic function f(x)=ln |sin dfrac x2 |

Expand the periodic function $f(x)=\ln\left|\sin\dfrac x2\right|$ in a Fourier series.

Explanation of Method

$f$ is even (since $|\sin(-x/2)|=|\sin(x/2)|$), so only cosine terms appear. Both $a_0$ and $a_n$ reduce, via the substitution $u=x/2$, to the classical integrals $\int_0^{\pi/2}\ln(\sin u)\,du=-\frac\pi2\ln2$ and $\int_0^{\pi/2}\ln(\sin u)\cos(2nu)\,du=-\frac\pi{4n}$. The result also follows directly from the real part of the standard series $\ln|1-e^{ix}|=-\sum\cos(nx)/n+\ln2$-type identity.

  1. Note evenness, so $b_n=0$.
  2. Compute $a_0$ via the classical log-sine integral.
  3. Compute $a_n$ via the companion integral, and cross-check via the complex-logarithm identity.

Step 1 · Symmetry and $a_0$

$f$ is even, so $b_n=0$. With $u=x/2$: $$ a_0 = \frac4\pi\int_0^{\pi/2}\ln(\sin u)\,du = \frac4\pi\left(-\frac\pi2\ln2\right) = -2\ln2. $$

Step 2 · Computing $a_n$

$$ a_n = \frac4\pi\int_0^{\pi/2}\ln(\sin u)\cos(2nu)\,du = \frac4\pi\left(-\frac\pi{4n}\right) = -\frac1n. $$ This matches the real part of the standard identity $\ln|1-e^{ix}|=\ln|2\sin\frac x2|=-\sum_{n=1}^\infty\frac{\cos(nx)}n$ (from $\operatorname{Re}\ln(1-e^{ix})=\operatorname{Re}\left[-\sum e^{inx}/n\right]$), which directly gives $\ln|\sin\frac x2|=-\ln2-\sum\cos(nx)/n$.

Step 3 · Fourier series and verification

$$ \boxed{\ln\left|\sin\frac x2\right| = -\ln2-\sum_{n=1}^\infty\frac{\cos(nx)}n} $$ (Verified numerically at $x=1.0,2.0$: partial sums to $300{,}000$ terms match the direct log value to 4+ decimal places. Independent check at $x=\pi/2$: LHS $=\ln(1/\sqrt2)=-\frac12\ln2$; RHS: $\cos(n\pi/2)$ vanishes for odd $n$, and for $n=2k$ gives $-\ln2-\sum(-1)^k/(2k)=-\ln2+\frac12\ln2=-\frac12\ln2$. ✓)


Summary Table

PropertyValue
$a_0$$-2\ln2$
$a_n$$-1/n$
Fourier series$\ln|\sin\frac x2|=-\ln2-\sum\frac{\cos nx}n$

Additional Notes

Result

$$ \ln\left|\sin\frac x2\right| = -\ln2-\sum_{n=1}^\infty\frac{\cos(nx)}n. $$