Expand the periodic function f(x)=ln |tan dfrac x2 |
Expand the periodic function $f(x)=\ln\left|\tan\dfrac x2\right|$ in a Fourier series.
Explanation of Method
Since $\tan\frac x2=\sin\frac x2/\cos\frac x2$, the function splits as a difference of two logarithms, each already expanded: $\ln|\sin\frac x2|$ from Problem 344, and $\ln|\cos\frac x2|=\ln\left|\sin\frac{\pi-x}2\right|$ obtained from the same result via the substitution $x\to\pi-x$. Subtracting, the constant terms cancel and only the odd-harmonic cosine terms survive.
- Express $\ln|\cos\frac x2|$ using Problem 344's result with $x\to\pi-x$.
- Subtract to get $\ln|\tan\frac x2|=\ln|\sin\frac x2|-\ln|\cos\frac x2|$.
- Simplify, noting even-$n$ terms cancel and odd-$n$ terms double.
Step 1 · $\ln|\cos\frac x2|$ from Problem 344
Since $\cos\frac x2=\sin\frac{\pi-x}2$, substituting $x\to\pi-x$ in Problem 344's result ($\cos(n(\pi-x))=\cos(n\pi)\cos(nx)+\sin(n\pi)\sin(nx)=(-1)^n\cos(nx)$): $$ \ln\left|\cos\frac x2\right| = -\ln2-\sum_{n=1}^\infty\frac{(-1)^n\cos(nx)}n. $$
Step 2 · Subtracting
$$ \ln\left|\tan\frac x2\right| = \ln\left|\sin\frac x2\right|-\ln\left|\cos\frac x2\right| = \sum_{n=1}^\infty\frac{(-1)^n-1}n\cos(nx). $$ For even $n$: $(-1)^n-1=0$. For odd $n=2k-1$: $(-1)^n-1=-2$: $$ \ln\left|\tan\frac x2\right| = -2\sum_{k=1}^\infty\frac{\cos((2k-1)x)}{2k-1}. $$
Step 3 · Fourier series and verification
$$ \boxed{\ln\left|\tan\frac x2\right| = -2\sum_{n=1}^\infty\frac{\cos((2n-1)x)}{2n-1} = -2\left(\cos x+\frac{\cos3x}3+\frac{\cos5x}5+\cdots\right)} $$ (Verified numerically at $x=1.0,2.5$: partial sums to $300{,}000$ terms match $\ln|\tan\frac x2|$ to 4+ decimal places. At $x=\pi/2$: LHS $=\ln1=0$; RHS: $\cos\frac{(2k-1)\pi}2=0$ for every $k$, so the series correctly gives $0$.)
Summary Table
| Property | Value |
|---|---|
| Fourier series | $\ln|\tan\frac x2|=-2\sum\frac{\cos((2n-1)x)}{2n-1}$ |
| Constant term | $0$ (the $\ln2$'s cancel) |
Additional Notes
- The vanishing constant term reflects that $\tan\frac x2$'s $\ln2$-scale contributions from $\sin$ and $\cos$ exactly cancel — a clean illustration of how subtracting two log-series can eliminate a divergence-adjacent constant while doubling the oscillatory part.
- This series is singular (logarithmically divergent) at every $x=k\pi$, twice as often as $\ln|\sin\frac x2|$ alone, since $\tan\frac x2$ has both zeros and poles on that lattice.
- Only odd harmonics survive, structurally paralleling the odd-harmonic-only pattern seen in the piecewise wave problems (325, 328–329) — here the mechanism is algebraic cancellation rather than geometric symmetry.