[Math] Fourier series for $f(x) = \sqrt{1 – \cos x}$

calculusfourier analysisfourier seriesordinary differential equationssequences-and-series

I want to calculate the Fourier series for the $2\pi$ periodic function $f(x) = \sqrt{1 – \cos x}$ for $-\pi \leq x \leq \pi$

The Fourier series is given by:
$$f(x) = \frac{a_{0}}{2} + \sum\limits_{n = 1}^{\infty}a_{n}\cos nx + \sum\limits_{n = 1}^{\infty}b_{n}\sin nx$$

Where:

$a_{0} = \frac{1}{\pi}\int\limits_{-\pi}^{\pi}f(x)dx$

$a_{n} = \frac{1}{\pi}\int\limits_{-\pi}^{\pi}f(x) \cos nxdx$

$b_{n} = \frac{1}{\pi}\int\limits_{-\pi}^{\pi}f(x) \sin nxdx$

I know how to go about these questions and have no problem with the integration.

My question is do we need to split up the integrals into $0 \leq x \leq \frac{\pi}{2}$ and $\frac{\pi}{2} \leq x \leq \pi$ to account for the graphs on each side of the origin? Or can we just compute directly from the equations I wrote above with $-\pi \leq x \leq \pi$? Also I don't think we would, but would you consider odd/even functions?

Any help on understanding what to do would be great thank you

Best Answer

$$ f(x)=1-\cos x =2\sin^2 (x/2) $$ and hence $$ \sqrt{1-\cos x}=\sqrt{2}|\sin (x/2)| $$ Hence, since is even, then $f(x)=\frac{a_0}{2}+\sum_{n=1}^\infty a_n\cos (nx)$, where $$ a_n=\frac{2}{\pi}\int_0^\pi f(x)\cos (nx)\,dx=\frac{2\sqrt{2}}{\pi}\int_0^\pi \sin(x/2)\cos (nx)\,dx \\ =\frac{\sqrt{2}}{\pi}\int_0^\pi \big(\sin(nx+x/2)-\sin(nx-x/2)\big)\,dx \\=\frac{\sqrt{2}}{\pi} \left(-\frac{1}{n+½}\cos(nx+x/2)+\frac{1}{n-½}\cos(nx-x/2)\right)\Big|_{x=0}^{x=\pi} \\=\frac{\sqrt{2}}{\pi}\left(\frac{1}{n-½}-\frac{1}{n+½}\right)= \frac{\sqrt{2}}{\pi}\cdot\frac{4}{4n^2-1}. $$ So finally $$ \sqrt{1-\cos x}=\frac{2\sqrt{2}}{π}−\frac{4\sqrt{2}}{π}\sum_{n=1}^\infty\frac{1}{4n^2−1}\cos nx $$